Removed exeption causing error in downloaded data
This commit is contained in:
parent
8e6bb25471
commit
0a494ad81f
23
README.md
23
README.md
@ -14,24 +14,25 @@ Diagrams are received in DOCX format, however can be easily be converted to ODT,
|
||||
|
||||
The aim of diagram-parser is to simplify the addition of PIS codes that are not yet in the OwlBoard data source. The planned implementation is as follows:
|
||||
|
||||
- diagram-parser is subscribed to an email inbox (IMAP/POP3)
|
||||
- Formatted train-crew schedule cards are sent to the inbox and loaded by diagram-parser
|
||||
- List of existing PIS codes is loaded and a list of non-existent codes is compiled (0000-9999)
|
||||
- If a code is found both in the diagram and on the list of non-existent codes, a Gitea issue is opened providing details of the code.
|
||||
- Once the program has run and extracted only the relavent details, the email is deleted and the file is closed and not stored.
|
||||
- The evantual aim is to avoid any manual searching of the files.
|
||||
- diagram-parser is subscribed to an email inbox (IMAP/POP3)
|
||||
- Formatted train-crew schedule cards are sent to the inbox and loaded by diagram-parser
|
||||
- List of existing PIS codes is loaded and a list of non-existent codes is compiled (0000-9999)
|
||||
- If a code is found both in the diagram and on the list of non-existent codes, a Gitea issue is opened providing details of the code.
|
||||
- Once the program has run and extracted only the relavent details, the email is deleted and the file is closed and not stored.
|
||||
- The evantual aim is to avoid any manual searching of the files.
|
||||
|
||||
The current process of adding new codes involves being made aware of them face to face, or finding them myself and manually finding and adding them to the data source.
|
||||
|
||||
## Points to Remember
|
||||
|
||||
- Emails received should be verified.
|
||||
- Emails received should be verified.
|
||||
- A pre-authorised key in the subject field, any emails not matching the key should be discarded.
|
||||
- Attachment formats may vary slightly.
|
||||
- Attachment formats may vary slightly.
|
||||
- The format of the attachment should be checked and any errors handled gracefully.
|
||||
- Avoid duplicate issues
|
||||
- Avoid duplicate issues
|
||||
- Issues opened should contain the missing PIS code in their title, this application should check for any open issues containing the missing code to avoid duplicated issues.
|
||||
|
||||
## Main external dependencies (Expected)
|
||||
- imaplib
|
||||
- email
|
||||
|
||||
- imaplib
|
||||
- email
|
@ -1,5 +1,5 @@
|
||||
home = /usr/bin
|
||||
include-system-site-packages = false
|
||||
version = 3.11.7
|
||||
version = 3.11.8
|
||||
executable = /usr/bin/python3.11
|
||||
command = /usr/bin/python -m venv /home/fred.boniface/git/owlboard/diagram-parser
|
||||
command = /usr/bin/python -m venv /home/fred.boniface/Desktop/diagrams-to-parse/diagram-parser
|
||||
|
@ -20,6 +20,7 @@ def humanYaml(pis_list):
|
||||
manual_review += f' - code: "{pis["pis"]}"\n'
|
||||
for service in pis["services"]:
|
||||
crs = []
|
||||
if service and service['stops']:
|
||||
for stop in service['stops']:
|
||||
crs.append(owlboard_connector.convert_tiploc_to_crs(stop))
|
||||
manual_review += f' stops: [{",".join(crs)}]\n'
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 194f20ea6fe89c423af752f2869d67c44ee194f5
|
Reference in New Issue
Block a user