twtxt is a decentralised, minimalist microblogging service for hackers.

Overview

twtxt

Latest version released on PyPi Build status of the master branch Test coverage Documentation Status Package license

twtxt is a decentralised, minimalist microblogging service for hackers.

So you want to get some thoughts out on the internet in a convenient and slick way while also following the gibberish of others? 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.

Demo

tl;dr: twtxt is a CLI tool, as well as a format specification for self-hosted flat file based microblogging.

Features

  • A beautiful command-line interface thanks to click.
  • Asynchronous HTTP requests thanks to asyncio/aiohttp and Python 3.
  • Integrates well with existing tools (scp, cut, echo, date, etc.) and your shell.
  • Don’t like the official client? Tweet using echo -e "`date +%FT%T%:z`\tHello world!" >> twtxt.txt!

Documentation

Check out the full documentation at: http://twtxt.readthedocs.org/en/latest/

Community

Contributions

License

twtxt is released under the MIT License. See the bundled LICENSE file for details.

Comments
  • Add # for comments in Feed

    Add # for comments in Feed

    Hello,

    it would be nice, if the client ignores lines starting with #. This way the feed format would be extensible with e.g. the date of creation or other meta fields (e.g. # nickname dracoblue is a hint for clients, who get it).

    question 
    opened by DracoBlue 37
  • Include user’s twtxt nick and URL in their user-agent string

    Include user’s twtxt nick and URL in their user-agent string

    Like proposed here: https://github.com/buckket/twtxt/issues/3#issuecomment-182738604 This allows searching the webserver’s access log for one’s followers.

    Format: twtxt/1.2.3 (+https://example.com/twtxt.txt; @somebody)

    Any other suggestions for the format we should use?

    enhancement 
    opened by buckket 12
  • Resolve Nicknames, which are Domains

    Resolve Nicknames, which are Domains

    I host a twtxt file at https://dracoblue.net/twtxt.txt

    If I reply to somebody like @buckket it's not clea if other people saved him as @buckket, too. Or a different person.

    Would it be possible to have something like @example.org resolves preferably to the person who hosts https://example.org/twtxt.txt?

    enhancement 
    opened by DracoBlue 12
  • Empty loop in get_remote_tweets leads to error (variable referenced before assignment)

    Empty loop in get_remote_tweets leads to error (variable referenced before assignment)

    > twtxt timeline
    Traceback (most recent call last):
      File "/usr/bin/twtxt", line 9, in <module>
        load_entry_point('twtxt==1.2.1', 'console_scripts', 'twtxt')()
      File "/usr/lib/python3.4/site-packages/click/core.py", line 716, in __call__
        return self.main(*args, **kwargs)
      File "/usr/lib/python3.4/site-packages/click/core.py", line 696, in main
        rv = self.invoke(ctx)
      File "/usr/lib/python3.4/site-packages/click/core.py", line 1060, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/lib/python3.4/site-packages/click/core.py", line 889, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/lib/python3.4/site-packages/click/core.py", line 534, in invoke
        return callback(*args, **kwargs)
      File "/usr/lib/python3.4/site-packages/click/decorators.py", line 17, in new_func
        return f(get_current_context(), *args, **kwargs)
      File "/usr/lib/python3.4/site-packages/twtxt/cli.py", line 126, in timeline
        tweets = get_remote_tweets(sources, limit, timeout, cache)
      File "/usr/lib/python3.4/site-packages/twtxt/twhttp.py", line 123, in get_remote_tweets
        return tweets
    UnboundLocalError: local variable 'tweets' referenced before assignment
    

    This started after I added a few new follow urls, I don't know which one does that, will try to find out.

    bug waiting 
    opened by kdave 11
  • Support for RSS and Atom feeds

    Support for RSS and Atom feeds

    A lot of websites already provide feeds in RSS or Atom format. Popular browsers, like Mozilla Firefox, Microsoft Internet Explorer or Safari include features to view such feeds and subscribe to them. Using the Python feedparser module twtxt could be used to subscribe to such a feed without lots of additional code.

    This would also sidestep any debate regarding embedded media, metadata etc. as those who want metadata could always just provide Atom feeds (RSS is less capable). I have written a script to convert twtxt files to Atom feeds which could be patched for more metadata if so desired: http://news.dieweltistgarnichtso.net/bin/twtxt2atom

    enhancement 
    opened by erlehmann 11
  • Increase default message size

    Increase default message size

    140 characters is an archaic limitation that twitter only used so that single tweets could fit in an SMS. it's equivalent to not allowing lines of source code over 80 characters because then they won't fit on a punch card. Even doubling it, or 256 characters, would be an awesome improvement.

    question 
    opened by ghost 9
  • Follower url works in browser, does not in twtxt

    Follower url works in browser, does not in twtxt

    HTTP:

    twtxt -v follow mdom http://www.domgoergen.com/twtxt.txt
    ...
    twtxt.twhttp DEBUG    400, message='deflate'
    

    HTTPS

    ...
    twtxt.twhttp DEBUG    hostname 'www.domgoergen.com' doesn't match either of '*.kasserver.com', 'kasserver.com'
    

    works in the browser.

    enhancement question 
    opened by kdave 8
  • Updated Docstrings

    Updated Docstrings

    Hello buckket,

    I updated the docstrings of the twtxt/config.py because all the :param where missing. Also added a docstring for models.Source and added a newline to the end of main.py to follow PEP8.

    I look forward to contribute more in the future. Altoyyr

    opened by JDurstberger 8
  • Config file sanity checking, better error reporting

    Config file sanity checking, better error reporting

    I did a stupid typo Fasle instead of False in the config. This is reported as raw python exception. It would be good to print at least the line, or eg. the expected value type. The overall config sanity could look for uknown key names.

    enhancement 
    opened by kdave 8
  • Evil escape sequences

    Evil escape sequences

    Just a warning for those of you who are writing twtxt terminal clients: Please visit https://mosh.mit.edu/ and search for “Careful terminal emulation”. While we still ought to allow unicode, we should probably think about sanitizing each tweet before displaying it.

    ~@kas

    bug enhancement 
    opened by kseistrup 8
  • Add support of Python 3.7+

    Add support of Python 3.7+

    Problem: Generator-based coroutines are deprecated and scheduled for removal in Python 3.11 (docs). Due to that, twtxt doesn't work with Python 3.7+.

    Solution: I have changed gererator-based coroutines to async-def coroutines. Other dependencies have also been updated to current versions. Important: breaking changes, won't work with Python 3.6 or lower.

    Passed tests: https://github.com/win0err/twtxt/actions/runs/2009500872 I'll create a PR with integration with GitHub Actions in a separate PR.

    Closes #140, closes #141, closes #161, closes #162, closes #163

    P.S. Please, test the changes manually.

    enhancement 
    opened by win0err 7
  • Manually changing a nick will will not be noticed by the cache

    Manually changing a nick will will not be noticed by the cache

    When changing a nick in the [followings] section of the the config file it will not be picked up by the timeline command unless the cache for that entry is marked as stale, which only happens when the twtxt file changes.

    Solution: Always used the nick specified in the config file.

    bug 
    opened by buckket 0
  • Development environment pollution / using contained venvs

    Development environment pollution / using contained venvs

    Context

    Currently, running tests and installing the app requires the developer to install packages on the host directly, polluting the system with globally installed packages. This also implies that packages installed in the global scope could pollute the working environment. It would be neat if there was more isolation between twtxt and the machine used to run tests / develop on it.

    Proposed solution

    I would be tempted to add a bootstrapping script that would create a venv in which dev requirements and the app itself would be installed. This would ensure some isolation when iterating, as well as guarantee that we don't leak dependencies into the host system when someone sets everything up to run tests, lint or play around with the package.

    Something following the general pattern of the Scripts to Rule Them All feels appealing and could feature a bootstrapping script that sets up a venv (if one doesn't already exists) and installs dependencies in it.

    This would also make it easier to enforce something like a .python-version file to explicitly state what Python version development should happen in (i.e. anything >=3.7, based on the setup.py annotations).

    As a side-benefit, it would also help standardize what is being installed in CI (since we could leverage it the frozen dev requirements instead of manually installing select packages and opening the door to human error / drift in requirements).

    I'd be happy to put that together and push it up if there's interest!

    opened by mcataford 0
  • Can't install twtxt

    Can't install twtxt

    using python installed through chocolatey. Windows 10

    Installing collected packages: twtxt
      WARNING: Failed to write executable - trying to use .deleteme logic
    ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 'C:\\Python310\\Scripts\\twtxt.exe' -> 'C:\\Python310\\Scripts\\twtxt.exe.deleteme'
    
    bug 
    opened by Obspogon 1
  • Suggestion: a convention for multiline statuses (line breaks)

    Suggestion: a convention for multiline statuses (line breaks)

    I would like to propose to a convention for multiline status updates or newlines in the twtxt format. The convention is backwards compatible with clients that do not support it. The conventions is: when the client sees a sequence of statuses with the same timestamp, join their text with a newline. A feed following this convention looks reasonable in a client that does not understand it as long as the client displays statues with the same timestamp in the order they appear.

    For example, twtxt currently renders

    1845-01-29T12:00:00Z	Once upon a midnight dreary, while I pondered, weak and weary,
    1845-01-29T12:00:00Z	Over many a quaint and curious volume of forgotten lore—
    1845-01-29T12:00:00Z	    While I nodded, nearly napping, suddenly there came a tapping,
    1845-01-29T12:00:00Z	As of some one gently rapping, rapping at my chamber door.
    1845-01-29T12:00:00Z	“’Tis some visitor,” I muttered, “tapping at my chamber door—
    1845-01-29T12:00:00Z	            Only this and nothing more.”
    

    as

    ➤ http://127.0.0.1:8081/poe.txt (175 years ago):
    Once upon a midnight dreary, while I pondered, weak and weary,
    
    ➤ http://127.0.0.1:8081/poe.txt (175 years ago):
    Over many a quaint and curious volume of forgotten lore—
    
    ➤ http://127.0.0.1:8081/poe.txt (175 years ago):
    While I nodded, nearly napping, suddenly there came a tapping,
    
    ➤ http://127.0.0.1:8081/poe.txt (175 years ago):
    As of some one gently rapping, rapping at my chamber door.
    
    ➤ http://127.0.0.1:8081/poe.txt (175 years ago):
    “’Tis some visitor,” I muttered, “tapping at my chamber door—
    
    ➤ http://127.0.0.1:8081/poe.txt (175 years ago):
    Only this and nothing more.”
    

    If support for this convention was implemented, twtxt could render the same file as

    ➤ http://127.0.0.1:8081/poe.txt (175 years ago):
    Once upon a midnight dreary, while I pondered, weak and weary,
    Over many a quaint and curious volume of forgotten lore—
    While I nodded, nearly napping, suddenly there came a tapping,
    As of some one gently rapping, rapping at my chamber door.
    “’Tis some visitor,” I muttered, “tapping at my chamber door—
    Only this and nothing more.”
    

    I have implemented the convention in my twtxt.tcl library and GUI feed reader. I have also made a page explaining it (pretty much like this issue does).

    What do you think?

    enhancement 
    opened by dbohdan 0
  • AUR package no longer working

    AUR package no longer working

    Traceback (most recent call last):
      File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 584, in _build_master
        ws.require(__requires__)
      File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 901, in require
        needed = self.resolve(parse_requirements(requirements))
      File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 792, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.ContextualVersionConflict: (click 7.1.1 (/usr/lib/python3.8/site-packages), Requirement.parse('click<7,>=6.7'), {'twtxt'})
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/bin/twtxt", line 6, in <module>
        from pkg_resources import load_entry_point
      File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3255, in <module>
        def _initialize_master_working_set():
      File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3238, in _call_aside
        f(*args, **kwargs)
      File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3267, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 586, in _build_master
        return cls._build_from_requirements(__requires__)
      File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 599, in _build_from_requirements
        dists = ws.resolve(reqs, Environment())
      File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 787, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'click<7,>=6.7' distribution was not found and is required by twtxt
    
    bug 
    opened by treeshateorcs 3
Releases(v1.3.1)
  • v1.3.1(Nov 12, 2022)

  • v1.3.0(Nov 12, 2022)

  • v1.2.3(Sep 28, 2017)

  • v1.2.2(Sep 26, 2017)

  • v1.2.1(Feb 16, 2016)

    • Fixed a bug in the mention handling code
    • Nicks are now case-insensitive throughout twtxt
    • Added a character_limit option, to specify when to shorten tweets
    • Added option to include user’s nick and url in twtxt’s user-agent string for greater discovery
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Feb 12, 2016)

    • twtxt package is now executable
    • twtxt is now available as wheel archive
    • Check status of feed before following a new source
    • Added a source option to timeline command to only show one specific source
    • Added a view command which is basically an alias for the source option
    • Added support for local caching of remote twtxt files
    • Added support for mentions, see README.rst for more information
    • Added a pre_tweet_hook option, works like post_tweet_hook
    • Added a porcelain option, styles output script-friendly
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Feb 7, 2016)

    • Ignore status updates coming form the future.
    • Improved timestamp format by by removing microseconds and using local time.
    • Get confirmation before overwriting an existing source.
    • Allow tweet command to read from stdin. (echo "Test" | twtxt tweet)
    • Allow tweet command to accept unlimited amount of arguments. (twtxt tweet This is also valid)
    • Added an option to change the timeline sorting.
    • Added an option to specify max wait time for HTTP requests.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Feb 7, 2016)

  • v1.0.0(Feb 7, 2016)

