Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This folder contains the files used for building and updating the list of historic
monuments on the Romanian Wikipedia. While designed for historic monuments, the
scripts have been programmed so they can be extended to any list that has the same
structure (templates for database and an unique id to identify each entry).

Below you can find a high-level overview of what each script does. For detailed
information, read each script's help file (call the script with the -help param)

Main scripts scripts: - a shell script that can do most of the work by running the main
			scripts below - parse the monument lists and extract the data in the format: 
			list[dict{Arhitect, Denumire, Adresã, Datare, source, Cod, Coordonate, Imagine, Lat, Localitate, Lon}].
		   - accepts the parameter "db" which indicates which config file 
			to use (and implicitely which database to read) - parse the articles and images of monuments and log 
				then in the following format: 
				dict{code, list[dict{name, namespace, project, lat, lon}, ...]}; 
				also log errors where needed
                          - parameters "lang"/"family" allows choose the wiki to 
				parse (and the config to use)
                          - parameter "parse" with values quick/normal/full parses 
				the pages that are not in the database/were updated 
				since the last parse/all of them. - parse all the databases, log errors and warnings and 
				updates the database where possible. Some changes 
				are automatic, others require manual verification
                             - parameter "import" lets the user choose a json or csv 
				file to parse. The keys in json or column names in 
				csv must correspond to field names in the script 
				configuration. The filed "Cod" is compulsory.
				be validated manually.

Other maintained scripts: - generates some statistics in wikitext format. - removes some recurring errors from the lists using regular expressions. - adds the {{Monument istoric}} template to images used 
				in the list but which don't have the template - removes a set of errors from the lists using regular expressions. 
			DO NOT USE unless you are familiar with regexps. - create pages in the "Cod" namespace that redirect to the 
			database entries - a highly customized script used to create articles about LMI
			monuments. - remove spaces and potentially other detectable errors from the
			codes, either in image pages or monument lists - Convert the list of files parsed, either from the local wiki or from
			commons, to a text file; this can be used for downloading
			the file.

Deprecated scripts (using the prefix deprecated_ ): - added the RAN codes in the LMI database; the functionality 
			was integrated in the 
			script - generates a csv file that was used by CIMEC to upload 
				the photos to Europeana; this was throw-away 
				code from the beginning