twtr

command module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Unlicense Imports: 3 Imported by: 0

README

twtr

Go Reference

A decentralised microblogging client for hackers.

Installation

go install duriny.envs.sh/twtr@latest

Usage

The general syntax is twtr COMMAND [OPTIONS] [ARGS ...], if you get stuck on any command, don't be afraid to add --help to the command.

Configuration

All configuration is handled via the metadata fields in your twtxt.txt file. The most important fields are nick, url, and the follow directives. Use the twtr init command to get started, after that, you can manually edit the ~/.local/share/twtr/twtxt.txt file to add or change the metadata.

See the metadata spec for more details.

Hooks

twtr uses git style hooks, it looks for special files in the hook directory, ~/.config/twtr/hooks/, and if the hook file exists and is executable, it is gets run at the appropriate event.

  • pre-tweet is executed directly before a tweet is posted.
  • post-tweet is executed directly after a tweet is posted.

See the twtr.Hook type for more examples.

FAQ

What is twtxt?

Twtxt is a self-hosted microblogging platform, think Twitter, but way simpler.

Instead of a centralized server with a company behind it, each twtxt user hosts their "feed" as a plain text file, twtxt.txt, on their own website. Other users can then read that feed and make posts of their own, even replying or tagging each other.

You can read more about the twtxt file format here.

Ok, So what is twtr then?

twtr is a client for twtxt, it helps you write tweets (or twts) to your twtxt.txt file, and makes it easier to follow other feeds and get updates from the people you follow.

There are a lot of twtxt clients out there, you can check those out as well, or you can try writing your own:

  • jenny - A client that integrates with mutt.
  • twet - A command line client.
  • Yarn.Social - A web interface and twtxt hosting platform.
How do I pronounce twtr?

Like "tweeter", i.e. I am the one who tweets.

Where do I start?

Just run twtr init.

What If I don't have a website?

That's ok, you can host your twtxt.txt file anywhere on the internet. There are a couple of good places to consider:

  • You can join a tilde on the tildeverse, then you can just host your feed at https://example.com/~username/twtxt.txt.
  • If you don't want to create a whole website, you can join a Yarn.Social pod, such as https://twtxt.net. Yarn.Social is an excellent choice for beginners.
  • Coming Soon - Twtxt feeds may be hosted as a Gist on https://github.com.
How does twtr send my tweets to the hosting server?

It depends on where you host your twtxt.txt file, if you have ssh access to the server you host it on, you can use the scp(1) command in the ~/.config/twtr/hooks/pre-tweet file to copy the remote file to your local machine, and use scp(1) again to copy the local file back to the server after the tweet has been written to it using ~/.config/twtr/hooks/post-tweet.

Documentation

Overview

A decentralised microblogging client for hackers.

go install duriny.envs.sh/twtr@latest

NAME

twtr - a decentralised microblogging client.

SYNOPSIS

The general syntax for twtr is:

twtr COMMAND [OPTIONS] [ARGS ...]

Where the comment specifies the action to preform, with optional flags, as well as any arguments to that command. For more information on each command, see the relevant entry in the COMMANDS section, or see the help message for each command:

twtr COMMAND --help

COMMANDS

The following are the commands twtr provides.

INIT COMMAND

Initialise twtr locally.

twtr init [-h|--help] [--file FILE]

The init command initialises a new twtxt.txt file for the user, the twtxt file location defaults to $XDG_DATA_HOME/twtr/twtxt.txt, but this may be overridden with the --file flag.

POST COMMAND

Post a new tweet.

twtr post [-h|--help] [--file FILE] TWEET...

The post command writes a new post to the specified twtxt.txt file and runs the pre/post tweet hooks.

All rites reversed, use, distribute, and modify freely.

AUTHOR

~duriny <duriny@envs.net>

BUGS

Probably. Let me know if you find any.

SEE ALSO

There are a number of other twtxt clients still under active development.

jenny(1)    - https://www.uninformativ.de/git/jenny/file/README.html
twet(1)     - https://github.com/jdtron/twet
twtxt(1)    - https://github.com/buckket/twtxt (unmaintained)
Yarn.Social - https://yarn.social

Directories

Path Synopsis
Package cmd is a importable implementation of the twtr client.
Package cmd is a importable implementation of the twtr client.
Package twtr is the backend to the twtr twtxt client.
Package twtr is the backend to the twtr twtxt client.

Jump to

Keyboard shortcuts

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