Compare commits

...

4 Commits

Author SHA1 Message Date
sergiusz
3f7b4f3a57 Filled with Pensa 2020-11-25 18:16:27 +01:00
sergiusz
d3d826fdcb Updated README.md and added multifile support for text2pensum.py 2020-11-24 19:31:28 +01:00
sergiusz
541173d829 Added .DS_Store to .gitignore 2020-11-24 19:13:17 +01:00
sergiusz
175a51554f Updated Pensa 2020-11-24 19:13:00 +01:00
25 changed files with 121 additions and 40 deletions

5
.gitignore vendored
View File

@ -1,2 +1,5 @@
__pycache__/
.env
.env
# iCloud
.DS_Store

View File

@ -12,14 +12,10 @@ As I've started learning Latin from Lingua Latina Per Se Illustrata I've encourt
- underscore-string-underscore combinations (```_us_```) are transformed intorequiered html text input field with string between underscores as a value of ```data-expected``` atribute (```<input type="text" data-expected="us" required>```).
# TODO
- [ ] text to html parser to swiftly migrate the cloze Pensa
- [x] text to html parser to swiftly migrate the cloze Pensa
- [ ] dictionairy interface
- [ ]
# Development
To run the app on your own machine:
1. ```pipenv shell```
2. ```export FLASK_APP=main.py```
3. ```export FLASK_ENV=development```
4. ```flask run```
To run the app on your own machine use ```pipenv shell 'flask run'```.

View File

@ -17,9 +17,9 @@ def llpsi():
@app.route('/latin/llpsi/<path:pensum_id>')
def pensum(pensum_id):
filename = 'templates/Pensa/' + pensum_id + '.html'
filename = 'app/templates/Pensa/' + pensum_id + '.html'
with open(filename, 'r') as file:
return render_template('LLPSI/Pensum_cloze.html', pensum_content=file.read())
return render_template('LLPSI/Pensum_cloze.html', pensum_title=pensum_id.replace('_', ' '), pensum_content=file.read())
@app.route('/latin/coniugationes')
def coniugationes():

View File

@ -3,12 +3,41 @@
<head>
<meta charset="UTF-8">
<title>Lingua Latina Per Se Illustrata</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1>Lingua Latina Per Se Illustrata</h1><br>
<h2>Imperium Romanum</h2><br>
<a href="/latin/llpsi/01_Imperium_Romanum_Pensum_A">Pensum A</a>
<h2>Dominus et servi</h2><br>
<a href="/latin/llpsi/04_Dominus_et_Servi_Pensum_A">Pensum A</a>
<h1>Lingua Latina Per Se Illustrata</h1>
<ul>
<li>Imperium Romanum
<ul>
<li><a href="/latin/llpsi/01_Imperium_Romanum_Pensum_A">Pensum A</a></li>
<li><a href="/latin/llpsi/01_Imperium_Romanum_Pensum_B">Pensum B</a></li>
</ul>
</li>
<li>Familia Romana
<ul>
<li><a href="/latin/llpsi/02_Familia_Romana_Pensum_A">Pensum A</a></li>
<li><a href="/latin/llpsi/02_Familia_Romana_Pensum_B">Pensum B</a></li>
</ul>
</li>
<li>Puer Improbus
<ul>
<li><a href="/latin/llpsi/03_Puer_Improbus_Pensum_A">Pensum A</a></li>
<li><a href="/latin/llpsi/03_Puer_Improbus_Pensum_B">Pensum B</a></li>
</ul>
</li>
<li>Dominus et servi
<ul>
<li><a href="/latin/llpsi/04_Dominus_et_Servi_Pensum_A">Pensum A</a></li>
<li><a href="/latin/llpsi/04_Dominus_et_Servi_Pensum_B">Pensum B</a></li>
</ul>
</li>
<li>Villa et Hortus
<ul>
<li><a href="/latin/llpsi/05_Villa_et_Hortus_Pensum_A">Pensum A</a></li>
<li><a href="/latin/llpsi/05_Villa_et_Hortus_Pensum_B">Pensum B</a></li>
</ul>
</li>
</ul>
</body>
</html>

View File

@ -11,7 +11,8 @@
console.log('dupa');
Array.from(form.elements).forEach((input) => {
if (input.type=="text") {
input.setAttribute("size", input.dataset.expected.length + 1);
console.log(input.dataset.expected.length)
input.setAttribute("style", input.getAttribute("style") + "; width: " + input.dataset.expected.length + "em");
}
});
}
@ -43,11 +44,11 @@
is_double_ok = (input_to_macron(input.value) == input.dataset.expected);
is_macron_ok = (input.value == input.dataset.expected);
if (input.type=="text" && !(is_double_ok || is_macron_ok)) {
input.setAttribute("style", "border-color:red");
input.setAttribute("style", input.getAttribute("style") + "; border-color:red");
console.log('expected: ' + input.dataset.expected);
console.log('input: ' + input_to_macron(input.value));
} else if (input.type=="text") {
input.setAttribute("style", "border-color:green");
input.setAttribute("style", input.getAttribute("style") + "; border-color:green");
}
});
@ -56,10 +57,12 @@
</script>
</head>
<body>
<h1><a href="/latin/llpsi">Lingua Latina Per Se Illustrata</a></h1>
<h2>{{pensum_title}}</h2>
<form class="Pensum_A" onsubmit="return validate();">
{{pensum_content|safe}}
<br>
<input type="submit" value="Submit">
<input type="submit" value="Mitte">
</form>
<script type="text/javascript">adjust_size();</script>
</body>

View File

