Giter Club home page Giter Club logo

ao3-rss's Introduction

AO3 RSS

This Flask app can be used to serve RSS and Atom feeds for works and series from Archive of Our Own (AO3).

Quick Start

Docker

The Docker image uses a Gunicorn server.

docker run --detach --publish 127.0.0.1:8000:8000 ghcr.io/kthchew/ao3-rss:latest

Or, use a docker-compose.yml file:

version: '3'

services:
  ao3-rss:
    image: ghcr.io/kthchew/ao3-rss:latest
    ports:
      - "127.0.0.1:8000:8000"
    restart: unless-stopped

Then go to http://127.0.0.1:8000/works/<work_id> or http://127.0.0.1:8000/series/<series_id>. These will output Atom feeds. If you need RSS, you can just add /rss to the end: http://127.0.0.1:8000/works/<work_id>/rss.

Environment Variables

You can set environment variables in the Docker container to change the web server's behavior.

Variable Default Value Description
ADDRESS 0.0.0.0 IP Address An IP address to bind to (e.g. 0.0.0.0 to bind to all interfaces)
PORT 8000 Port A port to bind to
GUNICORN_CMD_ARGS unset Any arguments Additional arguments you wish to pass to Gunicorn

Development

For development purposes, you can also just use flask run:

git clone https://github.com/kthchew/ao3-rss.git
cd ao3-rss
pip install -r requirements.txt
FLASK_APP=ao3_rss.server flask run

Usage

Request Description Example Notes
GET /works/<work_id>
GET /works/<work_id>/atom
Get an Atom feed of the latest chapters from a work http://127.0.0.1:8000/works/<work_id>
GET /works/<work_id>/rss Get an RSS feed of the latest chapters from a work http://127.0.0.1:8000/works/<work_id>/rss
GET /series/<series_id>
GET /works/<work_id>/atom
Get an Atom feed of the latest works from a series http://127.0.0.1:8000/series/<series_id> Add ?exclude_explicit=true at the end of the URL to exclude explicit works from the feed
GET /series/<series_id>/rss Get an RSS feed of the latest works from a series http://127.0.0.1:8000/series/<series_id>/rss Add ?exclude_explicit=true at the end of the URL to exclude explicit works from the feed

Configuration

You can use environment variables to configure how ao3-rss makes feeds.

Variable Default Value Description
AO3_CHAPTERS_IN_WORK_FEED 25 Integer between 1 and 100 The maximum number of chapters that should appear in a feed for a work (GET /works/<id>)
AO3_WORKS_IN_SERIES_FEED 1 Integer between 1 and 100 The maximum number of works that should appear in a feed for a series (GET /series/<id>)
AO3_BLOCK_EXPLICIT False Boolean Enforce ?exclude_explicit=true for all series feeds, and do not generate work feeds for explicit works
AO3_WORK_CACHE_SIZE 128 0 or positive integer The maximum number of feeds to keep in the cache. Note that Atom and RSS use separate caches, but both use this value. Set to 0 to disable.
AO3_WORK_CACHE_TTL 3600 (1 hr) 0 or positive integer The amount of time, in seconds, before a work feed in the cache should expire. Note that Atom and RSS use separate caches, but both use this value.
AO3_SERIES_CACHE_SIZE 2048 0 or positive integer The maximum number of feeds to keep in the cache. Note that Atom and RSS use separate caches, but both use this value. Set to 0 to disable.
AO3_SERIES_CACHE_TTL 14400 (4 hr) 0 or positive integer The amount of time, in seconds, before a series feed in the cache should expire. Note that Atom and RSS use separate caches, but both use this value.

ao3-rss's People

Contributors

kthchew avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.