mastodon-apodAstronomy Picture of the Day bot

联合创作 · 2023-09-30 01:33

mastodon-apod

it's a mastodon bot that posts the most recent image from NASA's Astronomy Picture of the Day

it uses ananas

how to use

  • (optional) create a venv to isolate dependencies from the system

    $ python -m venv venv
    $ source venv/bin/activate
    
  • install dependencies

    $ pip install -r requirements.txt
    
  • fill in config file

    $ cp config/ananas.cfg.example config/ananas.cfg
    $ $EDITOR config/ananas.cfg
    
  • run

    $ ananas config/ananas.cfg
    
  • enjoy

how to use (docker)

  • fill in config file

    $ cp config/ananas.cfg.example config/ananas.cfg
    $ $EDITOR config/ananas.cfg
    
  • build

    $ docker build -t mastodon-apod .
    $ # or, shortened:
    $ make docker
    
  • stop and remove potential existing container

    $ docker rm -f mastodon-apod
    $ # or, shortened:
    $ make docker-rm
    
  • and run

    $ docker run -n mastodon-apod -d --restart unless-stopped -v $(pwd)/config:/app/config --user $(id -u) mastodon-apod
    $ # or, shortened:
    $ make docker-run
    

these last three steps can be run at once with

$ make up
浏览 3
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报