@ -1 +1,4 @@
Ni-ilus fluvi_us_ est. Ni-ilus et Rhe-enus fluvi_i-i_ _sunt_. Cre-eta i-insul_a_ _est_. Cre-eta et Rhodus i-insul_ae_ sunt. Brundisium oppid_um_ _est_. Brundisium et Tu-usculum oppid_a_ sunt.
Ni-ilus fluvi_us_ est. Ni-ilus et Rhe-enus fluvi_i-i_ _sunt_. Cre-eta i-insul_a_ _est_. Cre-eta et Rhodus i-insul_ae_ sunt. Brundisium oppid_um_ _est_. Brundisium et Tu-usculum oppid_a_ _sunt_.<br>
Rhenus fluvi_us_ magn_us_ est. Tiberis est fluvi_us_ parv_us_. Rhenus et Danuvius non fluvi_i_ parv_i_, sed fluvi_i_ magn_i_ sunt. Sardinia insul_a_ magn_a_ est. Melita insul_a_ parv_a_ est. Sardinia et Sicilia non insul_ae_ parv_ae_, sed insul_ae_ magn_ae_ sunt. Brundisium non oppid_um_ parv_um_, sed oppid_um_ magn_um_ est. Tusculum et Delphi non oppid_a_ magn_a_, sed oppid_a_ parv_a_ sunt.<br>
Creta insul_a_ Graec_a_ est. Lesbos et Chios et Naxus sunt insul_ae_ Graec_ae_. In Graecia mult_ae_ insul_ae_ sunt. In Gallia sunt mult_i_ fluvi_i_. In Italia mult_a_ oppid_a_ sunt. In Arabia sunt pauc_i_ fluvi_i_ et pauc_a_ oppid_a_.<br>
A et B litter_ae_ Latin_ae_ sunt. C quoque litter_a_ Latin_a_ est. Multi et pauci vocabul_a_ Latin_a_ sunt. Ubi quoque vocabul_um_ Latin_um_ est. I et II numer_i_ Roman_i_ sunt. III quoque numer_us_ Roman_us_ est.

View File

@ -1 +1,4 @@
Nīlus fluvi<input type="text" data-expected="us" required/> est. Nīlus et Rhēnus fluvi<input type="text" data-expected="ī" required/> <input type="text" data-expected="sunt" required/>. Crēta īnsul<input type="text" data-expected="a" required/> <input type="text" data-expected="est" required/>. Crēta et Rhodus īnsul<input type="text" data-expected="ae" required/> sunt. Brundisium oppid<input type="text" data-expected="um" required/> <input type="text" data-expected="est" required/>. Brundisium et Tūsculum oppid<input type="text" data-expected="a" required/> sunt.
Nīlus fluvi<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> est. Nīlus et Rhēnus fluvi<input type="text" data-expected="ī" style="border: none; border-bottom: 1px solid black" /> <input type="text" data-expected="sunt" style="border: none; border-bottom: 1px solid black" />. Crēta īnsul<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> <input type="text" data-expected="est" style="border: none; border-bottom: 1px solid black" />. Crēta et Rhodus īnsul<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> sunt. Brundisium oppid<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> <input type="text" data-expected="est" style="border: none; border-bottom: 1px solid black" />. Brundisium et Tūsculum oppid<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> <input type="text" data-expected="sunt" style="border: none; border-bottom: 1px solid black" />.<br>
Rhenus fluvi<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> magn<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> est. Tiberis est fluvi<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> parv<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" />. Rhenus et Danuvius non fluvi<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> parv<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" />, sed fluvi<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> magn<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> sunt. Sardinia insul<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> magn<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> est. Melita insul<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> parv<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> est. Sardinia et Sicilia non insul<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> parv<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" />, sed insul<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> magn<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> sunt. Brundisium non oppid<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> parv<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" />, sed oppid<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> magn<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> est. Tusculum et Delphi non oppid<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> magn<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" />, sed oppid<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> parv<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> sunt.<br>
Creta insul<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> Graec<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> est. Lesbos et Chios et Naxus sunt insul<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> Graec<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" />. In Graecia mult<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> insul<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> sunt. In Gallia sunt mult<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> fluvi<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" />. In Italia mult<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> oppid<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> sunt. In Arabia sunt pauc<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> fluvi<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> et pauc<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> oppid<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" />.<br>
A et B litter<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> Latin<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> sunt. C quoque litter<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> Latin<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> est. Multi et pauci vocabul<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> Latin<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> sunt. Ubi quoque vocabul<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> Latin<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> est. I et II numer<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> Roman<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> sunt. III quoque numer<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> Roman<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> est.

View File

@ -0,0 +1,2 @@
Sicilia _insula_ est. Italia insula _non_ est. Rhenus _fluvius_ est. Brundisium _oppidum_ est. Sicilia et Sardinia _insulae_ magnae sunt. Melita insula _parva_ est. Britannia non _insula_ parva, sed _insula_ _magna_ est. Brundisium non _oppidum_ _parvum_, sed _oppidum_ magnum est. Est_ne_ Brundisium in Graecia? Brundisium _non_ est in Graecia, _sed_ in Italia. _Ubi_ est Sparta? Sparta est in Graecia. Sparta oppidum _Graecum_ est. Delphi _quoque_ oppidum Graecum est. Euboea, Naxus, Lesbos, Chios _insulae_ Graecae sunt. In Graecia sunt _multae_ insulae.
Quid est III? III _numerus_ est. Quid est A? A littera est. A, B, C _litterae_ Latinae sunt. _Num_ Γ littera Latina est? Γ _non_ littera _Latina_, sed littera _Graeca_ est. Insula _vocabulum_ Latinum est.

