Searchablebackupofmastodontoots
Note:thisprojectisnolongermaintained.Feelfreetouseyarfoxforanalternative.
(Itcancross-posttotwitter,anddoesnotdependonMongoDB...)
RequirementsPython3.6orhigher
MongoDBserverupandrunning
UsepipenvtoinstalltherestofPythondeps
SetupRuntheregister_appandgen_tokenscriptsCreatea~/.config/mastoback.ymllookinglike:#yourmastodoninstanceurl:"https://mamot.fr"auth:#generatedbytheaforementionedscripts.client_id:...client_secret:...access_token:...#Useforsearchindex_path:/some/writeable/pathUsageRunmastodbackfetchtofetchyourlatesttoots.
Usemastobacksearch<query>todisplaymatchingtoots.
$mastobacksearchlinksFound10results--------------------------------------------------------------------------------Newlinkaddedtohttps://dmerej.info/blog/pages/links/Daplie:https://daplie.com/https://mamot.fr/@dmerej/98947577777033562--------------------------------------------------------------------------------Newlinkaddedtohttps://dmerej.info/blog/pages/links/js2js:https://eleks.github.io/js2js/https://mamot.fr/@dmerej/3066566FAQWhy?BecauseIcan.
Whymongodb?I'mlazyandIwantedtostorethewholedatareturnedbytheMastodonAPI"justincase".Mongoisniceforthis.
WhyPython3.6only?BecauseIwantedtoplaywithmypyandIprefertypeannotationsto#type:comments
What'snext?Nothing.Ijustwantedasearchablebackupofmytootsfromthecommandline,soIdon'tthinkanynewfeatureneedstobeadded.
Icouldspendmoretimeontheconversionfromhtmltotextmaybe,butapartfromthatIconsiderthisprojectdone.
评论