OpenSakura
MekaHime's first AI companion, now open source. 26 emotions, her real voice, real-time replies and memory, running on your own PC. Discord mode coming soon.
翻譯準備中
尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
gift-economy network for sustainable communities (redesign 2020)
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Ecobasa is a gift-economy network for sustainable communities
This is a work-in-progress attempt of a redesign.
What people and communities do on ecobasa:
The simplest way to develop: Docker brings PostGIS, GDAL and Mailpit along.
cp django.env.example django.env
cp postgres.env.example postgres.env
docker compose up
In postgres.env, set the user, password and database that DATABASE_URL in django.env
uses (ecobasa/ecobasa/ecobasa in the example).
django: compiles translations, migrates and runs the dev server on http://localhost:8000database: PostGISmailpit: catches all emails, at http://localhost:8025watch: rebuilds the CSS on changesscheduler: the scheduled jobs, only with docker compose --profile scheduler upCommands and tests run in the django container:
docker compose exec django python manage.py createsuperuser
docker compose exec django python manage.py seed_demo_data
docker compose exec django pytest
After changing Pipfile, rebuild the image: docker compose build django.
Because we are using postgis for location fields, you need a postgres db with postgis extensions for this to work, even for development, sorry.
Install postgresql database server and postgis dependencies:
apt install libgdal-dev postgis postgresql-12
Create normal database in postgres:
su postgres
createuser ecobasa
createdb ecobasa -O ecobasa
Then add postgis extensions to this database:
su postgres
psql -d ecobasa
CREATE EXTENSION postgis;
pipenv install --dev
pipenv shell
python manage.py migrate
npm install
npm run build
The database user must have permission to create a new test database and add postgis extensions:
su postgres
psql
ALTER_ROLE ecobasa SUPERUSER;
pytest
https://ecobasa.herokuapp.com/
(auto deploys master branch)
add docker compose exec django before the following commands for a docker setup
python manage.py load_vocabularies: loads the thing vocabularies
(gift_economy/gifts/vocabularies/) after editing them and recognizes existing listings again.python manage.py match_everything: matches all existing offers and wishes, e.g. after
changing the matching.python manage.py send_test_reply "text" [--key KEY] [--photo path]: in development, answers
the latest (or a given) reference request in Mailpit like a mail app would; then run
fetch_reference_replies.STADIA_MAPS_KEY: for the map tilesDJANGO_SITE_URL: base for links in emails, e.g. https://ecobasa.orgREFERENCE_REPLY_ADDRESS: e.g. [email protected]. Replies go to
references+<key>@ecobasa.org; the key is also in the subject, in case the mail server
doesn't deliver plus addresses. Leave empty to only offer the link.REFERENCE_IMAP_HOST (e.g. mail.ecobytes.net), REFERENCE_IMAP_USER,
REFERENCE_IMAP_PASSWORD, REFERENCE_IMAP_FOLDER (default INBOX): the mailbox for repliesREFERENCE_REQUEST_DELAY_DAYS (1), REFERENCE_REQUEST_UNDATED_DELAY_DAYS (7),
REFERENCE_REQUEST_MAX_AGE_DAYS (30): when to ask for a reference, and how far backPROJECT_STALE_DAYS (60), PROJECT_ARCHIVE_GRACE_DAYS (14): when a project nobody updated
gets an "Is this still current?" email, and when it is archived without an answerIn development, replies are read from Mailpit instead of IMAP.
The jobs that run on their own are in crontab, run by
supercronic in the scheduler container (same image
and settings as django, times in TZ, Europe/Berlin). It logs to the container output, and
skips a job while its previous run is still going.
| When | Command |
|---|---|
| every 5 minutes | fetch_reference_replies |
| daily, 9:00 | archive_stale_projects |
| daily, 10:00 | send_reference_requests |
| Thursdays, 17:00 | send_suggestion_emails |
To change a time or add a job, edit crontab and restart the container
(docker compose restart scheduler). Any job can still be run by hand with
python manage.py <command>.
In development the scheduler is off, so emails only go out when you run a command. To try it (emails land in Mailpit):
docker compose --profile scheduler up