View File

@ -0,0 +1,2 @@
Sicilia <input type="text" data-expected="insula" style="border: none; border-bottom: 1px solid black" /> est. Italia insula <input type="text" data-expected="non" style="border: none; border-bottom: 1px solid black" /> est. Rhenus <input type="text" data-expected="fluvius" style="border: none; border-bottom: 1px solid black" /> est. Brundisium <input type="text" data-expected="oppidum" style="border: none; border-bottom: 1px solid black" /> est. Sicilia et Sardinia <input type="text" data-expected="insulae" style="border: none; border-bottom: 1px solid black" /> magnae sunt. Melita insula <input type="text" data-expected="parva" style="border: none; border-bottom: 1px solid black" /> est. Britannia non <input type="text" data-expected="insula" style="border: none; border-bottom: 1px solid black" /> parva, sed <input type="text" data-expected="insula" style="border: none; border-bottom: 1px solid black" /> <input type="text" data-expected="magna" style="border: none; border-bottom: 1px solid black" /> est. Brundisium non <input type="text" data-expected="oppidum" style="border: none; border-bottom: 1px solid black" /> <input type="text" data-expected="parvum" style="border: none; border-bottom: 1px solid black" />, sed <input type="text" data-expected="oppidum" style="border: none; border-bottom: 1px solid black" /> magnum est. Est<input type="text" data-expected="ne" style="border: none; border-bottom: 1px solid black" /> Brundisium in Graecia? Brundisium <input type="text" data-expected="non" style="border: none; border-bottom: 1px solid black" /> est in Graecia, <input type="text" data-expected="sed" style="border: none; border-bottom: 1px solid black" /> in Italia. <input type="text" data-expected="Ubi" style="border: none; border-bottom: 1px solid black" /> est Sparta? Sparta est in Graecia. Sparta oppidum <input type="text" data-expected="Graecum" style="border: none; border-bottom: 1px solid black" /> est. Delphi <input type="text" data-expected="quoque" style="border: none; border-bottom: 1px solid black" /> oppidum Graecum est. Euboea, Naxus, Lesbos, Chios <input type="text" data-expected="insulae" style="border: none; border-bottom: 1px solid black" /> Graecae sunt. In Graecia sunt <input type="text" data-expected="multae" style="border: none; border-bottom: 1px solid black" /> insulae.
Quid est III? III <input type="text" data-expected="numerus" style="border: none; border-bottom: 1px solid black" /> est. Quid est A? A littera est. A, B, C <input type="text" data-expected="litterae" style="border: none; border-bottom: 1px solid black" /> Latinae sunt. <input type="text" data-expected="Num" style="border: none; border-bottom: 1px solid black" /> Γ littera Latina est? Γ <input type="text" data-expected="non" style="border: none; border-bottom: 1px solid black" /> littera <input type="text" data-expected="Latina" style="border: none; border-bottom: 1px solid black" />, sed littera <input type="text" data-expected="Graeca" style="border: none; border-bottom: 1px solid black" /> est. Insula <input type="text" data-expected="vocabulum" style="border: none; border-bottom: 1px solid black" /> Latinum est.

View File

@ -0,0 +1,3 @@
Marcus fili_us_ Iulii est. Iulia fili_a_ Iulii est. Iulius est vir Roman_us_. Aemilia femin_a_ Roman_a_ est. Iulius domin_us_, Aemilia domin_a_ est. Medus serv_us_ Graec_us_ est, Delia est ancill_a_ Graec_a_. Sparta oppid_um_ Graec_um_ est.
Iulius pater Marc_i_ est. Marcus est filius Iuli_i_ et Aemili_ae_. Medus servus Iuli_i_ est: Iulius est dominus serv_i_. Iulius dominus Med_i_ et Dav_i_ est: Iulius dominus serv_orum_ est. Numerus serv_orum_ magnus est. Delia est ancilla Aemili_ae_: Aemilia domina ancill_ae_ est. Aemilia domina Deli_ae_ et Syr_ae_ est: Aemilia domina ancill_arum_ est. In familia Iuli_i_ est magnus numerus serv_orum_ et ancill_arum_. Aemilia mater Marc_i_ et Quint_i_ et Iuli_ae_ est. Marcus, Quintus Iuliaque sunt liberi Iuli_i_ et Aemili_ae_. Numerus liber_orum_ est tres. Numerus serv_orum_ est centum.
In pagina prima capitul_i_ secund_i_ multa vocabula nova sunt. Numerus capitul_orum_ non parvus est.

View File

@ -0,0 +1,3 @@
Marcus fili<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> Iulii est. Iulia fili<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> Iulii est. Iulius est vir Roman<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" />. Aemilia femin<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> Roman<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> est. Iulius domin<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" />, Aemilia domin<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> est. Medus serv<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> Graec<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> est, Delia est ancill<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> Graec<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" />. Sparta oppid<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> Graec<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> est.
Iulius pater Marc<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> est. Marcus est filius Iuli<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> et Aemili<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" />. Medus servus Iuli<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> est: Iulius est dominus serv<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" />. Iulius dominus Med<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> et Dav<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> est: Iulius dominus serv<input type="text" data-expected="orum" style="border: none; border-bottom: 1px solid black" /> est. Numerus serv<input type="text" data-expected="orum" style="border: none; border-bottom: 1px solid black" /> magnus est. Delia est ancilla Aemili<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" />: Aemilia domina ancill<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> est. Aemilia domina Deli<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> et Syr<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> est: Aemilia domina ancill<input type="text" data-expected="arum" style="border: none; border-bottom: 1px solid black" /> est. In familia Iuli<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> est magnus numerus serv<input type="text" data-expected="orum" style="border: none; border-bottom: 1px solid black" /> et ancill<input type="text" data-expected="arum" style="border: none; border-bottom: 1px solid black" />. Aemilia mater Marc<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> et Quint<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> et Iuli<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> est. Marcus, Quintus Iuliaque sunt liberi Iuli<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> et Aemili<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" />. Numerus liber<input type="text" data-expected="orum" style="border: none; border-bottom: 1px solid black" /> est tres. Numerus serv<input type="text" data-expected="orum" style="border: none; border-bottom: 1px solid black" /> est centum.
In pagina prima capitul<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> secund<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> multa vocabula nova sunt. Numerus capitul<input type="text" data-expected="orum" style="border: none; border-bottom: 1px solid black" /> non parvus est.

