twtxt playground

twtxt playground

A playground for trying out integration between twtxt and weewiki.

Tweets from twtxt can be quoted using the function twtxt/quote. It can be found using the unix-epoch timestamp.

2019-09-25 07:44:29: Hello twtxt world

Tweets can use weewiki formatting:

2020-07-25 07:43:06: Wow! Inline Janet code does work. What a happy accident. Will use with the upmost restraint.

2020-07-25 07:49:31: Inline Janet means I should be able to make calls to functions defined in the config file. For example, the ref function is how I usually make wiki reference links. This link right here should take you to my automatically generated weewiki index of all the wiki pages.

Now that full-text search is enaged using fts5, it can now be possible to dynamically generate lists of tweets based on keywords. Below are all my twtxt tweets with the word SQLite. It was generated using the function twtxt/related-tweets. This takes in an optional limit amount to prevent things from overloading.

2021-02-09 14:07:24: a decentralized community (zet). individual zet feeds could be managed using something like git/git submodules, then built locally into self-contained SQLite files. zet items would be referenced by their zet nickname and UUID. #halfbakedideas
2021-01-19 17:00:53: user-defined order in SQL #sql #links maybe something that can be adapted to (sqlite)?
2020-09-16 10:14:53: huh. it seems that dumping + gzipping a SQLite database can sometimes have better compression than gzipping the SQLite database directly. cool. #sqlite
2020-08-24 14:14:31: A fragment of my (monolith) program has been woven to a (weewiki) from (worgle) using (sqlite). Find it for now at the monolith project page.
2020-08-03 20:13:57: (worgle) -> (sqlite) -> (worgmap) -> (weewiki) is kinda working?
2020-07-25 10:47:08: It turns out that fts5 is enabled by default on SQLite! My twtxt2sqlite generator has been updated to use fts5. Now I can do full text search on all my twtxt tweets. I have implemented a related-tweets box in the (twtxt_playground) as a proof-of-concept. More info on fts5 can be found at
2020-07-24 21:39:49: here is the script I use to convert my twtxt feed into a SQLite database: (twtxt_sqlite)
2020-07-24 13:17:49: a unique thing I do with my twtxt feed is convert it to a SQLite database. This, combined with the Janet + SQLite scripting abilities available in SQLite, could provide interesting metrics and insights over time.

Pretty neat!

Weewiki page references can be automatically made by prepending an exclamation point !like_this. As of now, only alphanumeric characters and underscores are valid characters. this is down to allow punctuation:

2020-07-26 21:11:46: parsing expression grammars coming in real clutch right now. punctuation can now exist after wiki reference tags. Thanks (janet)!

In order to quote a particular tweet, you'll need to know the timestamp. And in order to know the timestamp, some SQLite querying is needed.

Such a query could be found using the fts5"match" operator in SQlite.

In this case below, I'm trying to find a twtxt that talks about a particular text editor:

select time, message from twtxt where message MATCH 'text';

Once the right message has been found, the timestampe (encoded as a unix epoch integer) can be copied and used inside twtxt/quote.

home | index