mastoback

授权协议 Readme
开发语言 JavaScript
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 林俊晖
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

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.