|
|
|
|
@ -61,7 +61,6 @@ def prince_corpus(house=None, prince=None):
|
|
|
|
|
@main.route("/acte/<prince>/<acte_id>") # don't put a slash at the end
|
|
|
|
|
def acte(house=None, prince=None, acte_id=None):
|
|
|
|
|
"""acte route"""
|
|
|
|
|
print(prince)
|
|
|
|
|
q_prod = Involved_in.select().where(
|
|
|
|
|
(Involved_in.involved_in_prince == prince)
|
|
|
|
|
&(Involved_in.invol_in_interv == 1))
|
|
|
|
|
@ -87,14 +86,10 @@ def acte(house=None, prince=None, acte_id=None):
|
|
|
|
|
# if the acte if in another house's folder,
|
|
|
|
|
# change <house> according to the begining of filename
|
|
|
|
|
# (i. e. the house abreviation)
|
|
|
|
|
print(acte_id)
|
|
|
|
|
dict_house = {'brb': 'Bourbon', 'bry': 'Berry', 'anj': 'Anjou'}
|
|
|
|
|
pattern_house = re.compile(r'([a-z]{3})_[a-z]+_[ivx]+_\d+(_\d+_\d+)?[a-z]')
|
|
|
|
|
pattern_house = re.compile(r'([a-z]{3})_[a-z]+_[ivx]+_\d+(_\d+)?(_\d+)?[a-z]')
|
|
|
|
|
name_house = re.search(pattern_house, acte_id)
|
|
|
|
|
house = dict_house[name_house.group(1)]
|
|
|
|
|
print(house)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
source_doc = etree.parse(
|
|
|
|
|
os.path.join(APPPATH, "static", "xml", house, acte_id + '.xml'))
|
|
|
|
|
|