We go to the mess. Let's start by explaining the relational model that sustains at the conceptual level of the database, yes, I am talking about the entity-reference diagram:
The document entity represents all saved exams:
The TAG entity represents a label that classifies an element of the Document Entity:
The doctag entity represents in Duplas the association of a document to a tag and vice versa, also adds a new attribute: proven .
At the external level of the database are the views . The first is, in terms of the relational algebra, the natural only of the document table, the doctag table and the TAG table.
The database administrator is by SQLite simplicity, in the near future it will be carried to MySQL. The code corresponding to the creation of the database is found in the Createdb.py file within the DBTools folder.
Each exam file is stored in the depths of the director of directories according to the following criteria: Degree to which the exam belongs, course of the subject of the exam, subject of the exam and year of the course in which the exam is carried out. In case of not being able to determine the year or be this prior to 2011-2012, the value of the year is UNKN (of Unknown, unknown) or before (previously to the origin of the world to the year 1112).
For example, if we have an exam of the 1st course , year 2013-2014 , subject hechizos and potions of the degree in dark arts and a type test of such asnostatura that we do not know what year is it But they have to Telarañas , his jungle routes would be:
Once new files have been added to the director of directories, it is enough to run the following command in the project root folder: make db . This command will automatically search and delete the duplicated files of the director of directories , in addition to classifying the new files in the database.
The logic of the server, that is, a code aimed at running on the server during the interaction of a user with the web interface is implemented in PHP and is located in the PHP directory. The logic of the interface is distributed in two directories: CSS and JS and the HTML files. To program in CSS it has been used {Less} , so it is necessary to compile the CSS/Style.less file, on the other hand the JavaScript code is minified using UGLIFYJS . These operations are carried out running make css and make js .
Python:
PHP:
/etc .JavaScript:
CSS: