# xml-commedia Storage for XML files used to represent Dante's *Divine Comedy*. Also includes text files and programs used to generate the XML. This repo is mirrored at my home server: `https://git.lorenzohess.net:1534/lhess/xml-commedia-mirror`. ## Plaintext to XML I use Python and the Bourne Again Shell (Bash) to convert the *Comedy* from plaintext to XML. Currently, the XML *Comedy* complies with TEI specifications (full teiHeader coming soon). I took the plaintext files from this project: [ginestra/dante-visualized](https://github.com/ginestra/dante-visualised). The plaintext files are stored under `comedy-plaintext.d`, which contains subfolders for each canticle. Each subfolder contains text files, one per canto. ### `scripts.d/py-scripts/parser-txt-to-xml.py` This script does the text to XML conversion. The XML looks like the following: ```xml Nel mezzo del cammin di nostrdjkl vita mi ritrovai per una selva oscura ché la diritta via era smarrita. Ahi quanto a dir qual era è cosa dura esta selva selvaggia e aspra e forte che nel pensier rinova la paura! ... che tu mi meni dov’or dicesti, ch’io veggia la porta di san Pietro e color cui tu fai cotanto mesti». Allor si mosse, e io li tenni dietro. ```