I'm using a Linux Ubuntu-like distribution, that's where the command examples come from.
- SQLite3 driver for PHP:
sudo apt-get install php-sqlite3
pdftotext
utility:
sudo apt-get install poppler-utils
- Node.js version >=7.6 (
async
functions)
bash INSTALL.sh
bash parse.sh
Clears the current database (database/database.sqlite
) of test data and imports new data from all files in storage/data-sources/
.
Stores the file names as source references, so meaningful file names are advisable.
Assumes timezone "Europe/Riga" (+02:00/+03:00).
Stores the time in UTC (loses the (implicit) timezone info).
PDF and SQLite3 file types are supported.
PDF formats:
- "Veselības Centrs 4".
SQLite3 formats:
- DB files matching the database structure of
database/database.sqlite
(specifically, tabletaken_tests
).- (Updating of testable qualities and related properties is not supported, so
taken_tests
data must not reference entries in other tables that are not already present.) - The expected use case
- first time:
- add some PDFs into
storage/data-sources/
, - parse/import,
- copy
database/database.sqlite
intostorage/data-sources/
(as both a backup and a source for the next time), - remove the PDFs;
- add some PDFs into
- next time:
- add some new PDFs into
storage/data-sources/
(keeping the old copieddatabase.sqlite
), - parse/import,
- copy the new
database/database.sqlite
intostorage/data-sources/
, overwriting the old one, - remove the PDFs;
- add some new PDFs into
- in other words, copy
database/database.sqlite
intostorage/data-sources/
to carry the old/current test data (data that would not be imported from the other data sources instorage/data-sources/
, because it was manually entered or adjusted, or because the original sources have since been removed from the folder) over into the new data set.
- first time:
- (Updating of testable qualities and related properties is not supported, so
parse.sh
reads the source files alphabetically by name, later entries overwriting the earlier ones (when the time and the test item match).
php artisan serve
Launches a server that serves a website accessible at http://127.0.0.1:8000 using the data of the database.
Not yet.
- Create/update the seed data from the current database by:
bash dev/createSeedData.sh
Pull requests are welcome.