diff --git a/app/routes.py b/app/routes.py index f38bfc3..881f036 100644 --- a/app/routes.py +++ b/app/routes.py @@ -61,7 +61,6 @@ def prince_corpus(house=None, prince=None): @main.route("/acte//") # 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 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'))