Create a page

From Hobby'dev
Jump to: navigation, search

New pages[edit | edit source]

It's really easy to create a new page. You have two options.

  1. From an existing page
    1. Edit an existing page
    2. add a link to your future page
    3. click on the link you just created
  2. From scratch
    1. Type the name of your future page in the search box
    2. click the "Create the page <name> on this wiki!" link

Once you're done, go to the complete list of projects page, and add your project in the alphabetical list.

That's it!


Source code[edit | edit source]

At some point, you'll want to publish snippets. There's a tag for it. If you type this:


<source lang="go">

package main

import (
	"bufio"
	"fmt"
	"log"
	"os"

	"github.com/eduardonunesp/goaiml"
)

func main() {
	aiml := goaiml.NewAIML()
	err := aiml.Learn("../test.aiml.xml")
	if err != nil {
		log.Fatal(err)
	}

	scanner := bufio.NewScanner(os.Stdin)
	fmt.Print("You: ")
	for scanner.Scan() {
		line := scanner.Text()
		resp, _ := aiml.Respond(line)
		fmt.Println("Robot: " + resp)
		fmt.Print("You: ")
	}
}

</source>


You'll get this:

package main

import (
	"bufio"
	"fmt"
	"log"
	"os"

	"github.com/eduardonunesp/goaiml"
)

func main() {
	aiml := goaiml.NewAIML()
	err := aiml.Learn("../test.aiml.xml")
	if err != nil {
		log.Fatal(err)
	}

	scanner := bufio.NewScanner(os.Stdin)
	fmt.Print("You: ")
	for scanner.Scan() {
		line := scanner.Text()
		resp, _ := aiml.Respond(line)
		fmt.Println("Robot: " + resp)
		fmt.Print("You: ")
	}
}


Pretty cool. Thank you ShoutWiki!