···4848from this git repository, run ``FLASK_APP=fhost flask db upgrade``.
494950505151+Moderation UI
5252+-------------
5353+5454+0x0 features a TUI program for file moderation. With it, you can view a list
5555+of uploaded files, as well as extended information on them. It allows you to
5656+take actions like removing files temporarily or permanently, as well as
5757+blocking IP addresses and associated files.
5858+5959+If a sufficiently recent version of python-mpv with libmpv is present and
6060+your terminal supports it, you also get graphical file previews, including
6161+video playback. Upstream mpv currently supports sixel graphics, but there is
6262+`an open pull request <https://github.com/mpv-player/mpv/pull/11002>`_ that
6363+adds support for the `kitty graphics protocol <https://sw.kovidgoyal.net/kitty/graphics-protocol/>`_.
6464+For this to work, set the ``MOD_PREVIEW_PROTO`` option in ``instance/config.py``.
6565+6666+Requirements:
6767+6868+* `Textual <https://textual.textualize.io/>`_
6969+7070+Optional:
7171+7272+* `python-mpv <https://github.com/jaseg/python-mpv>`_
7373+ (graphical previews)
7474+* `PyAV <https://github.com/PyAV-Org/PyAV>`_
7575+ (information on multimedia files)
7676+* `PyMuPDF <https://github.com/pymupdf/PyMuPDF>`_
7777+ (previews and file information for PDF, XPS, EPUB, MOBI and FB2)
7878+* `libarchive-c <https://github.com/Changaco/python-libarchive-c>`_
7979+ (archive content listing)
8080+8181+.. note::
8282+ `Mosh <https://mosh.org/>`_ currently does not support sixels or kitty graphics.
8383+8484+.. hint::
8585+ You may need to set the ``COLORTERM`` environment variable to
8686+ ``truecolor``.
8787+8888+.. tip::
8989+ Using compression with SSH (``-C`` option) can significantly
9090+ reduce the bandwidth requirements for graphics.
9191+9292+5193NSFW Detection
5294--------------
5395
+11
instance/config.example.py
···5858FHOST_MAX_EXPIRATION = 365 * 24 * 60 * 60 * 1000
595960606161+# This should be detected automatically when running behind a reverse proxy, but needs
6262+# to be set for URL resolution to work in e.g. the moderation UI.
6363+# SERVER_NAME = "example.com"
6464+6565+6666+# Specifies which graphics protocol to use for the media previews in the moderation UI.
6767+# Requires pympv with libmpv >= 0.36.0 and terminal support.
6868+# Available choices are "sixel" and "kitty".
6969+# MOD_PREVIEW_PROTO = "sixel"
7070+7171+6172# Use the X-SENDFILE header to speed up serving files w/ compatible webservers
6273#
6374# Some webservers can be configured use the X-Sendfile header to handle sending