allow windows programs to call dssp/mkdssp command from wsl; rework biopython on windows (PDB -> dssp -> fasta)

dssp-wsl Converting PDB (Protein Data Bank) file format to DSSP file format is required for generating datasets of peptides and their secondary struct

Taine Zhao 1 Feb 23, 2022
Hasan Can Kaya - Konusanlar Ticket Notifier

Hasan Can Kaya - Konusanlar Ticket Notifier This script sends a notification to any telegram chat/group/channel when added a new available ticket to b

omer citak 3 Jan 31, 2022
Jupyter notebooks and AWS CloudFormation template to show how Hudi, Iceberg, and Delta Lake work

Modern Data Lake Storage Layers This repository contains supporting assets for my research in modern Data Lake storage layers like Apache Hudi, Apache

Damon P. Cortesi 25 Oct 31, 2022
POC de uma AWS lambda que executa a consulta de preços de criptomoedas, e é implantada na AWS usando Github actions.

Cryptocurrency Prices Overview Instalação Repositório Configuração CI/CD Roadmap Testes Overview A ideia deste projeto é aplicar o conteúdo estudado s

Gustavo Santos 3 Aug 31, 2022
Scuttlecrab.py - Python Version of Scuttle Crab Bot

____ _ _ _ ____ _ / ___| ___ _ _| |_|

