|
|
|
|
@ -14,7 +14,7 @@ from bs4 import BeautifulSoup
|
|
|
|
|
from peewee import *
|
|
|
|
|
from tqdm import tqdm
|
|
|
|
|
|
|
|
|
|
from modeles.princes_db_tables import db, Institution, State, Place, Diplo_type, Document, Acte
|
|
|
|
|
from modeles.princes_db_tables import db, Institution, State, Production_place, Diplo_type, Document, Acte
|
|
|
|
|
|
|
|
|
|
from data.institution_data import institution
|
|
|
|
|
from data.state_data import state
|
|
|
|
|
@ -40,7 +40,7 @@ def _create_diplo_type(data_lst: list)-> None:
|
|
|
|
|
for data in tqdm(data_lst, desc="Populating Diplo_type..."):
|
|
|
|
|
Diplo_type.create(**data)
|
|
|
|
|
|
|
|
|
|
def _create_place(xml_file: str)-> None:
|
|
|
|
|
def _create_produc_place(xml_file: str)-> None:
|
|
|
|
|
places_xtract = []
|
|
|
|
|
production_places = []
|
|
|
|
|
soup = make_soup(xml_file)
|
|
|
|
|
@ -61,7 +61,7 @@ def init():
|
|
|
|
|
_create_institution(institution)
|
|
|
|
|
_create_state(state)
|
|
|
|
|
_create_diplo_type(diplomatic_type)
|
|
|
|
|
_create_place(xml)
|
|
|
|
|
_create_produc_place(xml)
|
|
|
|
|
|
|
|
|
|
xml = "../bourbon-latex/charles-actes-latex.xml"
|
|
|
|
|
|
|
|
|
|
|