Skip to content
This repository has been archived by the owner on Aug 3, 2018. It is now read-only.
/ mastoback Public archive

Searchable backup of mastodon toots in the command line

Notifications You must be signed in to change notification settings

dmerejkowsky/mastoback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mastoback

Searchable backup of mastodon toots

Note: this project is no longer maintained. Feel free to use yarfox for an alternative.

(It can cross-post to twitter, and does not depend on MongoDB ...)

Requirements

Python 3.6 or higher

MongoDB server up and running

Use pipenv to install the rest of Python deps

Setup

  • Run the register_app and gen_token scripts
  • Create a ~/.config/mastoback.yml looking like:
# your mastodon instance
url: "https://mamot.fr"

auth:
  # generated by the aforementioned scripts.
  client_id: ...
  client_secret: ...
  access_token: ...

# Use for search
index_path: /some/writeable/path

Usage

Run mastodback fetch to fetch your latest toots.

Use mastoback search <query> to display matching toots.

$ mastoback search links
Found 10 results
--------------------------------------------------------------------------------
New link added to https://dmerej.info/blog/pages/links/
Daplie: https://daplie.com/
https://mamot.fr/@dmerej/98947577777033562

--------------------------------------------------------------------------------
New link added to https://dmerej.info/blog/pages/links/
js2js: https://eleks.github.io/js2js/
https://mamot.fr/@dmerej/3066566

FAQ

  • Why ?

Because I can.

  • Why mongodb ?

I'm lazy and I wanted to store the whole data returned by the Mastodon API "just in case". Mongo is nice for this.

  • Why Python 3.6 only ?

Because I wanted to play with mypy and I prefer type annotations to # type: comments

  • What's next ?

Nothing. I just wanted a searchable backup of my toots from the command line, so I don't think any new feature needs to be added.

I could spend more time on the conversion from html to text maybe, but apart from that I consider this project done.

About

Searchable backup of mastodon toots in the command line

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages