{"id":21823,"date":"2026-01-30T20:41:43","date_gmt":"2026-01-30T20:41:43","guid":{"rendered":"https:\/\/johnjohnston.info\/blog\/?p=21823"},"modified":"2026-01-30T21:11:17","modified_gmt":"2026-01-30T21:11:17","slug":"local-toot-archive","status":"publish","type":"post","link":"https:\/\/johnjohnston.info\/blog\/local-toot-archive\/","title":{"rendered":"Local Toot Archive"},"content":{"rendered":"\n<p>I used to love Martin Hawksey&#8217;s tweet archive which I used for quite a while and <a href=\"https:\/\/johnjohnston.info\/blog\/pushing-and-pulling-the-twitter-archive\/\">mirrored on the web<\/a>.<\/p>\n\n\n\n<p>Yesterday I was reading Alan&#8217;s post: <a href=\"https:\/\/cogdogblog.com\/2026\/01\/my-digital-cleanup-ifttt\/\">My Digital Cleanup: IFTTT \u2013 CogDogBlog<\/a> which explains how he now archives toots with make.com a sort of ifttt replacement. This sounds very useful. I&#8217;ve quite often failed looking for old toots with the mastodon interface.<\/p>\n\n\n\n<p>This made me think a bit. I&#8217;d been playing with json to sqlite for my flickr photos, <a href=\"https:\/\/pi.johnj.info\/onthisflickrday\/\">On this Flickr Day<\/a>. I wondered if I could do this with my toots too.<\/p>\n\n\n\n<p>Turns out I could take a very similar approach:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A bash script pulls down all my previous toots to a sqlite database.<\/li>\n\n\n\n<li>Another script updates the database.<\/li>\n\n\n\n<li>A php file provides a search and display.<\/li>\n\n\n\n<li>The search can be viewed in the browser using a simple php server.<\/li>\n<\/ol>\n\n\n\n<p>There are a few things that could be improved.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I&#8217;ve not used any authentication. So I just get public toots and boosts. That is all I want.<\/li>\n\n\n\n<li>The web page produced is pretty simple, if there is no search it shows all my toots. This is just over 1000 I probably need some pagination.<\/li>\n<\/ul>\n\n\n\n<p>I&#8217;ve a version running on my raspberry pi. <a href=\"https:\/\/pi.johnj.info\/toots\/\">Search Toots<\/a> this is organised slightly differently from the one I run locally on my mac. The scripts &amp; database are not directly in the public_html directory.<\/p>\n\n\n\n<p>I&#8217;ve put the files on github: <a href=\"https:\/\/github.com\/troutcolor\/localtoots#\">troutcolor\/localtoots<\/a> in case anyone is interested.<\/p>\n\n\n\n<p>I had a bit of AI help, bouncing ideas, tidying things up &amp; especially all of the getting the files on git hub. I&#8217;ve done this so rarely I&#8217;d no recall of how to do it.<\/p>\n\n\n\n<p><em>Featured Image: <a href=\"https:\/\/www.flickr.com\/photos\/biodivlibrary\/7048151449\/in\/photolist-bJPBSz-ayEY23-c5iUub-bBjxMY-a6WdEK-A5rHKm-c4kDeL-5z6v2R-27wiHsq-2mJnLag-2okhcuZ-wdsDB-2iUWJun-2m8AvkF-2kLUvR1-2jcXZ7K-2hN6b2g-wq6btQ-2hN7bMy-2m7ia7v-cHBBQA-2kBVNyL-2m8wxqg-2m46gUo-2kH1gqt-2kBVNtq-aBcKmp-2kDcT4z-2jFfbqM-2jFefPx-2m8hoYZ-2hN3v8a-2kGqYfv-2kBSfgH-2hN7cC1-disGZP-2kFaZhP-2hN6aoC-2hN6ab3-a7Uxus-2kGqYn9-abuzpr-2kUevdx-2hN6b9q-a7RF3X-2kZ3R2r-2jFfbPY-atGETh-cyaBUf-2jQaWZ6\">n92_w1150 | Dictionnaire universel d&#8217;histoire naturelle :. P\u2026 | Flickr<\/a> <a href=\"https:\/\/creativecommons.org\/publicdomain\/mark\/1.0\/deed.en\">Public domain<\/a> by <a href=\"https:\/\/www.flickr.com\/photos\/biodivlibrary\/\">Biodiversity Heritage Library<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I used to love Martin Hawksey&#8217;s tweet archive which I used for quite a while and mirrored on the web. Yesterday I was reading Alan&#8217;s post: My Digital Cleanup: IFTTT \u2013 CogDogBlog which explains how he now archives toots with make.com a sort of ifttt replacement. This sounds very useful. I&#8217;ve quite often failed looking [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":21824,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"mf2_syndication":["https:\/\/social.ds106.us\/@johnjohnston\/115985988913616120","https:\/\/bsky.app\/profile\/johnjohnston.info\/post\/3mdo63cnifp2q"],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[953],"tags":[957,1561,91,443,1046,1076],"post_format":[],"class_list":{"0":"post-21823","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-posse","8":"tag-ai","9":"tag-alan-levine","10":"tag-api","11":"tag-bash","12":"tag-martin-hawksey","13":"tag-mastodon","14":"kind-article","16":"h-entry","17":"hentry"},"better_featured_image":{"id":21824,"alt_text":"sepia Illustration of an Indian elephant with background structures and a smaller scene with another elephant and men. t from Dictionnaire universel d'histoire naturelle 1847","caption":"","description":"","media_type":"image","media_details":{"width":1200,"height":707,"file":"2026\/01\/7048151449_51fd30083d_k.png","filesize":127485,"sizes":{"medium":{"file":"7048151449_51fd30083d_k-620x365.png","width":620,"height":365,"mime-type":"image\/png","filesize":295778,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2026\/01\/7048151449_51fd30083d_k-620x365.png"},"large":{"file":"7048151449_51fd30083d_k-1024x603.png","width":1024,"height":603,"mime-type":"image\/png","filesize":717927,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2026\/01\/7048151449_51fd30083d_k-1024x603.png"},"thumbnail":{"file":"7048151449_51fd30083d_k-150x150.png","width":150,"height":150,"mime-type":"image\/png","filesize":38874,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2026\/01\/7048151449_51fd30083d_k-150x150.png"},"medium_large":{"file":"7048151449_51fd30083d_k-768x452.png","width":768,"height":452,"mime-type":"image\/png","filesize":436902,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2026\/01\/7048151449_51fd30083d_k-768x452.png"},"post-thumbnail":{"file":"7048151449_51fd30083d_k-668x394.png","width":668,"height":394,"mime-type":"image\/png","filesize":340166,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2026\/01\/7048151449_51fd30083d_k-668x394.png"},"sempress-image-post":{"file":"7048151449_51fd30083d_k-668x394.png","width":668,"height":394,"mime-type":"image\/png","filesize":340166,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2026\/01\/7048151449_51fd30083d_k-668x394.png"},"jetpack-portfolio-admin-thumb":{"file":"7048151449_51fd30083d_k-50x50.png","width":50,"height":50,"mime-type":"image\/png","filesize":5591,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2026\/01\/7048151449_51fd30083d_k-50x50.png"}},"image_meta":{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0","keywords":[]}},"post":21823,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2026\/01\/7048151449_51fd30083d_k.png"},"jetpack_featured_media_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2026\/01\/7048151449_51fd30083d_k.png","jetpack_shortlink":"https:\/\/wp.me\/p57zFQ-5FZ","jetpack_likes_enabled":false,"jetpack_sharing_enabled":true,"kind":false,"_links":{"self":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/21823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/comments?post=21823"}],"version-history":[{"count":2,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/21823\/revisions"}],"predecessor-version":[{"id":21826,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/21823\/revisions\/21826"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media\/21824"}],"wp:attachment":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media?parent=21823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/categories?post=21823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/tags?post=21823"},{"taxonomy":"post_format","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/post_format?post=21823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}