Giter VIP home page Giter VIP logo

fsdb_igc's People

Contributors

kuaka avatar

Watchers

 avatar  avatar

fsdb_igc's Issues

Invalid syntax on printing pilot.

> 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:

print(f'{pil_id=} {name=} {tracklog=}')

[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 pilot name is not unique in fsdb.

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.

Export stops short when tracklog folder is missing.

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'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.