kuaka / fsdb_igc Goto Github PK
View Code? Open in Web Editor NEWrenames tracklogs with pilots names where original name and pilot name are listed in fsdb file
renames tracklogs with pilots names where original name and pilot name are listed in fsdb file
> nix-shell -p 'python3.withPackages(ps: with ps; [ argparse lxml ])'
[nix-shell:~/dev/src/blockscope/2018-forbes-flatlands-score]$ python fsdb_igc.py forbes2018.fsdb
File "<fstring>", line 1
(pil_id=)
^
SyntaxError: invalid syntax
[nix-shell:~/dev/src/blockscope/2018-forbes-flatlands-score]$ python
Python 3.6.6 (default, Aug 11 2018, 09:13:30)
[GCC 4.2.1 Compatible Clang 5.0.2 (tags/RELEASE_502/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml.etree as ET
>>> import os, argparse
>>> import shutil
>>> exit()
If I comment out the following line then I don't get this error:
Line 56 in b41fa5f
[nix-shell:~/dev/src/blockscope/2018-forbes-flatlands-score]$ python fsdb_igc.py forbes2018.fsdb
{'4': 'Frank Chetcuti', ..., '108': 'Peter Adriaans'}
Task 1
task 2
Task 3
Task 4
Task 5
Task 6
Task 7
The <FsParticipant id="8" name="Gordon Rigg"/>
for task 1 gets written to output/task 1/Gordon_Rigg.igc
. This FsParticipant/@name
is not unique. Please include the pilot's FsParticipant/@id
into the output file name.
For the HG worlds in Italy, no tracks are available for the training day from Airtribune at least.
> nix-shell -p 'python3.withPackages(ps: with ps; [ lxml ])'
[nix-shell:~/dev/src/.../2019-italy-score]$ python fsdb_igc.py italy2019.fsdb
...
Training Day
2019-07-14 does not exist
> tree -d
.
├── 2019-07-15
├── 2019-07-16
├── 2019-07-17
├── 2019-07-19
├── 2019-07-20
├── 2019-07-22
├── 2019-07-23
├── 2019-07-24
├── 2019-07-26
└── output
└── 2019-07-14
Please allow zipping of the remaining tasks, adding a --keep-going
flag if necessary.
If I create the missing folder, the script stops short because it can't find a pilot's track.
> mkdir 2019-07-14
> nix-shell -p 'python3.withPackages(ps: with ps; [ lxml ])'
[nix-shell:~/dev/src/.../2019-italy-score]$ python fsdb_igc.py italy2019.fsdb
...
Training Day
pil_id='6' name='Craig_Taylor' tracklog='LiveTrack Craig Taylor.656864.20190714-114929.6075.6.igc'
Traceback (most recent call last):
File "fsdb_igc.py", line 79, in <module>
main(args)
File "fsdb_igc.py", line 61, in main
shutil.copy2(os.path.join(source, tracklog), out)
File "/nix/store/px24kgsz8wpnfs0zv5zg28l66myzw3ki-python3-3.8.6/lib/python3.8/shutil.py", line 432, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/nix/store/px24kgsz8wpnfs0zv5zg28l66myzw3ki-python3-3.8.6/lib/python3.8/shutil.py", line 261,
in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory:
'2019-07-14/LiveTrack Craig Taylor.656864.20190714-114929.6075.6.igc'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.