PaperGlobe-Web is a web app that wraps PaperGlobe, so you can transform an image of the Earth to a template that you can cut and assemble by yourself.
Of course you’re not limited to the Earth, you can use any other planet or quasi-spherical object as a source, as long as its surface is projected in the correct way. The image of the planet must be a cylindrical projection. Right now it works with Equirectangular, Mercator or Gall stereographic projections. PaperGlobe could work with any other projection, but the results won’t make you happy.
- Python >= 3.6
- Docker
- Docker compose
First, copy exemple.env
to .env
and setup your app variables.
Then you can launch the app:
./run up --build
Then you can visit http://localhost:8123
To shut down the dev server, press Control-C (^C
).
Let’s say you want to translate the website in Spanish.
First off, you’ll need to edit app/config.py
to add a line to the LANGUAGES
dict, with the language code and the language name: "es": "Español",
.
Then you must generate a new reference file:
./run translate:init es
That new reference file is now found at app/translations/es/LC_MESSAGES/messages.po
. This is the file you have to edit, by filling the empty strings msgstr ""
. Check out the French reference file (app/translations/fr/LC_MESSAGES/messages.po
) to see how it is done.
If the website’s code changes, the translation files will also need reflect those changes. The following command will do that, and format the existing translations.
./run translate:update
After writing the translations, you will need to compile in order to test your translation. Here’s the command to do that. The messages.po
file will make a messages.mo
file that can be use by the application to provide all the necessary translations.
./run translate:compile
After this compilation you will need to restart your web app.
Some code and structure was based on @alexOarga’s Docker Nginx Flask Celery MySQL Redis
The ./run
script was based on @mouse-reeve’s ./bw-dev
script for BookWyrm and as such is shared under the same license.