View File

@ -0,0 +1,4 @@
Marcus _puer_ Romanus est. Iulius _vir_ Romanus est. Aemilia est _femina_ Romana. Iulius est _pater_ Marci et Quinti et Iuliae. In _familia_ Iulii sunt tres _liberi_: duo _filii_ et una _filia_. _Mater_ liberorum est Aemilia.<br>
_Quis_ est Davus? Davus est _servus_ Iulii. Iulius _dominus_ Davi est. _Quae_ est Syra? Syra _ancilla_ Aemiliae est. Aemilia est _domina_ Syrae.<br>
Cornelius: “_Quot_ servi sunt in familia tua?” Iulius: “In familia _mea_ sunt _centum_ [C] servi.” Cornelius: “Familia _tua_ magna est!”<br>
LINGVA LATINA est titulus _libri_ tui Latini.

View File

@ -0,0 +1,4 @@
Marcus <input type="text" data-expected="puer" style="border: none; border-bottom: 1px solid black" /> Romanus est. Iulius <input type="text" data-expected="vir" style="border: none; border-bottom: 1px solid black" /> Romanus est. Aemilia est <input type="text" data-expected="femina" style="border: none; border-bottom: 1px solid black" /> Romana. Iulius est <input type="text" data-expected="pater" style="border: none; border-bottom: 1px solid black" /> Marci et Quinti et Iuliae. In <input type="text" data-expected="familia" style="border: none; border-bottom: 1px solid black" /> Iulii sunt tres <input type="text" data-expected="liberi" style="border: none; border-bottom: 1px solid black" />: duo <input type="text" data-expected="filii" style="border: none; border-bottom: 1px solid black" /> et una <input type="text" data-expected="filia" style="border: none; border-bottom: 1px solid black" />. <input type="text" data-expected="Mater" style="border: none; border-bottom: 1px solid black" /> liberorum est Aemilia.<br>
<input type="text" data-expected="Quis" style="border: none; border-bottom: 1px solid black" /> est Davus? Davus est <input type="text" data-expected="servus" style="border: none; border-bottom: 1px solid black" /> Iulii. Iulius <input type="text" data-expected="dominus" style="border: none; border-bottom: 1px solid black" /> Davi est. <input type="text" data-expected="Quae" style="border: none; border-bottom: 1px solid black" /> est Syra? Syra <input type="text" data-expected="ancilla" style="border: none; border-bottom: 1px solid black" /> Aemiliae est. Aemilia est <input type="text" data-expected="domina" style="border: none; border-bottom: 1px solid black" /> Syrae.<br>
Cornelius: “<input type="text" data-expected="Quot" style="border: none; border-bottom: 1px solid black" /> servi sunt in familia tua?” Iulius: “In familia <input type="text" data-expected="mea" style="border: none; border-bottom: 1px solid black" /> sunt <input type="text" data-expected="centum" style="border: none; border-bottom: 1px solid black" /> [C] servi.” Cornelius: “Familia <input type="text" data-expected="tua" style="border: none; border-bottom: 1px solid black" /> magna est!”<br>
LINGVA LATINA est titulus <input type="text" data-expected="libri" style="border: none; border-bottom: 1px solid black" /> tui Latini.

View File

@ -0,0 +1,2 @@
Cur Marc_us_ Iuliam pulsat? Marcus Iuli_am_ pulsat, quia Iuli_a_ cantat. Iuli_a_ plor_at_, quia Marcus e_am_ pulsat. Iulia: “Mamma! Marcus _me_ pulsat.” Aemilia puell_am_ aud_it_ et ven_it_. Mater Quint_um_ videt et e_um_ interrog_at_: “Quis me voc_at_?” Quint_us_ respond_et_: “Iulia _te_ vocat.”<br>
Iulius dorm_it_. Quintus Iuli_um_ voc_at_: “Pater!” Marcus rid_et_, quia Iuli_us_ non venit. Aemilia Marc_um_ verber_at_. Iulius ven_it_, quia Marc_us_ plorat. Iulius Aemili_am_ et Marc_um_ et Quint_um_ et Iuli_am_ videt. Iulius: “Puer qui parv_am_ puell_am_ pulsat improbus est.” Iulius puer_um_ improb_um_ verberat. Quem Iuli_us_ verberat? Puer qu_em_ Iulius verberat est Marcus. Marcus plor_at_. Puer qu_i_ plorat laet_us_ non est. Puella qu_ae_ cantat laet_a_ est.

View File

