aptok/main.go

66 lines
1.5 KiB
Go
Raw Normal View History

package main
import (
"flag"
2019-09-10 11:21:39 +03:00
"fmt"
// "os"
// "strings"
// "errors"
// "encoding/json"
// "io/ioutil"
// "net/http"
// "net/url"
// "context"
// "html"
"github.com/gologme/log"
// "github.com/go-fed/activity/streams"
// "github.com/gorilla/mux"
// "gopkg.in/ini.v1"
// "github.com/davecgh/go-spew/spew"
"./activityserve"
)
var err error
func main() {
// This is here for debugging purposes. I want to be able to easily spot in the terminal
// when a single execution starts
fmt.Println()
fmt.Println("======================= PHeRePHoNe ==========================")
// introduce ourselves
fmt.Println()
fmt.Println("Pherephone follows some accounts and boosts")
fmt.Println("whatever they post to our followers. See config.ini ")
fmt.Println("for more information and how to set up. ")
debugFlag := flag.Bool("debug", false, "set to true to get debugging information in the console")
flag.Parse()
if *debugFlag == true {
log.EnableLevel("info")
2019-09-13 20:21:54 +03:00
log.EnableLevel("error")
}
activityserve.Setup("config.ini", *debugFlag)
2019-09-10 11:21:39 +03:00
// actor, _ := activityserve.MakeActor("activityserve_test_actor_2", "This is an activityserve test actor", "Service")
// actor, _ := activityserve.LoadActor("activityserve_test_actor_2")
// actor.Follow("https://cybre.space/users/tzo")
2019-09-10 11:21:39 +03:00
// actor.CreateNote("Hello World!")
2019-09-13 20:21:54 +03:00
actor, _ :=
activityserve.LoadActor("activityserve_test_actor_2")
actor.CreateNote("I'm building #ActivityPub stuff")
activityserve.Serve()
2019-09-10 11:21:39 +03:00
}