Metadata-Version: 2.1
Name: django-overcomingbias-pages
Version: 0.7.4
Summary: django app web interface to Robin Hanson's content
Project-URL: repository, https://github.com/chris-mcdo/django-overcomingbias-pages
Project-URL: issues, https://github.com/chris-mcdo/django-overcomingbias-pages/issues
Author-email: Christopher McDonald <cmcdonal33@gmail.com>
License: MIT License
        
        Copyright (c) 2022 Christopher McDonald
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: content,django,overcomingbias,scrape,website
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Internet
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Requires-Python: >=3.8
Requires-Dist: django-overcomingbias-api
Requires-Dist: django-select2
Requires-Dist: django<5,>=4.0
Requires-Dist: huey>=2
Requires-Dist: meilisearch
Requires-Dist: python-slugify>=5
Provides-Extra: production
Requires-Dist: django-overcomingbias-pages[recaptcha,redis]; extra == 'production'
Provides-Extra: recaptcha
Requires-Dist: google-cloud-recaptcha-enterprise; extra == 'recaptcha'
Provides-Extra: redis
Requires-Dist: hiredis; extra == 'redis'
Requires-Dist: redis>=4; extra == 'redis'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-django; extra == 'test'
Requires-Dist: python-dotenv; extra == 'test'
Description-Content-Type: text/x-rst

django-overcomingbias-pages: a web interface to Robin Hanson's content
======================================================================

``django-overcomingbias-pages`` is a standalone `Django <https://www.djangoproject.com/>`_
app which provides a web interface to Robin Hanson's content.

Features
--------

The main features are:

- Scrape content from across the web (`overcomingbias <https://overcomingbias.com/>`_,
  `YouTube <https://www.youtube.com/>`_, `Spotify <https://spotify.com/>`_
  and more) via the admin site.

- Search content with `meilisearch <https://www.meilisearch.com/>`_.

- Create sequences (series) of content and export them to PDF, epub, plaintext,
  or any other format supported by `pandoc <https://pandoc.org/>`_.

- Persistent user accounts.

Configuration
-------------

To configure ``django-overcomingbias-pages``, add the following to your settings:

.. code-block:: python

  # settings.py

  # add required apps
  INSTALLED_APPS = [
    # required for admin site / user accounts
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    # for collecting static files
    "django.contrib.staticfiles",
    # django-overcomingbias-api
    "ordered_model",
    "obapi",
    # async tasks
    "huey.contrib.djhuey",
    # django-overcomingbias-pages
    "obpages",
    # custom form rendering
    "django.forms",
  ]

  # Use the (custom) obpages user model 
  AUTH_USER_MODEL = "obpages.User"


Search is provided using ``meilisearch``.
To configure search, first set up a MeiliSearch instance, and then set up the following
settings:

.. code-block:: python

  # settings.py

  MEILISEARCH_CLIENT = {
      "url": "http://127.0.0.1:7700",
  }
  MEILISEARCH_INDEX = "content"

``MEILISEARCH_CLIENT`` specifies the location of the MeiliSearch instance, while
``MEILISEARCH_INDEX`` controls which MeiliSearch index is used for search.
Indexes can be created, updated and deleted via the admin site.

``django-overcomingbias-pages`` uses `Huey <https://github.com/coleifer/huey>`_ to
run tasks asynchronously.
To enable this feature, follow the
`Django/Huey instructions <https://huey.readthedocs.io/en/latest/django.html>`_.
A minimal configuration is shown below:

.. code-block:: python

  # settings.py

  connection_pool = ConnectionPool(host="127.0.0.1", port=6379, db=0, max_connections=100)

  # See docs for full list of settings
  HUEY = {
      "huey_class": "huey.PriorityRedisHuey",
      "name": PROJECT_NAME,
      "connection": {
          "connection_pool": connection_pool,
          # see redis-py for more options
          # https://redis-py.readthedocs.io/en/latest/connections.html
          "read_timeout": 0,
      },
      "consumer": {
          "workers": 4,
          "worker_type": "thread",
      },
  }

(Note that this requires (1) a Redis server running on localhost:6379 and (2) installing
via ``pip install django-overcomingbias-pages[redis]``.)

Optionally, you can also configure Huey as your
`email backend <https://github.com/chris-mcdo/django-huey-email-backend>`_.

Bugs/Requests
-------------

Please use the
`GitHub issue tracker <https://github.com/chris-mcdo/django-overcomingbias-pages/issues>`_
to submit bugs or request features.

License
-------

Copyright (c) 2022 Christopher McDonald

Distributed under the terms of the
`MIT <https://github.com/chris-mcdo/django-overcomingbias-pages/blob/main/LICENSE>`_
license.

All overcomingbias posts are copyright the original authors.
