From: dbucklin@sdf.org Date: 2017-03-05 Subject: Setting up twtxt Twtxt[1] is a distributed alternative to Twitter or other mi- croblogging services. It's a lot like micoblogging with RSS[2], just without the RSS part. In addition to having romantic feelings for command-line interfaces, I've been interested in distributed web ideas like Solid[3]. Like many others, I've been feeling disenchanted with Facebook and Twitter -- there's just so much noise. Ads are part of that noise component, but it's also very easy to share content without adding to the conversation. Maybe it's too easy. Shares, retweets, helpful suggestions from the platform -- all of these things are added to your feed with the best of intentions, but they have the side ef- fect of obscuring the content you are really after. With twtxt, your activity is not subject to someone else's terms, and you can be sure that your words will only be seen by those willing to do a relatively extraordinary amount of work to do so. Let's dive in! Other interesting uses for this include: * A Twitter alternative for closed working groups. * A microblogging tool that is machine-friendly. Use it for event logs! * Use as a journal in combination with other productivity tools. I'm installing this on OSX. You might have an easier time in- stalling on Linux or a relatively normal BSD variant. If you're running Windows, you are likely already familiar with the hoops that you will need to jump through. Technically, you don't need a client at all. You could write your twtxt.txt file by hand, but you will need to memorize how to write a RFC 3339 date-time string. You can also view other users' publicly-accessible twtxt.txt files without a heavy client, but a client will assemble a chronological timeline for you. Install twtxt On OSX, I used pip3 to install twtxt, just like it says in the in- structions. `$pip3 install twtxt` I also had to set the following: ` $export LC_ALL=en_US.UTF-8 $export LANG=en_US.UTF-8 ` I also added these lines to my .bash_profile. Then I ran `$twtxt quickstart` to initialize my configuration. Later, I ended up making some updates to my config. On OSX, the de- fault config lives in '~/Library/Application Support/twtxt/config'. With twtxt installed, I was able to update my twtxt.txt file, and follow other users. You can find a directory of other users at twtxt-dir[4]. Now you just need to make the file publicly accessi- ble. Install s3cmd I host my twtxt.txt file (and my website) in an AWS S3 bucket. I assume you already have an S3 bucket set up and a domain name reg- istered and the concomitant DNS configuration, um, configured. s3cmd[5] is a command-line interface that lets you manipulate ob- jects within your S3 buckets. AWS also publishes their own CLI tool, but I couldn't get it to install on OSX. s3cmd is a little more focused on S3 and possibly easier to configure. As part of configuring s3cmd, you will need to get an AWS applica- tion key[6]. This basically involves: 1. Creating a user group that has access to your S3 buckets. 2. Creating a user that can be added to this group. 3. Getting the access key and secret for the user you created and providing them to s3cmd through `$s3cmd --configure` The configuration process for s3cmd is a little inscrutable, but I took the defaults in most cases and I turned out fine in the end. To upload your twtxt file to S3, your command will look like this: `$s3cmd put twtxt.txt s3://(bucketname)` Now that you can upload your file to S3, set up post_tweet_hook in your twtxt config to execute this command. This will allow twtxt to automatically upload your twtxt.txt file automatically after you update your twtxt file. Add your URL to a registry Optionally, you can add your username and URL to a registry. There may be more of these as time goes on and more communities form around twtxt but, for now, the biggest one I've found is at http://twtxt.reednj.com[7]. See also we-are-twtxt[8]. In the spirit of decentralization, however, part of the fun will be evangelizing twtxt to your associates and following their feeds. One of the benefits of centralized services is easy discoverability. On the other hand, maybe being easily discovered is something you would prefer to avoid. A word on OSX and txtnish txtnish[9] is another popular client for twtxt. It has many of the same basic features of the twtxt client, but aims to be more porta- ble. It's a breeze to install and set up, but it didn't work for me right away. It turns out that OSX (and the BSDs) use a different version of awk than what is common in most Linux environments, BWK awk from System V. The txtnish client uses awk to parse the raw feeds when assembling the timeline. If awk doesn't behave as ex- pected, things will go awry. To fix this, we install GNU awk or gawk: `$brew install gawk` Then create an alias to it: `alias awk='/usr/local/bin/awk'` Also add this to your .bash_profile. As I write this, it's still not perfect, but using GNU awk goes a long way. [1]: http://twtxt.readthedocs.io/en/latest/index.html [2]: https://thoughtstreams.io/joeld/microblogging-with-rss/ [3]: http://solid.mit.edu [4]: http://twtxt.reednj.com/ [5]: https://github.com/s3tools/s3cmd [6]: https://aws.amazon.com/developers/access-keys/ [7]: http://twtxt.reednj.com/ [8]: https://github.com/mdom/we-are-twtxt [9]: https://github.com/mdom/txtnish