|
@@ -436,7 +436,7 @@
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"cell_type": "code",
|
|
"cell_type": "code",
|
|
- "execution_count": 36,
|
|
+ "execution_count": 73,
|
|
"metadata": {},
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"outputs": [],
|
|
"source": [
|
|
"source": [
|
|
@@ -459,7 +459,7 @@
|
|
" for node in toProc:\n",
|
|
" for node in toProc:\n",
|
|
" tags = list(map(lambda a: a.tag, node['a_par'])) + [node['child'].tag]\n",
|
|
" tags = list(map(lambda a: a.tag, node['a_par'])) + [node['child'].tag]\n",
|
|
" attributes = list(map(lambda a: a.attrib, node['a_par'])) + [node['child'].attrib]\n",
|
|
" attributes = list(map(lambda a: a.attrib, node['a_par'])) + [node['child'].attrib]\n",
|
|
- " content = node['child'].text\n",
|
|
+ " nodeContent = node['child'].text\n",
|
|
"\n",
|
|
"\n",
|
|
" # Da controllare solo per il primo nodo\n",
|
|
" # Da controllare solo per il primo nodo\n",
|
|
" # (informazioni a livello del nodo, uguali per tutti i figli)\n",
|
|
" # (informazioni a livello del nodo, uguali per tutti i figli)\n",
|
|
@@ -481,13 +481,13 @@
|
|
" # La 'ciccia': si processa il contenuto vero e proprio\n",
|
|
" # La 'ciccia': si processa il contenuto vero e proprio\n",
|
|
" # e4 Repository (qui dovrebbe essere sempre l'Archivio di Prato)\n",
|
|
" # e4 Repository (qui dovrebbe essere sempre l'Archivio di Prato)\n",
|
|
" if('repository' in tags):\n",
|
|
" if('repository' in tags):\n",
|
|
- " csvProt['repository'] = content \n",
|
|
+ " csvProt['repository'] = nodeContent \n",
|
|
"\n",
|
|
"\n",
|
|
" # e8 Tipologia\n",
|
|
" # e8 Tipologia\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
" ii = tags.index('materialspec')\n",
|
|
" ii = tags.index('materialspec')\n",
|
|
" if(attributes[ii]['label']=='tipologia'): \n",
|
|
" if(attributes[ii]['label']=='tipologia'): \n",
|
|
- " csvProt['tipologia'] = content\n",
|
|
+ " csvProt['tipologia'] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
"\n",
|
|
"\n",
|
|
@@ -496,12 +496,12 @@
|
|
" ii = tags.index('num')\n",
|
|
" ii = tags.index('num')\n",
|
|
" type1 = attributes[ii]['type']\n",
|
|
" type1 = attributes[ii]['type']\n",
|
|
" if(type1=='nuovo ordinamento'):\n",
|
|
" if(type1=='nuovo ordinamento'):\n",
|
|
- " csvProt['segnatura_attuale'] = content\n",
|
|
+ " csvProt['segnatura_attuale'] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" # e9 Segnatura precedente (Odd)\n",
|
|
" # e9 Segnatura precedente (Odd)\n",
|
|
" if('odd' in tags):\n",
|
|
" if('odd' in tags):\n",
|
|
- " csvProt['segnatura_precedente'] = content \n",
|
|
+ " csvProt['segnatura_precedente'] = nodeContent \n",
|
|
" \n",
|
|
" \n",
|
|
" # e11 Il titolo da unittitle\n",
|
|
" # e11 Il titolo da unittitle\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
@@ -512,14 +512,14 @@
|
|
" try:\n",
|
|
" try:\n",
|
|
" csvProt['titolo_aspo'] = str(node['a_par'][ii].text).replace('\\t','').replace('\\n','').strip()\n",
|
|
" csvProt['titolo_aspo'] = str(node['a_par'][ii].text).replace('\\t','').replace('\\n','').strip()\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
- " csvProt['titolo_aspo'] = str(content).replace('\\t','').replace('\\n','').strip()\n",
|
|
+ " csvProt['titolo_aspo'] = str(nodeContent).replace('\\t','').replace('\\n','').strip()\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" \n",
|
|
" \n",
|
|
- " # e12 Scope-content head & body\n",
|
|
+ " # e12 Scope-nodeContent head & body\n",
|
|
" if('scopecontent' in tags):\n",
|
|
" if('scopecontent' in tags):\n",
|
|
" if('p' in tags):\n",
|
|
" if('p' in tags):\n",
|
|
- " csvProt['scope-content_body'] = content\n",
|
|
+ " csvProt['scope-content_body'] = nodeContent\n",
|
|
"\n",
|
|
"\n",
|
|
" # e14 Nome della compagnia\n",
|
|
" # e14 Nome della compagnia\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
@@ -527,9 +527,9 @@
|
|
" if(attributes[ii]['authfilenumber']):\n",
|
|
" if(attributes[ii]['authfilenumber']):\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
" authId = attributes[ii]['authfilenumber']\n",
|
|
" authId = attributes[ii]['authfilenumber']\n",
|
|
- " csvProt['compagnia'] = '{\"nome\": ' + \"\\\"\" + content + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" + '}'\n",
|
|
+ " csvProt['compagnia'] = '{\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" + '}'\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
- " csvProt['compagnia'] = '{\"nome\": ' + \"\\\"\" + content + \"\\\"\" + '}'\n",
|
|
+ " csvProt['compagnia'] = '{\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + '}'\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" \n",
|
|
" \n",
|
|
@@ -540,49 +540,49 @@
|
|
" key='persona' \n",
|
|
" key='persona' \n",
|
|
" authId = attributes[ii]['authfilenumber']\n",
|
|
" authId = attributes[ii]['authfilenumber']\n",
|
|
" try: \n",
|
|
" try: \n",
|
|
- " csvProt[key] = csvProt[key] + ' | {\"nome\": ' + \"\\\"\" + content + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" +'}'\n",
|
|
+ " csvProt[key] = csvProt[key] + ' | {\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" +'}'\n",
|
|
" except: \n",
|
|
" except: \n",
|
|
- " csvProt[key] = '{\"nome\": ' + \"\\\"\" + content + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" +'}'\n",
|
|
+ " csvProt[key] = '{\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" +'}'\n",
|
|
" except: \n",
|
|
" except: \n",
|
|
" try:\n",
|
|
" try:\n",
|
|
- " csvProt[key] = csvProt[key] + ' | {\"nome\": ' + \"\\\"\" + content + \"\\\"\" + '}'\n",
|
|
+ " csvProt[key] = csvProt[key] + ' | {\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + '}'\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
- " csvProt[key] = '{\"nome\": ' + \"\\\"\" + content + \"\\\"\" + '}'\n",
|
|
+ " csvProt[key] = '{\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + '}'\n",
|
|
"\n",
|
|
"\n",
|
|
" # e17 Date\n",
|
|
" # e17 Date\n",
|
|
" if ('unittitle' in tags):\n",
|
|
" if ('unittitle' in tags):\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
" ii = tags.index('date')\n",
|
|
" ii = tags.index('date')\n",
|
|
" key = 'data'\n",
|
|
" key = 'data'\n",
|
|
- " csvProt[key] = content\n",
|
|
+ " csvProt[key] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" \n",
|
|
" \n",
|
|
" # e18 Data 1: periodo\n",
|
|
" # e18 Data 1: periodo\n",
|
|
" if('unitdate' in tags):\n",
|
|
" if('unitdate' in tags):\n",
|
|
- " csvProt['data_periodo'] = content\n",
|
|
+ " csvProt['data_periodo'] = nodeContent\n",
|
|
" \n",
|
|
" \n",
|
|
" # e20 Supporto fisico\n",
|
|
" # e20 Supporto fisico\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
" ii = tags.index('physfacet')\n",
|
|
" ii = tags.index('physfacet')\n",
|
|
" if(attributes[ii]['type']=='supporto'):\n",
|
|
" if(attributes[ii]['type']=='supporto'):\n",
|
|
- " csvProt['supporto'] = content\n",
|
|
+ " csvProt['supporto'] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
"\n",
|
|
"\n",
|
|
" # e21 Physdesc \n",
|
|
" # e21 Physdesc \n",
|
|
" if('extent' in tags):\n",
|
|
" if('extent' in tags):\n",
|
|
- " csvProt['numero'] = content\n",
|
|
+ " csvProt['numero'] = nodeContent\n",
|
|
" if('genreform' in tags):\n",
|
|
" if('genreform' in tags):\n",
|
|
- " csvProt['genere'] = content\n",
|
|
+ " csvProt['genere'] = nodeContent\n",
|
|
" \n",
|
|
" \n",
|
|
" # e21 Dimensions\n",
|
|
" # e21 Dimensions\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
" ii = tags.index('dimensions')\n",
|
|
" ii = tags.index('dimensions')\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
- " csvProt['dimensione_altezza_larghezza_spessore'] = csvProt['dimensione_altezza_larghezza_spessore'] + ' | ' + content\n",
|
|
+ " csvProt['dimensione_altezza_larghezza_spessore'] = csvProt['dimensione_altezza_larghezza_spessore'] + ' | ' + nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
- " csvProt['dimensione_altezza_larghezza_spessore'] = content\n",
|
|
+ " csvProt['dimensione_altezza_larghezza_spessore'] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" \n",
|
|
" \n",
|
|
@@ -590,15 +590,15 @@
|
|
" try:\n",
|
|
" try:\n",
|
|
" ii = tags.index('phystech')\n",
|
|
" ii = tags.index('phystech')\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
- " csvProt['conservazione'] = csvProt['conservazione'] + ' | ' + content\n",
|
|
+ " csvProt['conservazione'] = csvProt['conservazione'] + ' | ' + nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
- " csvProt['conservazione'] = content\n",
|
|
+ " csvProt['conservazione'] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" \n",
|
|
" \n",
|
|
" # e24 Note\n",
|
|
" # e24 Note\n",
|
|
" if('note' in tags):\n",
|
|
" if('note' in tags):\n",
|
|
- " csvProt['nota'] = content\n",
|
|
+ " csvProt['nota'] = nodeContent\n",
|
|
" \n",
|
|
" \n",
|
|
" # e26 Oggetto digitale allegato (nome)\n",
|
|
" # e26 Oggetto digitale allegato (nome)\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
@@ -709,7 +709,7 @@
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"cell_type": "code",
|
|
"cell_type": "code",
|
|
- "execution_count": 37,
|
|
+ "execution_count": 74,
|
|
"metadata": {
|
|
"metadata": {
|
|
"tags": []
|
|
"tags": []
|
|
},
|
|
},
|
|
@@ -770,17 +770,9 @@
|
|
"source": [
|
|
"source": [
|
|
"translatorHelper = {\"first\": [], \"all\": []}\n",
|
|
"translatorHelper = {\"first\": [], \"all\": []}\n",
|
|
"\n",
|
|
"\n",
|
|
- "translatorHelper['all'].append({\"check\": {\"tag\": \"repository\"}, \"get\": {\"text\"}})"
|
|
+ "helperObjsAll = [\n",
|
|
- ]
|
|
+ "{\"check\": {\"tag\": \"repository\", \"attribs\": []}, \"get\": {\"lastNode\": True, \"what\": \"text\"}},\n",
|
|
- },
|
|
+ "]"
|
|
- {
|
|
|
|
- "cell_type": "code",
|
|
|
|
- "execution_count": null,
|
|
|
|
- "metadata": {},
|
|
|
|
- "outputs": [],
|
|
|
|
- "source": [
|
|
|
|
- " # tags = [ a.tag for a in node['a_par'] ].append(node['child'].tag)\n",
|
|
|
|
- " # attributes = [ a.attrib for a in node['a_par'] ].append(node['child'].attrib)"
|
|
|
|
]
|
|
]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -789,7 +781,7 @@
|
|
"metadata": {},
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"outputs": [],
|
|
"source": [
|
|
"source": [
|
|
- "def traduttoreNew(elem):\n",
|
|
+ "def traduttoreItem(elem):\n",
|
|
" # Variabile che contiene l'output della traduzione:\n",
|
|
" # Variabile che contiene l'output della traduzione:\n",
|
|
" csvProt = {}\n",
|
|
" csvProt = {}\n",
|
|
"\n",
|
|
"\n",
|
|
@@ -804,13 +796,11 @@
|
|
"\n",
|
|
"\n",
|
|
" # Processo i nodi-child di 'elem'\n",
|
|
" # Processo i nodi-child di 'elem'\n",
|
|
" toProc = traceElems(elem['child'], isLeafOrC)\n",
|
|
" toProc = traceElems(elem['child'], isLeafOrC)\n",
|
|
- "\n",
|
|
|
|
" first = True\n",
|
|
" first = True\n",
|
|
" for node in toProc:\n",
|
|
" for node in toProc:\n",
|
|
" tags = [ a.tag for a in node['a_par'] ] + [node['child'].tag]\n",
|
|
" tags = [ a.tag for a in node['a_par'] ] + [node['child'].tag]\n",
|
|
" attributes = [ a.attrib for a in node['a_par'] ] + [node['child'].attrib]\n",
|
|
" attributes = [ a.attrib for a in node['a_par'] ] + [node['child'].attrib]\n",
|
|
- "\n",
|
|
+ " nodeContent = node['child'].text\n",
|
|
- " content = node['child'].text\n",
|
|
|
|
"\n",
|
|
"\n",
|
|
" # Da controllare solo per il primo nodo\n",
|
|
" # Da controllare solo per il primo nodo\n",
|
|
" # (informazioni a livello del nodo, uguali per tutti i figli)\n",
|
|
" # (informazioni a livello del nodo, uguali per tutti i figli)\n",
|
|
@@ -832,13 +822,13 @@
|
|
" # La 'ciccia': si processa il contenuto vero e proprio\n",
|
|
" # La 'ciccia': si processa il contenuto vero e proprio\n",
|
|
" # e4 Repository (qui dovrebbe essere sempre l'Archivio di Prato)\n",
|
|
" # e4 Repository (qui dovrebbe essere sempre l'Archivio di Prato)\n",
|
|
" if('repository' in tags):\n",
|
|
" if('repository' in tags):\n",
|
|
- " csvProt['repository'] = content \n",
|
|
+ " csvProt['repository'] = nodeContent \n",
|
|
"\n",
|
|
"\n",
|
|
" # e8 Tipologia\n",
|
|
" # e8 Tipologia\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
" ii = tags.index('materialspec')\n",
|
|
" ii = tags.index('materialspec')\n",
|
|
" if(attributes[ii]['label']=='tipologia'): \n",
|
|
" if(attributes[ii]['label']=='tipologia'): \n",
|
|
- " csvProt['tipologia'] = content\n",
|
|
+ " csvProt['tipologia'] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
"\n",
|
|
"\n",
|
|
@@ -847,12 +837,12 @@
|
|
" ii = tags.index('num')\n",
|
|
" ii = tags.index('num')\n",
|
|
" type1 = attributes[ii]['type']\n",
|
|
" type1 = attributes[ii]['type']\n",
|
|
" if(type1=='nuovo ordinamento'):\n",
|
|
" if(type1=='nuovo ordinamento'):\n",
|
|
- " csvProt['segnatura_attuale'] = content\n",
|
|
+ " csvProt['segnatura_attuale'] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" # e9 Segnatura precedente (Odd)\n",
|
|
" # e9 Segnatura precedente (Odd)\n",
|
|
" if('odd' in tags):\n",
|
|
" if('odd' in tags):\n",
|
|
- " csvProt['segnatura_precedente'] = content \n",
|
|
+ " csvProt['segnatura_precedente'] = nodeContent \n",
|
|
" \n",
|
|
" \n",
|
|
" # e11 Il titolo da unittitle\n",
|
|
" # e11 Il titolo da unittitle\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
@@ -863,14 +853,14 @@
|
|
" try:\n",
|
|
" try:\n",
|
|
" csvProt['titolo_aspo'] = str(node['a_par'][ii].text).replace('\\t','').replace('\\n','').strip()\n",
|
|
" csvProt['titolo_aspo'] = str(node['a_par'][ii].text).replace('\\t','').replace('\\n','').strip()\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
- " csvProt['titolo_aspo'] = str(content).replace('\\t','').replace('\\n','').strip()\n",
|
|
+ " csvProt['titolo_aspo'] = str(nodeContent).replace('\\t','').replace('\\n','').strip()\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" \n",
|
|
" \n",
|
|
- " # e12 Scope-content head & body\n",
|
|
+ " # e12 Scope-nodeContent head & body\n",
|
|
" if('scopecontent' in tags):\n",
|
|
" if('scopecontent' in tags):\n",
|
|
" if('p' in tags):\n",
|
|
" if('p' in tags):\n",
|
|
- " csvProt['scope-content_body'] = content\n",
|
|
+ " csvProt['scope-content_body'] = nodeContent\n",
|
|
"\n",
|
|
"\n",
|
|
" # e14 Nome della compagnia\n",
|
|
" # e14 Nome della compagnia\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
@@ -878,9 +868,9 @@
|
|
" if(attributes[ii]['authfilenumber']):\n",
|
|
" if(attributes[ii]['authfilenumber']):\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
" authId = attributes[ii]['authfilenumber']\n",
|
|
" authId = attributes[ii]['authfilenumber']\n",
|
|
- " csvProt['compagnia'] = '{\"nome\": ' + \"\\\"\" + content + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" + '}'\n",
|
|
+ " csvProt['compagnia'] = '{\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" + '}'\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
- " csvProt['compagnia'] = '{\"nome\": ' + \"\\\"\" + content + \"\\\"\" + '}'\n",
|
|
+ " csvProt['compagnia'] = '{\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + '}'\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" \n",
|
|
" \n",
|
|
@@ -891,49 +881,49 @@
|
|
" key='persona' \n",
|
|
" key='persona' \n",
|
|
" authId = attributes[ii]['authfilenumber']\n",
|
|
" authId = attributes[ii]['authfilenumber']\n",
|
|
" try: \n",
|
|
" try: \n",
|
|
- " csvProt[key] = csvProt[key] + ' | {\"nome\": ' + \"\\\"\" + content + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" +'}'\n",
|
|
+ " csvProt[key] = csvProt[key] + ' | {\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" +'}'\n",
|
|
" except: \n",
|
|
" except: \n",
|
|
- " csvProt[key] = '{\"nome\": ' + \"\\\"\" + content + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" +'}'\n",
|
|
+ " csvProt[key] = '{\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + ', \"authID\": ' + \"\\\"\" + authId + \"\\\"\" +'}'\n",
|
|
" except: \n",
|
|
" except: \n",
|
|
" try:\n",
|
|
" try:\n",
|
|
- " csvProt[key] = csvProt[key] + ' | {\"nome\": ' + \"\\\"\" + content + \"\\\"\" + '}'\n",
|
|
+ " csvProt[key] = csvProt[key] + ' | {\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + '}'\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
- " csvProt[key] = '{\"nome\": ' + \"\\\"\" + content + \"\\\"\" + '}'\n",
|
|
+ " csvProt[key] = '{\"nome\": ' + \"\\\"\" + nodeContent + \"\\\"\" + '}'\n",
|
|
"\n",
|
|
"\n",
|
|
" # e17 Date\n",
|
|
" # e17 Date\n",
|
|
" if ('unittitle' in tags):\n",
|
|
" if ('unittitle' in tags):\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
" ii = tags.index('date')\n",
|
|
" ii = tags.index('date')\n",
|
|
" key = 'data'\n",
|
|
" key = 'data'\n",
|
|
- " csvProt[key] = content\n",
|
|
+ " csvProt[key] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" \n",
|
|
" \n",
|
|
" # e18 Data 1: periodo\n",
|
|
" # e18 Data 1: periodo\n",
|
|
" if('unitdate' in tags):\n",
|
|
" if('unitdate' in tags):\n",
|
|
- " csvProt['data_periodo'] = content\n",
|
|
+ " csvProt['data_periodo'] = nodeContent\n",
|
|
" \n",
|
|
" \n",
|
|
" # e20 Supporto fisico\n",
|
|
" # e20 Supporto fisico\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
" ii = tags.index('physfacet')\n",
|
|
" ii = tags.index('physfacet')\n",
|
|
" if(attributes[ii]['type']=='supporto'):\n",
|
|
" if(attributes[ii]['type']=='supporto'):\n",
|
|
- " csvProt['supporto'] = content\n",
|
|
+ " csvProt['supporto'] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
"\n",
|
|
"\n",
|
|
" # e21 Physdesc \n",
|
|
" # e21 Physdesc \n",
|
|
" if('extent' in tags):\n",
|
|
" if('extent' in tags):\n",
|
|
- " csvProt['numero'] = content\n",
|
|
+ " csvProt['numero'] = nodeContent\n",
|
|
" if('genreform' in tags):\n",
|
|
" if('genreform' in tags):\n",
|
|
- " csvProt['genere'] = content\n",
|
|
+ " csvProt['genere'] = nodeContent\n",
|
|
" \n",
|
|
" \n",
|
|
" # e21 Dimensions\n",
|
|
" # e21 Dimensions\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
" ii = tags.index('dimensions')\n",
|
|
" ii = tags.index('dimensions')\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
- " csvProt['dimensione_altezza_larghezza_spessore'] = csvProt['dimensione_altezza_larghezza_spessore'] + ' | ' + content\n",
|
|
+ " csvProt['dimensione_altezza_larghezza_spessore'] = csvProt['dimensione_altezza_larghezza_spessore'] + ' | ' + nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
- " csvProt['dimensione_altezza_larghezza_spessore'] = content\n",
|
|
+ " csvProt['dimensione_altezza_larghezza_spessore'] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" \n",
|
|
" \n",
|
|
@@ -941,15 +931,15 @@
|
|
" try:\n",
|
|
" try:\n",
|
|
" ii = tags.index('phystech')\n",
|
|
" ii = tags.index('phystech')\n",
|
|
" try:\n",
|
|
" try:\n",
|
|
- " csvProt['conservazione'] = csvProt['conservazione'] + ' | ' + content\n",
|
|
+ " csvProt['conservazione'] = csvProt['conservazione'] + ' | ' + nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
- " csvProt['conservazione'] = content\n",
|
|
+ " csvProt['conservazione'] = nodeContent\n",
|
|
" except:\n",
|
|
" except:\n",
|
|
" pass\n",
|
|
" pass\n",
|
|
" \n",
|
|
" \n",
|
|
" # e24 Note\n",
|
|
" # e24 Note\n",
|
|
" if('note' in tags):\n",
|
|
" if('note' in tags):\n",
|
|
- " csvProt['nota'] = content\n",
|
|
+ " csvProt['nota'] = nodeContent\n",
|
|
" \n",
|
|
" \n",
|
|
" # e26 Oggetto digitale allegato (nome)\n",
|
|
" # e26 Oggetto digitale allegato (nome)\n",
|
|
" try:\n",
|
|
" try:\n",
|