django app web interface to Robin Hanson's content
Project description
django-overcomingbias-pages is a standalone Django app which provides a web interface to Robin Hanson’s content.
Features
The main features are:
Scrape content from across the web (overcomingbias, YouTube, Spotify and more) via the admin site.
Search content with meilisearch.
Create sequences (series) of content and export them to PDF, epub, plaintext, or any other format supported by pandoc.
Persistent user accounts.
Configuration
To configure django-overcomingbias-pages, add the following to your settings:
# 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:
# 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 to run tasks asynchronously. To enable this feature, follow the Django/Huey instructions. A minimal configuration is shown below:
# 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.
Bugs/Requests
Please use the GitHub issue tracker to submit bugs or request features.
License
Copyright (c) 2022 Christopher McDonald
Distributed under the terms of the MIT license.
All overcomingbias posts are copyright the original authors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_overcomingbias_pages-0.7.3.tar.gz
.
File metadata
- Download URL: django_overcomingbias_pages-0.7.3.tar.gz
- Upload date:
- Size: 71.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc31dbba84c2c577c2f6af450ce0ac746e32ecefed496e42aa954114bc169603 |
|
MD5 | 302dde30666f5a2697371351fc47203e |
|
BLAKE2b-256 | a1c19c6a0aa70e7d0d2bae9c442122d1badce157caebf200802a96c03314dc3d |
File details
Details for the file django_overcomingbias_pages-0.7.3-py3-none-any.whl
.
File metadata
- Download URL: django_overcomingbias_pages-0.7.3-py3-none-any.whl
- Upload date:
- Size: 101.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 466a1cb0b833494e8863bd3fc2128005311ca9efaccb89cd99005bbabcabcbd9 |
|
MD5 | d49cae453e466c97b86a257afcb04618 |
|
BLAKE2b-256 | 07aa76ee6e5d0bd16cad9a2fe892a3a7c5b8b8581c143167280513ccddf10171 |