This Repository is meant to summarize the work done during my Bachelor Internship for Nexa Center for Internet & Society.
-
Folder
pubblications
contains the scriptpubb.sh
which allows to - given ajson
file containing the informations about NEXA members (seepeople.json
*) - to obtain for each member a file injson
format (E.g.:001921.json
) containing all the information about publications for that member. -
In order to have the
json
files up to date it is necessary to run the script periodically in order to retrieve from the Politecnico di Torino IRIS website all the latest publications of each member. -
The javascript scripts that handle the creation of the
html
content are inside thejs
folder. NamelyirisJsonParser.js
andrenderPub-1.1.0.js
. In particolare in the latter from line 115 to line 151 is present theDOM
that is handling the creation of the content split for years, publication type, the unordered list of years of publication and the links to the parts of thehtml
page. -
The element inside which everything is built is:
-
a
div
inside thebody
withid="pubblicazione"
for the publications (line 57 ofrenderPub-1.1.0.js
) -
a
div
inside thebody
withid="summary"
(line 151 ofrenderPub-1.1.0.js
)The final
html
file ispaper_v3.html
in which from line 52 to line 117 have been inserted the hyperlinks to the javascript files mentioned in point 2. Filepaper.html
does not contain the vertical bar with years.
Note: The file people.json
must strictly be in the presented format otherwise the grep
command in the bash file will fail.
-
All’interno della cartella pubblications è presente uno script chiamato pubb.sh tramite il quale è possibile, dato un file json contenente le informazioni sui membri di NEXA (vedi
people.json
), ottenere per ognuno dei membri un file in formato json (vedi001921.json
per esempio) contenente tutte le pubblicazioni con le informazioni dettagliate. -
Affinchè i file in formato json per ogni membro siano sempre aggiornati va eseguito lo script periodicamente in modo da recuperare dal sito IRIS del politecnico tutte le ultime pubblicazioni.
-
Gli script javascript che si occupano della creazione del contenuto html sono contenute nella cartella js e sono
irisJsonParser.js
erenderPub-1.1.0.js
in particolare in quest’ultimo da riga 115 a 151 è presente il dom che si occupa della creazione del contenuto diviso per anni e poi per tipo di pubblicazione e la creazione della lista non ordinata contenente gli anni di pubblicazione e i link ai rispettivi punti della pagina html. -
L’elemento all’interno del quale verrà generato il tutto è un
div
all’interno delbody
con id=’publications’ per le pubblicazioni ediv
all’interno delbody
conid=’summary’
come si può notare rispettivamente a riga 57 e 151 direnderPub-1.1.0.js
. Il file html definitivo èpaper_v3.html
in cui da riga 52 a 117 sono stati inseriti i collegamenti agli script javascript menzionati nel punto 2, nel file htmlpaper.html
non è invece presente la barra di navigazione verticale con gli anni.
- Nota: Il file json chiamato
people.json
deve essere strettamente nel formato presentato altrimenti la grep del file bash fallisce