@ -0,0 +1,2 @@
Cur Marc<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> Iuliam pulsat? Marcus Iuli<input type="text" data-expected="am" style="border: none; border-bottom: 1px solid black" /> pulsat, quia Iuli<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> cantat. Iuli<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> plor<input type="text" data-expected="at" style="border: none; border-bottom: 1px solid black" />, quia Marcus e<input type="text" data-expected="am" style="border: none; border-bottom: 1px solid black" /> pulsat. Iulia: “Mamma! Marcus <input type="text" data-expected="me" style="border: none; border-bottom: 1px solid black" /> pulsat.” Aemilia puell<input type="text" data-expected="am" style="border: none; border-bottom: 1px solid black" /> aud<input type="text" data-expected="it" style="border: none; border-bottom: 1px solid black" /> et ven<input type="text" data-expected="it" style="border: none; border-bottom: 1px solid black" />. Mater Quint<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> videt et e<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> interrog<input type="text" data-expected="at" style="border: none; border-bottom: 1px solid black" />: “Quis me voc<input type="text" data-expected="at" style="border: none; border-bottom: 1px solid black" />?” Quint<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> respond<input type="text" data-expected="et" style="border: none; border-bottom: 1px solid black" />: “Iulia <input type="text" data-expected="te" style="border: none; border-bottom: 1px solid black" /> vocat.”<br>
Iulius dorm<input type="text" data-expected="it" style="border: none; border-bottom: 1px solid black" />. Quintus Iuli<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> voc<input type="text" data-expected="at" style="border: none; border-bottom: 1px solid black" />: “Pater!” Marcus rid<input type="text" data-expected="et" style="border: none; border-bottom: 1px solid black" />, quia Iuli<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> non venit. Aemilia Marc<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> verber<input type="text" data-expected="at" style="border: none; border-bottom: 1px solid black" />. Iulius ven<input type="text" data-expected="it" style="border: none; border-bottom: 1px solid black" />, quia Marc<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> plorat. Iulius Aemili<input type="text" data-expected="am" style="border: none; border-bottom: 1px solid black" /> et Marc<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> et Quint<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> et Iuli<input type="text" data-expected="am" style="border: none; border-bottom: 1px solid black" /> videt. Iulius: “Puer qui parv<input type="text" data-expected="am" style="border: none; border-bottom: 1px solid black" /> puell<input type="text" data-expected="am" style="border: none; border-bottom: 1px solid black" /> pulsat improbus est.” Iulius puer<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> improb<input type="text" data-expected="um" style="border: none; border-bottom: 1px solid black" /> verberat. Quem Iuli<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> verberat? Puer qu<input type="text" data-expected="em" style="border: none; border-bottom: 1px solid black" /> Iulius verberat est Marcus. Marcus plor<input type="text" data-expected="at" style="border: none; border-bottom: 1px solid black" />. Puer qu<input type="text" data-expected="i" style="border: none; border-bottom: 1px solid black" /> plorat laet<input type="text" data-expected="us" style="border: none; border-bottom: 1px solid black" /> non est. Puella qu<input type="text" data-expected="ae" style="border: none; border-bottom: 1px solid black" /> cantat laet<input type="text" data-expected="a" style="border: none; border-bottom: 1px solid black" /> est.

View File

@ -0,0 +1 @@
Puella _cantat_: “Lalla.” Puella _quae_ cantat est Iulia. Iulia _laeta_ est. Puer improbus puellam _pulsat_. Puella _plorat_: “Uhuhu!” Puer _ridet_: “Hahahae!” Puer _qui_ ridet est Marcus. Iulia Aemiliam _vocat_: “Mamma!” Aemilia _venit_, et Quintum _interrogat_: “Cur Iulia plorat?” Quintus _respondet_: “Iulia plorat, _quia_ Marcus eam pulsat.” Aemilia: “Marcus puer _probus_ non est, puer _improbus_ est! Ubi est pater?” Aemilia Iulium non _videt_. Quintus: “Pater non _hic_ est.” Quintus Iulium _vocat_: “Pater!” Iulius Quintum non _audit_. _Cur_ Iulius Quintum non audit? Iulius eum non audit, quia _dormit_. Marcus plorat, _quia_ Aemilia eum verberat. Iulius Marcum audit; _iam_ Iulius non dormit. _Quem_ Aemilia verberat? Aemilia Marcum _verberat_. Puer _quem_ Aemilia verberat improbus est. Iulia laeta non est _neque_ ridet.

View File

