All Projects β†’ mdom β†’ Txtnish

mdom / Txtnish

Licence: gpl-3.0
A twtxt client with minimal dependencies

Programming Languages

shell
77523 projects
shellscript
22 projects

Labels

Projects that are alternatives of or similar to Txtnish

Fusell Seed
FUSE (the low-level interface) file system boilerplate πŸ“‚ πŸ”Œ πŸ’Ύ
Stars: ✭ 9 (-90.53%)
Mutual labels:  posix
Flag2
A more traditional flag library for the go programming language
Stars: ✭ 38 (-60%)
Mutual labels:  posix
Skalibs
The skarnet.org C system programming library
Stars: ✭ 58 (-38.95%)
Mutual labels:  posix
Goat
POSIX-compliant shell movement boosting hack for real ninjas (aka `cd x` and `cd ...`)
Stars: ✭ 27 (-71.58%)
Mutual labels:  posix
Posnk
An operating system project.
Stars: ✭ 34 (-64.21%)
Mutual labels:  posix
Moosefs
MooseFS – Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System (Software-Defined Storage)
Stars: ✭ 1,025 (+978.95%)
Mutual labels:  posix
Shpy
πŸ•΅οΈβ€β™€οΈ POSIX compliant spies and stubs for shell unit testing
Stars: ✭ 5 (-94.74%)
Mutual labels:  posix
Libfiu
A C library for fault injection [mirror]
Stars: ✭ 91 (-4.21%)
Mutual labels:  posix
Fiwix
A UNIX-like kernel for the i386 architecture
Stars: ✭ 38 (-60%)
Mutual labels:  posix
Posix tz db
Generates POSIX timezones strings
Stars: ✭ 57 (-40%)
Mutual labels:  posix
Tokio File Unix
Asynchronous support for epollable files via Tokio on Unix-like platforms
Stars: ✭ 29 (-69.47%)
Mutual labels:  posix
Awesome Unix
All the UNIX and UNIX-Like: Linux, BSD, macOS, Illumos, 9front, and more.
Stars: ✭ 973 (+924.21%)
Mutual labels:  posix
Dennix
Dennix is a unix-like hobbyist operating system written from scratch.
Stars: ✭ 53 (-44.21%)
Mutual labels:  posix
Rsyslog
An R interface to syslog, the POSIX system logger API
Stars: ✭ 21 (-77.89%)
Mutual labels:  posix
Time
A simplified approach to working with dates, times, and time zones.
Stars: ✭ 83 (-12.63%)
Mutual labels:  posix
Shbib
A BibTeX-centric bibliography manager written in POSIX shell
Stars: ✭ 26 (-72.63%)
Mutual labels:  posix
Stdex
std C++ 11 library impementation with extra features using only C++ 98 and POSIX threads
Stars: ✭ 43 (-54.74%)
Mutual labels:  posix
Gdrive Downloader
Download a gdrive folder or file easily, shell ftw.
Stars: ✭ 91 (-4.21%)
Mutual labels:  posix
Mazu Editor
a minimalist text editor with syntax highlight, copy/paste, and search
Stars: ✭ 88 (-7.37%)
Mutual labels:  posix
Parsrs
CSV, JSON, XML text parsers and generators written in pure POSIX shellscript
Stars: ✭ 56 (-41.05%)
Mutual labels:  posix

txtnish

A twtxt client with minimal dependencies

Synopsis

$ txtnish follow bob http://example.com/twtxt.txt
$ txtnish tweet 'Hello twtxt world'
$ txtnish timeline

Description

txtnish is a client for twtxt–the decentralised, minimalist microblogging service for hackers.

Instead of signing up at a closed and/or regulated microblogging platform, getting your status updates out with twtxt is as easy as putting them in a publicly accessible text file. The URL pointing to this file is your identity, your account. twtxt then tracks these text files, like a feedreader, and builds your unique timeline out of them, depending on which files you track. The format is simple, human readable, and integrates well with UNIX command line utilities.

All subcommands of txtnish provide extensive help, so don't hesitate to call them with the -h option.

If you are a new user, there is a quickstart command that will ask you some questions and write a configuration file for you:

$ txtnish quickstart

Installation

txtnish only depends on tools you normally find in a POSIX environment: awk, sort, cut and sh. There are only two exceptions: you need curl to download twtxt files and a xargs that support parallel processing via -P. You can use a xargs without, but then txtnish falls back to downloading one url after another.

Installation itself is as easy as it gets: just copy the script somewhere in your PATH.

Subcommands

tweet

Appends a new tweet to your twtxt file. There are three different ways to input tweets. You can either pipe them into tweet, or pass them along as arguments. When you call txtnish tweet without any arguments and it's not connected to a pipe, it will call $EDITOR for you and tweet any line as a separate tweet.

timeline

Retrieves your personal timeline.

publish

Publishes your twtfile. This is especially helpful after you changed your post_tweet_hook.

follow

Adds a new source to your followings.

unfollow

Removes an existing source from your followings.

following

Prints the list of the sources you're following.

reply

Displays an outcommented version of your timeline in $EDITOR. Every line that is not commented after you saved and exited the editor, will be tweeted.

