This is a read only archive of pad.okfn.org. See the
shutdown announcement
for details.
rpb-export
Refer to https://github.com/refugee-phrasebook.
automate export of refugee-phrasebook - Technical site
If you want to know more about the Project please visit http://www.refugeephrasebook.de/
For rather non-technical suggestions please visit https://pad.okfn.org/p/rpb-suggestions
users should be able to
- open a site
- select the needed languages (for parsing use ISO-Codes)
- select if phonetics are needed
- select the paper-size (A4, A5, A6)
- select the orientation (portrait, landscape)
- select single/double-side
- Eco-Mode (uses less toner - prints more pages)
- press create
- get a pdf for printing
ToDo (See https://github.com/refugee-phrasebook)
quick conversion hack, scraping from google sheets: https://github.com/refugee-phrasebook/py_rpb
a quick fix would be some kind of shell-script (mac/linux: bash + brew): manual download the book as zip, unpack and cat/cut/grep trough the html (using options like what lang to use) - create tex files (using tables?), replace rows with good fonts
- get the data from google to your hard-drive
- parse the documents (normalize)
- add options on what languages to include
- create tex-files (table, tabular, ... what to use?)
- align according to writing (LR, RL)
- replace fonts in single rows (recomendations for language-specific fonts needed)
- run your local tex-distribution
- done :)
- ... upload PDF to destination
The discussions below look to be duplication of what we (Sebastian and Ursula) too discussed.
The tools differ, but the brainstorming could come together via a Google Hangout and an action plan could be devised from that.
Thoughts?
Ok, the refugee-phrasebook IRC channel now exists on OFTC:
http://webchat.oftc.net/?channels=refugee-phrasebook
- Webserver using Linux (preferably debian/centos) with root-access (for installing packages)
- Install LaTeX (ziegenhagen@gmail.com can help with that, TeX Live 2015 recommended)
- Create scripts that download (export) the google-docs to a SQL-Server (sync) - UTF-8 - Use Data already on github
- Table-Layout for SQL-Server https://pad.okfn.org/p/rpb-backend
- Scripts that download the Icons (as vector-graphics: SVG or EPS, for LaTeX PNG or PDF is preferred) or use a reference to the raw-data files on the web in case the icons are changed
- Create a front-end with nice buttons
- create scripts that match the pressed buttons with data from DB and create LaTeX-documents (normalize the data/syntax to catch up errors)
- Feedback to the original-data if normalization does not work -> change the text in original (search&replace)
- Pay attention to left-right and right-left writing for alignment (LR, RL)
- run pdfLaTeX or XeLaTex and create PDF for download (different tex-apps produce different output - needs testing on ready tex-files)
Changes on RPB
- Match Languages to ISO-Codes (additional Line needed) - 3-letter-Version https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes 3-letter-code is not enough
- Match Phonetic version to language (i.e. ger -> ger-phonetic)
l
LaTeX-experts
- Create Layouts/Templates
- Match Languages with good-reading Fonts (can be challenging, I don't know many fonts that are visually nice if different languages are used, maybe Helvetica World could be a good choice (very expensive however, could ask Linotype - maybe they will license them and can give some recomendations on which font is best readable in xyz-language) I recommend using Google Noto Font family: http://www.google.com/get/noto/ (free, open font license.)
-> use different fonts for different languages (every row (language) in a different font) - prefferably CC
Questions:
Wouldnt a simpled workflow be:
- Mediawiki tables and text saved into file.mw
- (file.mw can be edited manually to introduce some extra info)
- Pandoc converts file.mw to PDF using LaTex/LuaTex/XeLatex in conjuction with a template
? What do you think? Just a suggestion. But it allow the current system of wiki tables to continue to be used, and not scare folks like me who come more from design and are a bit afraid of SQL.
-whoever wrote this, could you please test? thanks! ^mn