@ -0,0 +1 @@
Puella <input type="text" data-expected="cantat" style="border: none; border-bottom: 1px solid black" />: “Lalla.” Puella <input type="text" data-expected="quae" style="border: none; border-bottom: 1px solid black" /> cantat est Iulia. Iulia <input type="text" data-expected="laeta" style="border: none; border-bottom: 1px solid black" /> est. Puer improbus puellam <input type="text" data-expected="pulsat" style="border: none; border-bottom: 1px solid black" />. Puella <input type="text" data-expected="plorat" style="border: none; border-bottom: 1px solid black" />: “Uhuhu!” Puer <input type="text" data-expected="ridet" style="border: none; border-bottom: 1px solid black" />: “Hahahae!” Puer <input type="text" data-expected="qui" style="border: none; border-bottom: 1px solid black" /> ridet est Marcus. Iulia Aemiliam <input type="text" data-expected="vocat" style="border: none; border-bottom: 1px solid black" />: “Mamma!” Aemilia <input type="text" data-expected="venit" style="border: none; border-bottom: 1px solid black" />, et Quintum <input type="text" data-expected="interrogat" style="border: none; border-bottom: 1px solid black" />: “Cur Iulia plorat?” Quintus <input type="text" data-expected="respondet" style="border: none; border-bottom: 1px solid black" />: “Iulia plorat, <input type="text" data-expected="quia" style="border: none; border-bottom: 1px solid black" /> Marcus eam pulsat.” Aemilia: “Marcus puer <input type="text" data-expected="probus" style="border: none; border-bottom: 1px solid black" /> non est, puer <input type="text" data-expected="improbus" style="border: none; border-bottom: 1px solid black" /> est! Ubi est pater?” Aemilia Iulium non <input type="text" data-expected="videt" style="border: none; border-bottom: 1px solid black" />. Quintus: “Pater non <input type="text" data-expected="hic" style="border: none; border-bottom: 1px solid black" /> est.” Quintus Iulium <input type="text" data-expected="vocat" style="border: none; border-bottom: 1px solid black" />: “Pater!” Iulius Quintum non <input type="text" data-expected="audit" style="border: none; border-bottom: 1px solid black" />. <input type="text" data-expected="Cur" style="border: none; border-bottom: 1px solid black" /> Iulius Quintum non audit? Iulius eum non audit, quia <input type="text" data-expected="dormit" style="border: none; border-bottom: 1px solid black" />. Marcus plorat, <input type="text" data-expected="quia" style="border: none; border-bottom: 1px solid black" /> Aemilia eum verberat. Iulius Marcum audit; <input type="text" data-expected="iam" style="border: none; border-bottom: 1px solid black" /> Iulius non dormit. <input type="text" data-expected="Quem" style="border: none; border-bottom: 1px solid black" /> Aemilia verberat? Aemilia Marcum <input type="text" data-expected="verberat" style="border: none; border-bottom: 1px solid black" />. Puer <input type="text" data-expected="quem" style="border: none; border-bottom: 1px solid black" /> Aemilia verberat improbus est. Iulia laeta non est <input type="text" data-expected="neque" style="border: none; border-bottom: 1px solid black" /> ridet.

View File

@ -1 +1 @@
Mēdus ad<input type="text" data-expected="est" required/>. Dāvus ab<input type="text" data-expected="est" required/>. Iūlius imper<input type="text" data-expected="at" required/>: "Voc<input type="text" data-expected="ā" required/> Dāvum, Mēd<input type="text" data-expected="e" required/>!" Mēdus Dāvum voc<input type="text" data-expected="at" required/>: "Dāv<input type="text" data-expected="e" required/>! Ven<input type="text" data-expected="ī" required/>!" Dāvus ven<input type="text" data-expected="it" required/> neque Iūlium vid<input type="text" data-expected="et" required/>. Mēdus: "Salūt<input type="text" data-expected="ā" required/> dominum!" Dāvus dominum salūt<input type="text" data-expected="at" required/>: "Salvē, dominē! Quid est?" Dominus: "Tac<input type="text" data-expected="ē" required/>, serv<input type="text" data-expected="e" required/>! Nummī meī ubi sunt?" Servus tac<input type="text" data-expected="et" required/> neque respond<input type="text" data-expected="et" required/>. Iūlius: "Respond<input type="text" data-expected="ē" required/>!" Dāvus: "Interrog<input type="text" data-expected="ā" required/> Mēdum!" Iūlius Mēdum interrog<input type="text" data-expected="at" required/>: "Ubi est "
Mēdus ad<input type="text" data-expected="est" style="border: none; border-bottom: 1px solid black" />. Dāvus ab<input type="text" data-expected="est" style="border: none; border-bottom: 1px solid black" />. Iūlius imper<input type="text" data-expected="at" style="border: none; border-bottom: 1px solid black" />: "Voc<input type="text" data-expected="ā" style="border: none; border-bottom: 1px solid black" /> Dāvum, Mēd<input type="text" data-expected="e" style="border: none; border-bottom: 1px solid black" />!" Mēdus Dāvum voc<input type="text" data-expected="at" style="border: none; border-bottom: 1px solid black" />: "Dāv<input type="text" data-expected="e" style="border: none; border-bottom: 1px solid black" />! Ven<input type="text" data-expected="ī" style="border: none; border-bottom: 1px solid black" />!" Dāvus ven<input type="text" data-expected="it" style="border: none; border-bottom: 1px solid black" /> neque Iūlium vid<input type="text" data-expected="et" style="border: none; border-bottom: 1px solid black" />. Mēdus: "Salūt<input type="text" data-expected="ā" style="border: none; border-bottom: 1px solid black" /> dominum!" Dāvus dominum salūt<input type="text" data-expected="at" style="border: none; border-bottom: 1px solid black" />: "Salvē, dominē! Quid est?" Dominus: "Tac<input type="text" data-expected="ē" style="border: none; border-bottom: 1px solid black" />, serv<input type="text" data-expected="e" style="border: none; border-bottom: 1px solid black" />! Nummī meī ubi sunt?" Servus tac<input type="text" data-expected="et" style="border: none; border-bottom: 1px solid black" /> neque respond<input type="text" data-expected="et" style="border: none; border-bottom: 1px solid black" />. Iūlius: "Respond<input type="text" data-expected="ē" style="border: none; border-bottom: 1px solid black" />!" Dāvus: "Interrog<input type="text" data-expected="ā" style="border: none; border-bottom: 1px solid black" /> Mēdum!" Iūlius Mēdum interrog<input type="text" data-expected="at" style="border: none; border-bottom: 1px solid black" />: "Ubi est pecūnia mea, Mēd<input type="text" data-expected="e" style="border: none; border-bottom: 1px solid black" />?" Mēdus: "Dāvus pecūniam tuam hab<input type="text" data-expected="et" style="border: none; border-bottom: 1px solid black" />." Iūlius: "Pōn<input type="text" data-expected="e" style="border: none; border-bottom: 1px solid black" /> sacculum tuum in mēnsā, Dāv<input type="text" data-expected="e" style="border: none; border-bottom: 1px solid black" />!" Dāvus pār<input type="text" data-expected="et" style="border: none; border-bottom: 1px solid black" />: sacculum suum in mēnsā pōn<input type="text" data-expected="it" style="border: none; border-bottom: 1px solid black" />. Dāvus: "Vid<input type="text" data-expected="ē" style="border: none; border-bottom: 1px solid black" />, domin<input type="text" data-expected="ē" style="border: none; border-bottom: 1px solid black" />: sacculus meus vacuus est." Iūlius: "Sūm<input type="text" data-expected="e" style="border: none; border-bottom: 1px solid black" /> sacculum tuum et discēd<input type="text" data-expected="e" style="border: none; border-bottom: 1px solid black" />, bon<input type="text" data-expected="e" style="border: none; border-bottom: 1px solid black" /> serv<input type="text" data-expected="e" style="border: none; border-bottom: 1px solid black" />!" Dāvus sacculum suum sūm<input type="text" data-expected="it" style="border: none; border-bottom: 1px solid black" /> et discēd<input type="text" data-expected="it" style="border: none; border-bottom: 1px solid black" />.