Search tweets

You can provide a search expression to filter your timeline with the flag -S. The search expression is an awk conditional with four predefined variables:

  • msg: the message itself
  • url: the url of the twtfile
  • nick: this nick associated with the url
  • ts: the timestamp of the message

Examples:

txtnish timeline -S 'nick == "mdom" && msg ~ /#twtxt/'

Configuration

At startup txtnish checks whether ~/.config/txtnish/config exists and will source it if it exists. The configuration file must be a valid shell script.

General

add_metadata

Add metadata to twtxt file. Default to 0 (false).

awk

Path to the awk binary. Defaults to awk.

sed

Path to the sed binary. Defaults to sed.

limit

How many tweets should be shown in timeline. Defaults to 20.

formatter

Defined which command is used to wrap each tweet to fit on the screen. It defaults to fold -s.

sort_order

How to sort tweets. This option can be either ascending or descending. ascending prints the oldest tweet first, descending the newest. This value can be overridden with the -d and -a flags.

timeout

Maximum time in seconds that each http connection can take. Defaults to zero.

use_color

If the output should be colorized with ANSI escape sequences. See the section COLORS on how to change the color settings. Defaults to 1.

pager

Which pager to use if use_pager is enabled. Default to less -R in order to display colors. This can be toggled with -p or -P to enable or disable the pager. Defaults to 1.

disclose_identity

If set to 1, send your nick and twturl with every http request. This makes only sense if you also set twturl and nick. Defaults to 0.

nick

Your nick. This is used to collapse mentions of your twturl and is send to all feeds you're following if disclose_identity is set to 1. Defaults to the environment variable $USER.

twturl

The url of your feeds. This is used to collapse mentions and is send to all feeds you're following if disclose_identity is set to 1. Defaults to the environment variable $USER.

always_update

Always update all feeds before showing tweets. If you set this variable to 0, you need to update manually with the update command.

http_proxy

Sets the proxy server to use for HTTP.

https_proxy

Sets the proxy server to use for HTTPS.

sign_twtfile

If set to 1, sign the twtfile with pgp. Defaults to 0.

In case you are also overwriting the post_tweet_hook note that this will create a signed file in a temporary directory and change the value of twtfile accordingly. Your twtfile will not be changed!

Signing your twtfile might break some twtxt clients as lines without a TAB are not allowed by a strict reading of the spec.

check_signature

Verify pgp signatures and show the result in the timeline if set to 1. Defaults to 0.

sign_user

Sets a different local user to sign twtfile than what is the default. It will print a message indicating an override is in place.

gpg_bin

Sets custom name of gpg executable.

ipfs_gateway

When you subscribe to an ipns:// address, txtnish will call this gateway to get the users twtfile. Defaults to http://localhost:8080 and falls back to https://ipfs.io if txtnish can't reach the gateway.

Publish with scp

scp_user

Use the given username to connect to the remote server. Required to publish with scp.

scp_host

Copy twtfile to this host. Required to publish with scp.

scp_remote_name

Name of twtfile on remote host. Defaults to the basename of the twtfile.

sftp_over_scp

Use SFTP instead of SCP if set to 1.

Publish with ftp

ftp_user

Use the given username to connect to the remote server. Required to publish with ftp.

ftp_host

Copy twtfile to this host. Required to publish with ftp.

ftp_remote_name

Name of twtfile on remote host. Defaults to the basename of the twtfile.

Publish with IPFS

ipfs_publish

Publish the twtfile with ipfs if set to 1. Defaults to 0.

You will need the ipfs tools and a running daemon to publish to ipfs.

ipfs_wrap_with_dir

Call ipfs add with --wrap-with-dir if set to 1. Defaults to 0.

ipfs_recursive

Call ipfs add with --recursive if set to 1. The complete directory of your twtfile will be published. Defaults to 0.

Colors

If use_color is set to 1, the nick, timestamp, mentions and hashtags will be colorized. txtnish recognizes black, red, green, yellow, blue, magenta, cyan and white. You can set the background color with the prefix on_.

color_nick="yellow on_white"

Additional a color definiation can specify the attributes bold, bright, faint, italic, underline, blink and fastblink if your terminal supports them.

color_nick="yellow on_white blink"

The order of colors and attributes doesn't matter and multiple attributes can be combined.

txtnish uses the following defaults.

color_nick=yellow
color_time=blue
color_mention=cyan
color_hashtag=yellow

Hooks

To customize the behaviour of txtnish the user can override functions.

pre_tweet_hook

This hook is called before a new tweet is appended to your twtfile. This can be useful if you're using txtnish on multiple devices and want to update your local twtfile before appending to it. There's a predefined function sync_twtfile that does exactly that.

pre_tweet_hook () {
	sync_twtfile
}

post_tweet_hook

post_tweet_hook is called after txtnish has appended new tweets to your twtfile. It's a good place to uploade your file somewhere.

post_tweet_hook () {
	gist -u ID -f "$twtfile"
}

filter_tweets_hook

See also

twtxt, we-are-twtxt

License

Copyright 2017 Mario Domgoergen [email protected]

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].