tally-ho

command module
v0.0.0-...-2efcb5c Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 17 Imported by: 0

README

tally-ho

A micropub speaking blog.

usage

This is an almost all-in-one solution for running an "IndieWeb" blog. To get running you will need to:

  1. Run go install hawx.me/code/tally-ho@latest, or clone this repo and run go build

  2. Make a directory to put media files in (tally-ho will write files to this directory but will not serve them)

  3. Create a config file, by default it looks for a file called config.toml

    me = "https://john.example.com/"
    name = "John Doe"
    title = "John Doe's blog"
    description = "My great blog"
    
    # the URL tally-ho will be accessed from
    baseURL = "http://blog.john.example.com/"
    # the URL the media directory will be accessed from
    mediaURL = "http://media.john.example.com/"
    
    # each of these blocks can be left out if you don't want to use them
    [twitter]
    consumerKey = "..."
    consumerSecret = "..."
    accessToken = "..."
    accessTokenSecret = "..."
    
    [flickr]
    consumerKey = "..."
    consumerSecret = "..."
    # To get these values you can use the cmd/flickr-credentials tool which uses
    # this config file to perform the web authentorization flow.
    #
    #   $ go install hawx.me/code/tally-ho/cmd/flickr-credentials
    #   $ flickr-credentials -config $PATH_TO_CONFIG
    accessToken = "..."
    accessTokenSecret = "..."
    
    [github]
    clientID = "..."
    clientSecret = "..."
    # To get this value you can use the cmd/github-credentials tool which uses
    # this config file to perform the web authentorization flow.
    #
    #   $ go install hawx.me/code/tally-ho/cmd/github-credentials
    #   $ github-credentials -config $PATH_TO_CONFIG
    accessToken = "..."
    
  4. Copy the ./web directory somewhere

  5. Edit the contents of web/templates/foooter.gotmpl to not have my details, and potentially change the css or templates to be more your style

Then you are ready to run it:

$ tally-ho
    --config $PATH_TO_CONFIG_FILE
    --web $PATH_TO_WEB_DIR
    --media-dir $PATH_TO_MEDIA_DIR
    --db ./db.sqlite

It will be listening on http://localhost:8080, this can be changed by passing --port or --socket. If run as a systemd service then it will detect a corresponding .socket definition.

To get webmentions for social media posts I recommend setting up https://brid.gy/, as tally-ho only allows syndicating to Twitter/Flickr/GitHub and not gathering responses (yet).

See ./misc for examples of config files for nginx and systemd.

features

Possibly up-to-date feature list:

  • IndieAuth:

    • Authentication in header
    • Authentication in body
  • Config:

    • Get q options
    • Micropub q=config
    • Micropub q=media-endpoint
    • Micropub q=source
    • Micropub q=syndicate-to
    • Media q=last
  • Posting:

    • Create with application/x-www-form-urlencoded
    • Create with application/json
    • Create with multipart/form-data
      • Store photo/audio/video as if they had been sent via the media endpoint
    • Update with application/json
      • Require update scope for requests
    • Upload to media endpoint
    • Delete
      • 410 Gone entry
      • Remove from listing
      • Remove from grouped likes
    • Undelete
    • mp-slug
    • post-status
  • Syndication:

    • Twitter
      • Create
        • Notes
        • Posts
        • Photos
        • Videos
        • Likes
        • Replies
        • Reposts (url only)
      • Retrieve likes
      • Retrieve replies
      • Retrieve retweets
    • Flickr
      • Create
        • Photos
        • Videos
        • Likes
        • Replies
      • Retreive likes
      • Retrieve comments
    • GitHub
      • Likes
        • Repos
        • Issues
        • Comments
      • Create issue (in-reply-to repo)
      • Create comment (in-reply-to issue)
      • Retrieve reactions
      • Retrieve comments
  • Webmentions:

    • Receive webmentions for posts
    • Send webmentions on create
    • Send webmentions on update
    • Send webmentions on delete
    • Send webmentions on undelete
  • Display:

    • List:
      • All
      • Combine likes
      • Pagination
      • By kind
      • By category
    • Entry:
      • Notes
      • Posts
      • Photos
      • Videos
      • Likes
      • Replies
      • Bookmarks
      • RSVPs
      • Checkins (kinda)
      • Reposts
      • indiebookclub
      • teacup
  • Feeds:

Relevant specs:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package auth implements a middleware providing indieauth.
Package auth implements a middleware providing indieauth.
cmd
internal
Package media implements a micropub media endpoint.
Package media implements a micropub media endpoint.
Package micropub implements a micropub handler.
Package micropub implements a micropub handler.
Package silos provides methods to re-publish entries on other sites.
Package silos provides methods to re-publish entries on other sites.
Package webmention implements a handler for receiving webmentions.
Package webmention implements a handler for receiving webmentions.

Jump to

Keyboard shortcuts

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