You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matthias Portzel 4cefd3079e
Fix name of progressbar2 package
4 months ago
thoughts Save HTML for each thought to the DB for performance 4 months ago
whispermaphone Save HTML for each thought to the DB for performance 4 months ago
.gitignore Remove unused requirements and update README 12 months ago
LICENSE Lower case disclaimer in license because we are not savages 11 months ago
README About page public domain wording change 8 months ago Bug fixes from previous commit 5 months ago Current page tweaks 9 months ago
requirements.txt Fix name of progressbar2 package 4 months ago


# WhisperMaPhone

"I will call you by Whisper-ma-Phone, for the secrets I tell are for your ears alone."
- The Once-ler, *The Lorax*

## Copyright

The code in this repository is released into the public domain (as specified in the file LICENSE).

## Notes for running yourself

First off, this is not necessarily recommended. Making it easy for other people to host was not a priority in designing this project. You should be prepared to maintain your own fork and edit the source to suit your own needs. The About page is not applicable to you, for instance.

Running in production requires a WSGI host, which is way beyond the scope of this README to set up.

Since both production and my local development instance have a large (500+) number of posts, behavior with a small number of posts is untested and undefined. I do know that the system assumes that there is at least one post, and the main page will error if that's not the case. Pull requests (or emailed git patches) to fix this or similar bugs would be accepted.

Disabling pagination is possible by editing ./thoughts/

After cloning, you should create a `.env` to define environment variables. Read whispermaphone/
You can generate a SECRET_KEY with `python3 -c "import secrets; print(''.join([secrets.choice('abcdefghijklmnopqrstuvwxyz0123456789\!@#$%^&*(-_=+)') for i in range(50)]))"`.

To post, go to /post manually.

## Installing

# Clone
git clone
cd WhisperMaPhone

# Create a virtual environment
# Python 3 should go without saying in 2021
python -m venv venv

# Activate
. ./venv/bin/activate

# Install Requirements
# Note: This includes all requirements used by me at any point
# For a minimal (just django) install, you can leave off
# `xapian-haystack` (used for advanced search) and `jetforce`, used for Gemini mirroring
pip install -r requirements.txt

# To install xapian to power /search:
curl -OL

# NOTE: make sure the virtual enviroment is enabled before running this
# Check the latest version of xapian from
# As of writing, that's 1.4.19
sh <version>

./ rebuild_index

# Otherwise, disable xapian by patching like so
patch whispermaphone/ <<EOF
< "ENGINE": "xapian_backend.XapianEngine",
< "PATH": str(BASE_DIR / "xapian_index")
> "ENGINE": "haystack.backends.simple_backend.SimpleEngine"