Instead of using mastodon-archive to download the posts from my GoToSocial account I should just write a little command line script that queries the database directly.

Hm.

alex@melanobombus> sqlite3 Documents/Sibirocobombus/home/gotosocial/sqlite.db sqlite> select s.created_at||char(10)||char(13) ||s.text||char(10)||char(13) ||'– '||a.display_name||char(10)||char(13) ||s.url||char(10)||char(13) from statuses s join accounts a on a.id = s.account_id where lower(s.text) like '%hippeastrum%' order by s.created_at;

This isn't so bad!

It's always weird how to learn about the data dictionary in SQLite. .tables lists all the tables, .schema thing gives you the statement that would have created the thing, i.e. it tells you what the columns and data types for a given table would be.

I guess this means I can replace my typical uses of mastodon-archive with half a dozen shell scripts each containing a SQL statement and a few lines of glue code. 🤔

@tetrislife Do you have a working example that would work on a Debian with swi-prolog-nox?

Follow

@alex sorry, fly-by suggestion, as it looked so Prolog-y!

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.