simpleweb_peertube
Go to file
southerntofu c493ad9f8e Update README: local subscriptions, contribution guidelines, and TODOs 2021-07-29 17:12:58 +00:00
static Serve /opensearch.xml to add SimpleerTube as search engine to your webbrowser 2021-07-28 20:36:57 -04:00
templates Also load videos on homepage from subscribed channels.list 2021-07-29 16:23:07 +00:00
.editorconfig Add .editorconfig 2021-01-21 20:51:05 +03:00
.gitignore Don't commit vim temporary files 2021-07-29 01:15:34 +02:00
LICENSE Initial commit 2021-01-17 16:03:40 +01:00
README.md Update README: local subscriptions, contribution guidelines, and TODOs 2021-07-29 17:12:58 +00:00
TODO Add support for viewing Accounts and Video Channels 2021-01-21 23:26:31 +01:00
doesnt_work Update doesnt_work 2021-01-22 11:57:11 +01:00
main.py A filter is not a list, but silently casts to an empty list? WTF python? 2021-07-29 17:04:31 +00:00
opensearch.xml Serve /opensearch.xml to add SimpleerTube as search engine to your webbrowser 2021-07-28 20:36:57 -04:00
peertube.py Fix subtitles proxying, every URL is unique and beautiful 2021-07-28 21:19:36 -04:00

README.md

SimpleerTube

Active Known Instances:

If you want to add your instance to this list, message us on IRC (#simple-web on irc.libera.chat).

For the rest of the documentation, https://simpleertube.metalune.xyz will be used as an example instance.

If you want to visit any page from your PeerTube instance of choice in SimpleerTube, just prepend https://simpleertube.metalune.xyz to the URL. So, https://videos.lukesmith.xyz/accounts/luke becomes https://simpleertube.metalune.xyz/videos.lukesmith.xyz/accounts/luke.

If you visit the main page, you can search globally (it uses Sepia Search in the backend).

Setup

You need to setup a few dependencies first, usually using pip (sudo apt install python3-pip on Debian):

$ sudo pip3 install quart bs4 html2text lxml

Note: If there are other dependencies that are not packaged with your system, please report them to us so they can be added to this README.

Now you can run a development environment like so:

$ python3 main.py # Starts on localhost:5000
$ python3 main.py 192.168.42.2 # Starts on 192.168.42.2:5000
$ python3 main.py 7171 # Starts on localhost:7171
$ python3 main.py 192.168.42.2 7171 # Starts on 192.168.42.2:7171
$ python3 main.py ::1 7171 # Also works with IPv6 addresses

It is strongly disrecommended to run the production using this command. Instead, please refer to the Quart deployment docs.

Subscriptions

If you would like to display the latest videos from your favorite channels/accounts on the homepage, simply place your subscriptions in accounts.list or channels.list files, like so:

# Comments are allowed in here with a # marker
# Each entry can be one of:
#   - user@server
#   - @user@server
#   - http(s)://server/a/user (accounts.list only)
#   - http(s)://server/c/channel (channels.list only)

TODO

  • Federation errors (eg. name not resolving) are not handled properly, producing bloaty tracebacks server side and unfriendly errors client side
  • Expects to run in the webroot, not in a subdirectory
  • Relies on search.joinpeertube.org API, while we should be able to configure a different SepiaSearch instance
  • Search result uses {{ domain }} instead of actual result-related domain
  • Cache should be persisted across runs? Especially since simply running main.py reloads the server every time a python file is saved to disk
  • Maybe caching of API requests should be handled in peertube.py? subscriptions caching should stay in main.py though
  • Support a mode/theme to act as lightweight frontend for a single instance, maybe reusing real peertube URL format?
  • Missing account/channel picture is not pretty: https://tube.fr.tild3.org/kolektiva.media/accounts/bureburebure/video-channels
  • main.py is starting to be a bit long, with some code duplication
  • Lots of duplication in templates
  • Configurable number of latest videos on homepage

Contributing

Patches should be sent to ~metalune/public-inbox@lists.sr.ht with git send-email command (tutorial).

License

This software is distributed under the AGPLv3 license. You can find a copy in the LICENSE file.