Skip to content

Instantly share code, notes, and snippets.

View petrifiedvoices's full-sized avatar
:octocat:
GitHubbing

Petra Heřmánková petrifiedvoices

:octocat:
GitHubbing
View GitHub Profile
tildeinfo = re.split(" *\u2014 *", row.pop("tildeinfo")) # splitting the column "tildeinfo" on long dash, using its unicode code \u2014)
#print(tildeinfo) # prints all the splitted columns
dateList = ["undated", " BC", " AD", "period", "Roman", "Rom.", "Hellenistic", "Hell.", "Classical", "Class.", "Archaic", "n.Chr.", "n. Chr.", "v.Chr.", "v. Chr.", "reign of"]
row["region"] = tildeinfo.pop(0) # takes the first segment of the splitted "tildeinfo" column and puts it in the column "region"
if tildeinfo and tildeinfo[0] and "stoich" in tildeinfo[0]: # if the next (second) segment of the splitted "tildeinfo" column contains string "stoich" it puts it in the column "stoich"
row["stoich"] = tildeinfo.pop(0)
\useURL[url4][][][]\from[url4]\useURL[url5][][][]\from[url5]
\startnarrower[right]
\setupinterlinespace[line=2.8ex]
{\framed
[width=\hsize,
align={width,nothyphenated,verytolerant,stretch},strut=no] % maybe also stretch
{{\it Celkem}:~3
{\it Region měst na pobřeží}:~Abdéra 1, Apollónia Pontská 1, Perinthos
(Hérakleia) 1