cloutcli

package module
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 13 Imported by: 0

README

cloutcli

library to make building things with bitclout easy

quick start demo

cmd $ ./clout demo

  clout demo visualizegraph  # make clout.gv graph file
  clout demo printall        # print all clouts
  clout demo search          # search sqlite database
  clout demo sqlite          # place data into local sqlite database

  search examples:

  ./clout demo search --term=hi --table=users
  ./clout demo search --term=hi --table=posts
  ./clout demo search --term=username --table=follow --degrees=2

full menu

cloutcli/cmd $ ./clout

  clout account               # list your various accounts
  clout ls                    # list global posts
  clout message               # send, send bulk, read
  clout mongo                 # query from mongodb
  clout sell                  # sell coins
  clout sqlite                # import from badger, query sqlite

cloutcli/cmd $ ./clout message

  clout message bulk           # --to=allfollowers [--text=foo]
  clout message inbox          # --filter=myhodlers
  clout message new            # --to=username [--text=foo]
  clout message reply          # --id=foo [--text=foo]
  clout message show           # --id=foo

cloutcli/cmd $ ./clout sell

  clout sell dust           # --limit=x [--execute]

cloutcli/cmd $ ./clout sqlite

  clout sqlite fill           # --dir=/path/to/badgerdb
  clout sqlite graph          # produce clout.gv file
  clout sqlite query          # --term=foo [--table=x]

building the "clout" executable

There is no main.go file in the root directory.

cd cmd
go mod tidy
go build
./clout

This is done to keep the root directory having the package name "cloutcli".

Which allows other go programs to just import:

import "github.com/andrewarrow/cloutcli"

and then:

list := cloutcli.GlobalPosts()

for _, post := range list {
  fmt.Println(post.Body)
}

Example

github.com/andrewarrow/referential

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPublicKey = "BC1YLgw3KMdQav8w5juVRc3Ko5gzNJ7NzBHE1FfyYWGwpBEQEmnKG2v"
View Source
var Tables string
View Source
var Testing bool

Functions

func ConvertToUSD added in v0.0.6

func ConvertToUSD(r lib.Rate, sum int64) float64

func FollowingFeedPosts

func FollowingFeedPosts(username string) []lib.Post

func FollowingFeedPub58 added in v0.0.10

func FollowingFeedPub58(pub58 string) []lib.Post

func GetNumFollowers added in v0.0.6

func GetNumFollowers(pub58, username string) int64

func GetRate added in v0.0.6

func GetRate() lib.Rate

func GiveDiamond added in v0.0.11

func GiveDiamond(pub58, theirPub58, hash string) string

func GlobalPosts

func GlobalPosts() []lib.Post

func ImportFromBadgerToSqlite added in v0.0.2

func ImportFromBadgerToSqlite(dir string) error

func LoopThruAllFollowing added in v0.0.6

func LoopThruAllFollowing(pub58, username string, limit int) []string

func MessageInbox added in v0.0.5

func MessageInbox(username string) lib.MessageList

func PrintAllPostsFromBadger

func PrintAllPostsFromBadger(dir string) error

func Pub58ToUser added in v0.0.6

func Pub58ToUser(key string) lib.User

func QuerySqliteFollow added in v0.0.5

func QuerySqliteFollow(tab, s, degrees string)

func QuerySqliteNodeConnections added in v0.0.7

func QuerySqliteNodeConnections(f *os.File)

func QuerySqliteNodesInOrder added in v0.0.7

func QuerySqliteNodesInOrder(f *os.File)

func QuerySqlitePosts added in v0.0.2

func QuerySqlitePosts(term string)

func QuerySqliteUsers added in v0.0.5

func QuerySqliteUsers(s string)

func SearchSqlitePub58 added in v0.0.5

func SearchSqlitePub58(s string) string

func SearchSqliteUsername added in v0.0.5

func SearchSqliteUsername(s string) string

func SendMessage added in v0.0.6

func SendMessage(words, to, body string) string

func SimplePost added in v0.0.4

func SimplePost(words, body string) string

func SinglePost added in v0.0.11

func SinglePost(postHex string) lib.Post

func SubmitSellTransaction added in v0.0.6

func SubmitSellTransaction(words, theirPub58 string, amount int64) string

func UsernameToPub58

func UsernameToPub58(s string) string

func UsernamesOfHodlers added in v0.0.9

func UsernamesOfHodlers(username string) []string

Types

type TopUser added in v0.0.7

type TopUser struct {
	Count    string
	Username string
}

func QuerySqliteTopDiamondGivers added in v0.0.7

func QuerySqliteTopDiamondGivers(fullpath, limit string) []TopUser

func QuerySqliteTopLikers added in v0.0.7

func QuerySqliteTopLikers(fullpath, limit string) []TopUser

func QuerySqliteTopReclouters added in v0.0.7

func QuerySqliteTopReclouters(fullpath, limit string) []TopUser

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL