|
1 | 1 | ``audio-feeder`` is a Flask-based web-app that hosts your audiobooks (or other audio content) as RSS feeds compatible with podcatchers.
|
2 | 2 |
|
3 |
| -Installation |
4 |
| -============ |
5 |
| -Currently, there is no installer that will install things "correctly", so you should look into the proper way to deploy this web app. In 'development mode', you can install it using these steps: |
| 3 | +Features |
| 4 | +======== |
| 5 | + |
| 6 | +.. image:: docs/images/screenshots/list_entry_p0.jpg |
| 7 | + :width: 800px |
| 8 | + :alt: The main list interface |
| 9 | + |
| 10 | +The main interface lists all your audiobooks once the database is updated (either by using ``audio-feeder update`` or by visiting the ``/update`` url. The default interface should also work well on mobile: |
| 11 | + |
| 12 | +.. image:: docs/images/screenshots/list_mobile.jpg |
| 13 | + :width: 400px |
| 14 | + :alt: The mobile list interface |
| 15 | + |
| 16 | +Rendered feeds |
| 17 | +************** |
| 18 | +For each entry, ``audio-feeder`` can also generate "rendered" feeds, depending on what metadata is available: |
| 19 | + |
| 20 | +- Single file: This feed consists of a single file; if the original directory contains multiple files, they will be merged together using ``ffmpeg``. If chapter information is not available in the original files, each file will be considered a separate "chapter". |
| 21 | + |
| 22 | +- Chapters: This feed has one file per chapter; it is only available if explicit chapter metadata is available in the file (e.g. in an ``m4b`` file, or using Overdrive MediaMarkers). |
| 23 | + |
| 24 | +- Segmented: This is a feed that splits up and recombines files in such a way as to create files that are ~1 hour long (preferring longer files to shorter files). Files will only be split up along chapter boundaries, but they can be combined from files without chapter information. This mode is available if the original entry has more than one file, or if it has chapter information (or both). |
| 25 | + |
| 26 | +QR Codes |
| 27 | +******** |
| 28 | + |
| 29 | +Each feed has an associated QR code, so that you can easily browse the list from a computer, but scan the individual feeds from your phone. In the default front-end, QR codes are displayed via modal pop-ups: |
| 30 | + |
| 31 | + |
| 32 | +.. image:: docs/images/screenshots/list_p0_qr.jpg |
| 33 | + :width: 800px |
| 34 | + :alt: Demonstration of the QR code mobile. |
6 | 35 |
|
7 |
| -- Download the source code, ``cd`` into the extracted directory. |
8 |
| -- In your virtualenv, run ``pip install .`` |
9 |
| -- Run ``audio-feeder install`` - this should create a basic ``{{CONFIG}}`` directory in ``/etc/audio_feeder`` or ``~/.config/audio_feeder`` |
10 |
| -- Modify the configuration files in ``{{CONFIG}}/config.yml`` as desired. |
11 |
| -- Modify the templates and CSS files as desired. |
12 |
| -- Create a symbolic link to your audiobooks directory under ``{{CONFIG}}/static/media/`` (e.g. ``~/.config/audio_feeder/static/media/audiobooks``) - we'll call this ``{{AUDIOBOOKS}}``. |
13 |
| -- Run ``audio-feeder update {{AUDIOBOOKS}}`` to pull metadata from Google Books (for a large number of audiobooks, you may need to get a `Google API key <https://developers.google.com/maps/documentation/javascript/get-api-key>`_, which should be entered in your ``config.yml`` page under ``google_api_key``). |
14 |
| -- Run the server with ``audio-feeder run`` |
15 |
| -- Visit your page at ``localhost:9090`` (default value). *Note:* You should specify your computer's specific IP address if you are planning on serving your audiobooks directly to a phone or device over wifi. |
16 | 36 |
|
17 |
| -If you add more audiobooks to your audiobook path, run ``audio-feeder update {{AUDIOBOOKS}}`` again and restart the application. |
| 37 | +Display options |
| 38 | +*************** |
| 39 | + |
| 40 | +The user can customize things like the sort order and the number of entries per page: |
| 41 | + |
| 42 | +.. image:: docs/images/screenshots/settings_pulldown.jpg |
| 43 | + :width: 800px |
| 44 | + :alt: Demonstration of the settings pulldown |
| 45 | + |
| 46 | + |
| 47 | +Installation and use |
| 48 | +==================== |
| 49 | + |
| 50 | +Probably the easiest way to deploy this is via docker. For your convenience, I have created `a repository with a docker-compose configuration <https://github.com/pganssle/audio_feeder_docker>`_. It uses ``nginx`` to serve static media files, and ``gunicorn`` to deploy the application. |
| 51 | + |
| 52 | +If you want to test it out locally, you can use ``tox -e start_server`` to run a test server. This will create a temporary server directory at ``/tmp/audio_feeder_server``, and you can play around with, and you can mount your audiobook directory at ``/tmp/audio_feeder_server/static/media`` to have it work on your own audiobooks (bind mount, symlink or hard link should work just fine). |
| 53 | + |
| 54 | +In a ``virtualenv`` with ``audio-feeder`` installed, you can run ``audio-feeder --help`` to see the various command line tools bundled with the application. |
| 55 | + |
18 | 56 |
|
19 | 57 | Note
|
20 | 58 | =====
|
21 |
| -Version 0.1.0 is a very rough initial cut, and if you're looking for something easy to use out of the box, you may have to wait a bit longer. The odd choice of using YAML files as a pseudo-database is *not* intended to be permanent, and these will be replaced with a proper database soon. |
| 59 | + |
| 60 | +While the state of this is getting much closer to something production-ready, I am emphatically *not* a front-end developer, and I don't have extremely high confidence in the security of this project. Use at your own risk (and if you do come up with some security and/or usability improvements, please do send a PR). |
| 61 | + |
| 62 | +This is only tested on Linux, but it may also work on other platforms. |
22 | 63 |
|
23 | 64 | Dependencies
|
24 | 65 | ============
|
25 |
| -The following dependencies are required for installation, and will be installed if missing when installed through `pip`: |
26 |
| - |
27 |
| -- ``Flask`` |
28 |
| -- ``ruamel.yaml`` |
29 |
| -- ``qrcode`` |
30 |
| -- ``Pillow`` |
31 |
| -- ``requests`` |
32 |
| -- ``jinja2`` |
33 |
| -- ``click`` |
34 |
| -- ``progressbar2`` |
35 |
| - |
36 |
| -To run the test suite, ``pytest`` is also required. |
| 66 | + |
| 67 | +In addition to the python dependencies specified in ``pyproject.toml``, this project also requires installing ``ffmpeg`` with at least the ``aac`` codec, and the tests also require the ``libmp3lame`` codec. |
| 68 | + |
37 | 69 |
|
38 | 70 | License
|
39 | 71 | =======
|
|
0 commit comments