View File

@ -0,0 +1,4 @@
In sacculo-o Iu-ulii-i _pecu-uniam_ est. Iu-ulius pecu-uniam _numerat_: "U-Unus, duo, tre-es, _quattuor_, _qui-inque_, sex, _septem_, _octo-o_, _novem_, _decem_." In _sacculo-o_ no-on centum, sed _tantum_ decem nummi-i sunt.<br>
Da-avus dominum _salu-utat_: "Salve-e, domine!" Iu-ulius _respondet_: "Po-one sacculum tuum in _me-ensa-a_!" Da-avus sacculum _suum_ in me-ensa-a _po-onit_. Sacculus Davi _vacuus_ est, in sacculo _eius_ [: Davi] _nulla_ pecunia est. Davus sacculum suum _sumit_ et discedit.
Iulius: “Mede! Veni!” Medus non venit, quia _is_ [: Medus] pecuniam Iulii _habet_. Iulius baculum, _quod_ in mensa est, sumit et _discedit_.
Dominus imperat, bonus servus _paret_.

View File

@ -0,0 +1,4 @@
In sacculō Iūliī <input type="text" data-expected="pecūniam" style="border: none; border-bottom: 1px solid black" /> est. Iūlius pecūniam <input type="text" data-expected="numerat" style="border: none; border-bottom: 1px solid black" />: "Ūnus, duo, trēs, <input type="text" data-expected="quattuor" style="border: none; border-bottom: 1px solid black" />, <input type="text" data-expected="quīnque" style="border: none; border-bottom: 1px solid black" />, sex, <input type="text" data-expected="septem" style="border: none; border-bottom: 1px solid black" />, <input type="text" data-expected="octō" style="border: none; border-bottom: 1px solid black" />, <input type="text" data-expected="novem" style="border: none; border-bottom: 1px solid black" />, <input type="text" data-expected="decem" style="border: none; border-bottom: 1px solid black" />." In <input type="text" data-expected="sacculō" style="border: none; border-bottom: 1px solid black" /> nōn centum, sed <input type="text" data-expected="tantum" style="border: none; border-bottom: 1px solid black" /> decem nummī sunt.<br>
Dāvus dominum <input type="text" data-expected="salūtat" style="border: none; border-bottom: 1px solid black" />: "Salvē, domine!" Iūlius <input type="text" data-expected="respondet" style="border: none; border-bottom: 1px solid black" />: "Pōne sacculum tuum in <input type="text" data-expected="mēnsā" style="border: none; border-bottom: 1px solid black" />!" Dāvus sacculum <input type="text" data-expected="suum" style="border: none; border-bottom: 1px solid black" /> in mēnsā <input type="text" data-expected="pōnit" style="border: none; border-bottom: 1px solid black" />. Sacculus Davi <input type="text" data-expected="vacuus" style="border: none; border-bottom: 1px solid black" /> est, in sacculo <input type="text" data-expected="eius" style="border: none; border-bottom: 1px solid black" /> [: Davi] <input type="text" data-expected="nulla" style="border: none; border-bottom: 1px solid black" /> pecunia est. Davus sacculum suum <input type="text" data-expected="sumit" style="border: none; border-bottom: 1px solid black" /> et discedit.
Iulius: “Mede! Veni!” Medus non venit, quia <input type="text" data-expected="is" style="border: none; border-bottom: 1px solid black" /> [: Medus] pecuniam Iulii <input type="text" data-expected="habet" style="border: none; border-bottom: 1px solid black" />. Iulius baculum, <input type="text" data-expected="quod" style="border: none; border-bottom: 1px solid black" /> in mensa est, sumit et <input type="text" data-expected="discedit" style="border: none; border-bottom: 1px solid black" />.
Dominus imperat, bonus servus <input type="text" data-expected="paret" style="border: none; border-bottom: 1px solid black" />.

View File

