efj-parser 0.9__tar.gz → 0.9.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: efj-parser
3
- Version: 0.9
3
+ Version: 0.9.1
4
4
  Summary: Parse an electronic Flight Journal file
5
5
  Home-page: https://github.com/JonHurst/efj_parser
6
6
  Author: Jon Hurst
7
7
  Author-email: jon.a@hursts.org.uk
8
+ Project-URL: docs, https://hursts.org.uk/efjdocs/
8
9
  Classifier: Development Status :: 4 - Beta
9
10
  Classifier: Programming Language :: Python :: 3
10
11
  Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
@@ -123,8 +123,11 @@ class Parser():
123
123
  ftl_correction = 0
124
124
  unused_flags = []
125
125
  for f in flags:
126
- if f and (mo_cor := re.match(r"r(\d+)", f)):
127
- ftl_correction = int(mo_cor.group(1))
126
+ if f and (mo_cor := re.match(r"r(:\d+)?", f)):
127
+ if mo_cor.group(1):
128
+ ftl_correction = int(mo_cor.group(1)[1:])
129
+ else:
130
+ ftl_correction = duration
128
131
  else:
129
132
  unused_flags.append(f)
130
133
  comment = mo.group(4)[1:].strip() if mo.group(4) else ""
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: efj-parser
3
- Version: 0.9
3
+ Version: 0.9.1
4
4
  Summary: Parse an electronic Flight Journal file
5
5
  Home-page: https://github.com/JonHurst/efj_parser
6
6
  Author: Jon Hurst
7
7
  Author-email: jon.a@hursts.org.uk
8
+ Project-URL: docs, https://hursts.org.uk/efjdocs/
8
9
  Classifier: Development Status :: 4 - Beta
9
10
  Classifier: Programming Language :: Python :: 3
10
11
  Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="efj-parser",
8
- version="0.9",
8
+ version="0.9.1",
9
9
  author="Jon Hurst",
10
10
  author_email="jon.a@hursts.org.uk",
11
11
  description="Parse an electronic Flight Journal file",
@@ -22,4 +22,7 @@ setuptools.setup(
22
22
  "Operating System :: OS Independent",
23
23
  ],
24
24
  python_requires='>=3.11',
25
+ project_urls = {
26
+ "docs" : "https://hursts.org.uk/efjdocs/",
27
+ },
25
28
  )
@@ -22,7 +22,9 @@ G-EFGH:321
22
22
  / 1340/1540 v:30 n:10 ln
23
23
 
24
24
  ++
25
- 0600/1200 r60 test # ESBY
25
+ 0600/1200 r:60 test # ESBY
26
+ +
27
+ 0600/0630 r # HCT
26
28
  """
27
29
  expected_duties = (
28
30
  efj.Duty(
@@ -33,7 +35,11 @@ G-EFGH:321
33
35
  370, 0, (), "Comment"),
34
36
  efj.Duty(
35
37
  dt.datetime(2024, 1, 24, 6),
36
- 360, 60, ("test",), "ESBY"))
38
+ 360, 60, ("test",), "ESBY"),
39
+ efj.Duty(
40
+ dt.datetime(2024, 1, 25, 6),
41
+ 30, 30, (), "HCT")
42
+ )
37
43
 
38
44
  expected_sectors = (
39
45
  efj.Sector(
File without changes
File without changes
File without changes
File without changes
File without changes