Fabrizo 4 Jul 08, 2022
Telegram client written in GTK & Python

Meowgram GTK Telegram Client 🐱 Why Meogram? Meowgram = Meow + Gram :D Meow - Talking cats sound. It's a symbol of unique and user friendly UI of clie

Artem Prokop 71 May 04, 2022
Powerful Telegram Maintained UserBot in Telethon

Fire-X UserBot The Awaited Bot Fire-X userbot The Most Powerful Telegram Userbot. This Userbot is Safe to use in Your Telegram Account. It is not like

22 Oct 21, 2022
Discord Bot Sending Members - Leaked by BambiKu ( Me )

Wokify Bot Discord Bot Sending Members - Leaked by BambiKu ( Me ) Info The Bot was orginaly made by someone else! Ghost-Dev just wanted to sell "priva

bambiku 6 Jul 05, 2022
HinamiRobot - Telegram Group Manager Bot Written In Python Using Pyrogram

✨ HINAMI CHAN ✨ Telegram Group Manager Bot Written In Python Using Pyrogram. Rea

DARK LEGEND088 2 Jan 27, 2022
A userbot made for telegram

𝚃𝙷𝙴 𝙼𝙰𝙵𝙸𝙰𝙱𝙾𝚃 This is a userbot made for telegram. I made this userbot with help of all other userbots available in telegram. All credits go