@ -0,0 +1,2 @@
Iulius et Aemilia in vill_a_ habit_ant_ cum liber_is_ et serv_is_. Dominus mult_os_ serv_os_ et mult_as_ ancill_as_ habet.<br>
Aemilia in peristÿl_o_ est cum Marc_o_ et Quint_o_ et Iuli_a_. Iulia mult_as_ ros_as_ in hort_o_ vid_et_ et ab Aemili_a_ disced_it_. Iam Aemilia puell_am_ non vid_et_, neque pueri eam vid_ent_. Aemilia: “Marce et Quinte! Voc_ate_ Iuliam!” Pueri Iuli_am_ voc_ant_: “Iulia! Ven_i_!” et Iulia puer_os_ voc_at_: “Marce et Quinte! Ven_ite_!” Iulia pueros non aud_it_, sed pueri Iuli_am_ aud_iunt_. Iulia: “Cur pueri non ven_iunt_?” Iulia ex hort_o_ venit cum V ros_is_ pulchr_is_. Iulia: “Vid_e_ ros_as_ meas, mater! Vid_ete_, pueri!” Marcus: “Rosae pulchrae sunt, puella sine ros_is_ pulchra non est!” Iulia cum un_a_ ros_a_ disced_it_. Pueri rid_ent_. Aemilia: “Tac_ete_, pueri! Sum_ite_ ros_as_ et disced_ite_!” Pueri ros_as_ sum_unt_ et disced_unt_; in atri_o_ aqu_am_ sum_unt_ ex impluvi_o_ et ros_as_ in aqu_a_ pon_unt_.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
Iulius in magna _villa_ _habitat_. Aemilia cum _eo_ [:Iulio] habitat. Iulius Aemiliam _amat_, quia _ea_ [: Aemilia] bona et _pulchra_ femina est.
Aemilia in peristÿlo est _cum_ liberis suis, sed _sine_ viro suo. Iulia _ab_ Aemilia discedit; iam puella in _horto_ est. Iulia rosas _carpit_ et _ex_ horto venit cum V _rosis_. Puella laeta est: rosae eam _delectant_.
Ubi est impluvium? _Id_ [: impluvium] est in _atrio_. In impluvio _aqua_ est. In atrio nullae _fenestrae_ sunt.

View File

@ -0,0 +1,3 @@
Iulius in magna <input type="text" data-expected="villa" style="border: none; border-bottom: 1px solid black" /> <input type="text" data-expected="habitat" style="border: none; border-bottom: 1px solid black" />. Aemilia cum <input type="text" data-expected="eo" style="border: none; border-bottom: 1px solid black" /> [:Iulio] habitat. Iulius Aemiliam <input type="text" data-expected="amat" style="border: none; border-bottom: 1px solid black" />, quia <input type="text" data-expected="ea" style="border: none; border-bottom: 1px solid black" /> [: Aemilia] bona et <input type="text" data-expected="pulchra" style="border: none; border-bottom: 1px solid black" /> femina est.
Aemilia in peristÿlo est <input type="text" data-expected="cum" style="border: none; border-bottom: 1px solid black" /> liberis suis, sed <input type="text" data-expected="sine" style="border: none; border-bottom: 1px solid black" /> viro suo. Iulia <input type="text" data-expected="ab" style="border: none; border-bottom: 1px solid black" /> Aemilia discedit; iam puella in <input type="text" data-expected="horto" style="border: none; border-bottom: 1px solid black" /> est. Iulia rosas <input type="text" data-expected="carpit" style="border: none; border-bottom: 1px solid black" /> et <input type="text" data-expected="ex" style="border: none; border-bottom: 1px solid black" /> horto venit cum V <input type="text" data-expected="rosis" style="border: none; border-bottom: 1px solid black" />. Puella laeta est: rosae eam <input type="text" data-expected="delectant" style="border: none; border-bottom: 1px solid black" />.
Ubi est impluvium? <input type="text" data-expected="Id" style="border: none; border-bottom: 1px solid black" /> [: impluvium] est in <input type="text" data-expected="atrio" style="border: none; border-bottom: 1px solid black" />. In impluvio <input type="text" data-expected="aqua" style="border: none; border-bottom: 1px solid black" /> est. In atrio nullae <input type="text" data-expected="fenestrae" style="border: none; border-bottom: 1px solid black" /> sunt.

40
text2pensum.py Executable file → Normal file
View File

@ -1,25 +1,27 @@
import sys
import re
with open(sys.argv[1], 'r') as infile:
content = infile.read()
for filename in sys.argv[1:]:
with open(filename, 'r') as infile:
content = infile.read()
# Replace _string_ with html
html_head = '<input type="text" data-expected="'
html_tail = '" required/>'
content = re.sub(r'_([a-zA-Z\-]+)_', html_head+r'\1'+html_tail, content)
# Replace _string_ with html
html_head = '<input type="text" data-expected="'
# html_tail = '" required/>'
html_tail = '" style="border: none; border-bottom: 1px solid black" />'
content = re.sub(r'_([a-zA-Z\-]+)_', html_head+r'\1'+html_tail, content)
# Replace vowel-dash-vowel with vowels with macrons
content = content.replace('A-A', 'Ā')
content = content.replace('a-a', 'ā')
content = content.replace('E-E', 'Ē')
content = content.replace('e-e', 'ē')
content = content.replace('I-I', 'Ī')
content = content.replace('i-i', 'ī')
content = content.replace('O-O', 'Ō')
content = content.replace('o-o', 'ō')
content = content.replace('U-U', 'Ū')
content = content.replace('u-u', 'ū')
# Replace vowel-dash-vowel with vowels with macrons
content = content.replace('A-A', 'Ā')
content = content.replace('a-a', 'ā')
content = content.replace('E-E', 'Ē')
content = content.replace('e-e', 'ē')
content = content.replace('I-I', 'Ī')
content = content.replace('i-i', 'ī')
content = content.replace('O-O', 'Ō')
content = content.replace('o-o', 'ō')
content = content.replace('U-U', 'Ū')
content = content.replace('u-u', 'ū')
with open(sys.argv[1] + '.html', 'w+') as outfile:
outfile.write(content)
with open(filename + '.html', 'w+') as outfile:
outfile.write(content)