Commit Graph

15 Commits

Author SHA1 Message Date
D. Berge
5aaad01238 Support lineNameInfo in raw P1/11 imports 2024-05-04 17:33:50 +02:00
D. Berge
53f2108e37 Adapt import functions to use logical paths 2023-08-30 14:56:09 +02:00
D. Berge
c99a625b60 Add function to retrieve survey configurations from DB.
As the survey definitions will no longer be stored in files
under etc/surveys/ but directly on the database, this
function replaces configuration.surveys()
2023-08-30 14:27:15 +02:00
D. Berge
e3a3bdb153 Clean up whitespace.
Commands used:

find . -type f -name '*.js'| while read FILE; do if echo $FILE |grep -qv node_modules; then sed -ri 's/^\s+$//' "$FILE"; fi; done
find . -type f -name '*.vue'| while read FILE; do if echo $FILE |grep -qv node_modules; then sed -ri 's/^\s+$//' "$FILE"; fi; done
find . -type f -name '*.py'| while read FILE; do if echo $FILE |grep -qv node_modules; then sed -ri 's/^\s+$//' "$FILE"; fi; done
2022-04-29 14:48:21 +02:00
D. Berge
17bb88faf4 Cope with P1/11s with no S records 2022-03-07 21:08:22 +01:00
D. Berge
9875ae86f3 Record P1/11 line name in database on import 2021-05-24 13:30:25 +02:00
D. Berge
0fdb42c593 Do not import files that have just been modified.
We now check that a file is at least a few seconds old
before attempting to import it.

The actual minimum age can be configured in etc/config.yaml or
else is defaults to 10 seconds.

The idea is that this should give the OS enough time to fully
write the file before we import it.

The timestamp being looked at is the modification time.

Fixes #92.
2021-05-07 13:50:32 +02:00
D. Berge
351d2a474b Fix NTBP detection.
Fixes #25.
2020-09-08 18:36:30 +02:00
D. Berge
1fc069a0bd Fix path to NTBP regexp pattern 2020-09-01 10:59:29 +02:00
D. Berge
5363ce8bab Handle NTBP flags in raw data.
This works by matching a regular expression against
the full path name (not just the file name). If it
matches, the NTBP flag is set to true.
2020-08-31 13:04:46 +02:00
D. Berge
71e0326141 Add missing import 2020-08-29 10:40:55 +02:00
D. Berge
22f806e81e Warn on import problems.
If there is a problem with files matching the capture
globs but not matching the file name regexp patterns,
these routines will emit a message to stderr and skip
the non-matching file.
2020-08-28 17:31:25 +02:00
D. Berge
639ac237e3 Replace Python globbing library.
This was motivated by the need to recurse down paths.
2020-08-28 13:49:43 +02:00
D. Berge
bc784989f6 Make P1 imports not fail if called needlessly.
If their respective configuration keys are not
defined in a survey configuration, the import
routines will print an informational message
and exit successfully.
2020-08-24 19:45:59 +02:00
D. Berge
3755564414 Add function to import raw P1/11.
Based on the analogous import_raw_p190.py code.
2020-08-10 22:58:31 +02:00