https://github.com/dddlr/taisho
Online dictionary-in-progress and database for a Chinese dialect called Taishanese
https://github.com/dddlr/taisho
Last synced: about 2 months ago
JSON representation
Online dictionary-in-progress and database for a Chinese dialect called Taishanese
- Host: GitHub
- URL: https://github.com/dddlr/taisho
- Owner: dddlr
- Created: 2020-03-08T08:51:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-26T22:53:24.000Z (over 3 years ago)
- Last Synced: 2025-03-06T14:52:53.727Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 1.72 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Taishanese–Middle Chinese correspondence database
An online dictionary and database for a Chinese dialect called Taishanese. Uses
Django and Postgres.
## How do I set this up?
This is a personal project, which means that running this on your own machine
is not supported. However, you might find these instructions helpful.
1. On a Python 3-only system, set up virtualenv.
2. Install the packages in `requirements.txt` (you don't actually need all of these)
then update them to latest version
3. Set up database.
This project expects a postgresql setup. Useful commands:
- `createuser --interactive` as postgres user
- `createdb taishanese`
4. Set environment variables in `.env` (for Heroku). This is for a dev
environment:
```sh
DJANGO_SETTINGS_MODULE=taishanese.settings.dev
SECRET_KEY='secret key here'
DATABASE_URL='postgresql://username@domain:port/database_name'
DATABASE_NO_SSL=true
```
For a production environment, replace `taishanese.settings.dev` with
`taishanese.settings.prod`, and remove the `DATABASE_NO_SSL` line.
5. Apply database migrations (`./manage.py migrate`) then load data, praying
everything works out:
```sh
$ ./manage.py --exclude=contenttypes --exclude=auth.Permission loaddata [file]
```
## Helpful commands
Mainly for my own purposes.
Running previous version of PostgreSQL database (in this case, 11):
```sh
$ /opt/pgsql-11/bin/pg_ctl -D data start
```
Running local instance:
```sh
$ . ./env/bin/activate
$ export $(cat .env | xargs)
$ heroku local
```
## Using manage.py
```sh
$ export $(xargs <../.env)
$ cd src
$ python3 manage.py shell
# etc...
```