Skip to content

Tardo/gmg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Give Me the Garbage

Web application to analyze the content of public forums

INSTALLATION

Automatic Mode (recommended)

copier copy gh:Tardo/gmg-template gmg
cd gmg
docker-compose up

See 'gmg-template' repo for more info: https://github.com/tardo/gmg-template

Manual Mode

python -m pip install --upgrade pip
pip install poetry
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n
bash n latest
npm install --global npm
npm install --global postcss postcss-cli rollup
git clone git@gitlab.com:Tardo/gmg.git
cd gmg
poetry install
poetry run npm install
poetry run npm run srv:dev

Now can visit: http://localhost:8000

** Check the gmg.conf file to enable various debug options. You will need restart the service every time you edit this file.

Translations

Add a new language

*** You will need install 'pybabel'

** Do this using the project directory!

  • Generate .pot file
pybabel extract -F babel.cfg -o messages.pot .
  • Generate folder structure and .po file (Omit if you already do it)
pybabel init -i messages.pot -d translations -l <language code: ISO 639-1>

Update translations with new strings

poetry run npm run upd:translations
  • Edit .po file(s) using for example 'poedit'

  • Update again to compile .mo with the lastest changes:

    poetry run npm run upd:translations

Migrate Database Changes

  1. Create commit
poetry run flask db migrate -m "COMMIT MESSAGE"
  1. Review migrations/versions/...py script

  2. Apply the changes

poetry run flask db upgrade

Possible Problems

  • Get the exception UnkownTimeZoneError: To fix this configure the time zone of your system: dpkg-reconfigure tzdata

About

Web application to analyze the content of public forums

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors