Go to file
2024-02-23 23:16:35 -05:00
thoughts Skew 10, why not 2024-02-23 23:16:35 -05:00
whispermaphone Add redirect for common typo :) 2024-01-29 21:17:46 -05:00
.gitignore Calculate ETag for the index page using last modified date 2023-12-12 16:21:23 -05:00
LICENSE Lower case disclaimer in license because we are not savages 2022-03-02 23:01:42 -05:00
manage.py Current page tweaks 2022-05-12 08:16:44 -05:00
README README edit and Etag tweak 2024-01-29 21:18:59 -05:00
requirements.txt Remove Gemini support 2023-03-03 21:27:05 -05:00

# 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.

Disabling pagination is possible by editing ./thoughts/pagination.py.

After cloning, you should create a `.env` to define environment variables. Read whispermaphone/settings.py.
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 https://tildegit.org/Matthias/WhisperMaPhone
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)
pip install -r requirements.txt

# To install xapian to power /search:
    curl -OL https://tildegit.org/matthias/xapian-haystack/raw/branch/master/install_xapian.sh

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

    ./manage.py rebuild_index

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