Skip to content

Instantly share code, notes, and snippets.

View PonteIneptique's full-sized avatar
🏠
Working from home

Thibault Clérice PonteIneptique

🏠
Working from home
View GitHub Profile
@PonteIneptique
PonteIneptique / converter.py
Last active September 20, 2024 06:38
Simple LASLA compatible GT retroconverter
"""
Requirements:
regex
colorama
pycases
click
"""
import os
@PonteIneptique
PonteIneptique / ReassignAllLines.js
Created December 16, 2022 13:58
Macro eScriptorium
function link() {
document.dispatchEvent(new KeyboardEvent("keydown", {
'key': 'a', "charCode": 0, "keyCode": 65, "ctrlKey": true
}));
setTimeout(() => {
document.dispatchEvent(new KeyboardEvent("keydown", {
'key': 'y', "charCode": 0, "keyCode": 89
}));
}, 500);
@PonteIneptique
PonteIneptique / anybadge.svg
Created February 21, 2022 09:54
HTR-United Badge Template
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PonteIneptique
PonteIneptique / convert.py
Last active February 11, 2022 10:07
Convert old segmonto files. Use `convert.py *.xml`
import re
import glob
import sys
Zone = {
"Main": "MainZone",
"DropCapital": "DropCapitalZone",
"RunningTitle": "RunningTitleZone",
"Margin": "MarginTextZone",
@PonteIneptique
PonteIneptique / cremma-print-badges-chars.json
Last active October 31, 2021 19:53
This gist only exists in order to feed Badges of the CREMMA HTR-United badges
{"schemaVersion":1,"label":"Transcribed Characters","message":"83728","color":"informational","style":"flat-square"}
@PonteIneptique
PonteIneptique / priapea.xml
Created May 22, 2020 06:48
Priapea Share
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title/>
</titleStmt>
<publicationStmt><p/></publicationStmt>
<sourceDesc><p/></sourceDesc>
</fileDesc>
<revisionDesc>
@PonteIneptique
PonteIneptique / viz.xsl
Created May 21, 2020 07:13
XSL for dataviz of TEI MSD informations
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tei="http://www.tei-c.org/ns/1.0"
exclude-result-prefixes="xs"
xpath-default-namespace="http://www.tei-c.org/ns/1.0"
version="2.0">
<xsl:output encoding="UTF-8" method="html" ></xsl:output>
<xsl:variable name="textchunk" select="'ab'"/>
<xsl:variable name="chunkTitle" select="'Priapea'"/>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://hipster-philology.github.io/protogenie/protogenie/schema.rng"
schematypens="http://relaxng.org/ns/structure/1.0"?>
<config>
<output column_marker="TAB">
<header name="order">
<key>token</key>
<key>lemma</key>
<key>pos</key>
<key>Dis</key>
ENDPOEM
Carminis incompti lusus lecture procaces,
conueniens Latio pone supercilium.
non soror hoc habitat Phoebi, non uesta sacello,
@PonteIneptique
PonteIneptique / fix.py
Created February 6, 2019 15:24
Attempt at a small function for lxml parser that fix illformed xml when possible
from lxml import etree as ET
import re
def fix_xml(xml_string: str) -> str:
""" Given an illformated xml, try to fix it
:param xml_string: XML that is faulty
:return: xml that should not be faulty
"""