MafiaBotOP 8 Apr 08, 2022
Simple progressbar for discord

⚙️ DiscordProgressbar 📂 Установка | Installation pip install discordbar 📚 Документация | Documentation 📞 Связаться со мной | Сontact with me 📜 Ли

DenyS 26 Nov 30, 2022
The unofficial Amazon search CLI & Python API

amzSear The unofficial Amazon Product CLI & API. Easily search the amazon product directory from the command line without the need for an Amazon API k

Asher Silvers 95 Nov 11, 2022
🐍 The official Python client library for Google's discovery based APIs.

Google API Client This is the Python client library for Google's discovery based APIs. To get started, please see the docs folder. These client librar

Google APIs 6.2k Jan 08, 2023
A Python library to access Instagram's private API.

Instagram Private API A Python wrapper for the Instagram private API with no 3rd party dependencies. Supports both the app and web APIs. Overview I wr

2.6k Jan 05, 2023
A multi-password‌ cracking tool that can help you hack facebook accounts very quickly

FbCracker This is a multi-password‌ cracking tool that can help you hack facebook accounts very quickly. Facebook Hacking Tool Installation On Termux

ReD H4CkeR 9 Nov 16, 2022
Resources for the AMLD 2022 workshop "DevOps on AWS"

MLOPS on AWS | AMLD 2022 This repository contains all the resources necessary to follow along and reproduce the workshop "MLOps on AWS: a Hands-On Tut

xtream 8 Jun 16, 2022
Discord Token Nuker With Python

Discord token nuker a.k.a A$$Fvcker Setup For installing the requirements do this: pip install -r requirements.txt To start the Token nuker run this

PR3C14D0 8 Sep 22, 2022
Telegram Music Bot for YouTube/SoundCloud/Mixcloud

Telegram Music Bot Telegram Music Bot for YouTube/SoundCloud/Mixcloud This bot downloads and sends the audio when someone send a YouTube/SoundCloud/Mi

Calls Music 76 Jan 02, 2023
Twitter bot code can be found in twitterBotAPI.py

NN Twitter Bot This github repository is BASED and is yanderedev levels of spaghetti Neural net code can be found in alexnet.py. Despite the name, it

167 Dec 19, 2022
Github repository started notify 💕

Github repository started notify 💕

4 Aug 06, 2022