pyformatjson 0.3.0__tar.gz → 0.3.2__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.
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/PKG-INFO +2 -2
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/pyformatjson/tools/generate_dict.py +27 -8
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/pyproject.toml +1 -1
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/.github/workflows/docs.yml +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/.github/workflows/publish.yml +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/.github/workflows/release.yml +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/.gitignore +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/.python-version +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/CODE_OF_CONDUCT.md +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/LICENSE +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/README.md +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/docs/api-manual/index.md +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/docs/index.md +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/docs/requirements.txt +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/docs/users-guide/bug-report.md +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/docs/users-guide/installation.md +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/docs/users-guide/pull-request.md +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/main.sublime-project +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/mkdocs.yml +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/pyformatjson/__init__.py +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/pyformatjson/core/__init__.py +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/pyformatjson/core/_base.py +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/pyformatjson/core/update_json.py +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/pyformatjson/main.py +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/pyformatjson/tools/__init__.py +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/pyformatjson/tools/write_dict.py +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/scripts/generate_docs.py +0 -0
- {pyformatjson-0.3.0 → pyformatjson-0.3.2}/tests/test_main.py +0 -0
|
@@ -469,12 +469,18 @@ class GenerateDataDict:
|
|
|
469
469
|
# Parse abstract due date
|
|
470
470
|
abstract_due = None
|
|
471
471
|
if due_str := abbr_dict.get("conf_abstract_due", "").strip():
|
|
472
|
-
|
|
472
|
+
if due_str.upper() == "TBD":
|
|
473
|
+
abstract_due = "TBD"
|
|
474
|
+
else:
|
|
475
|
+
abstract_due = datetime.strptime(due_str, "%d/%m/%Y").date()
|
|
473
476
|
|
|
474
477
|
# Parse conference start date
|
|
475
478
|
start_date = None
|
|
476
479
|
if start_str := abbr_dict.get("conf_date_start", "").strip():
|
|
477
|
-
|
|
480
|
+
if start_str.upper() == "TBD":
|
|
481
|
+
start_date = "TBD"
|
|
482
|
+
else:
|
|
483
|
+
start_date = datetime.strptime(start_str, "%d/%m/%Y").date()
|
|
478
484
|
|
|
479
485
|
# Get today's date
|
|
480
486
|
today = datetime.strptime(datetime.now().strftime("%d/%m/%Y"), "%d/%m/%Y").date()
|
|
@@ -487,15 +493,15 @@ class GenerateDataDict:
|
|
|
487
493
|
|
|
488
494
|
if self.for_vue:
|
|
489
495
|
# Vue.js template format
|
|
490
|
-
if abstract_due:
|
|
496
|
+
if (abstract_due is not None) and (abstract_due != "TBD"):
|
|
491
497
|
abstract_indicator = f"**{{{{ diffDate('{abstract_due}') }}}}**"
|
|
492
|
-
if start_date:
|
|
498
|
+
if (start_date is not None) and (start_date != "TBD"):
|
|
493
499
|
start_indicator = f"**{{{{ diffDate('{start_date}') }}}}**"
|
|
494
500
|
else:
|
|
495
501
|
# Standard day count format
|
|
496
|
-
if abstract_due:
|
|
502
|
+
if (abstract_due is not None) and (abstract_due != "TBD"):
|
|
497
503
|
abstract_indicator = (abstract_due - today).days if today <= abstract_due else "Expired"
|
|
498
|
-
if start_date:
|
|
504
|
+
if (start_date is not None) and (start_date != "TBD"):
|
|
499
505
|
start_indicator = (start_date - today).days if today <= start_date else "Expired"
|
|
500
506
|
|
|
501
507
|
return abstract_indicator, start_indicator
|
|
@@ -520,8 +526,21 @@ class GenerateDataDict:
|
|
|
520
526
|
) -> str:
|
|
521
527
|
"""Construct conference table row string."""
|
|
522
528
|
# Format date strings
|
|
523
|
-
|
|
524
|
-
|
|
529
|
+
if abstract_due is None:
|
|
530
|
+
abstract_date_str = ""
|
|
531
|
+
else:
|
|
532
|
+
if abstract_due == "TBD":
|
|
533
|
+
abstract_date_str = "TBD"
|
|
534
|
+
else:
|
|
535
|
+
abstract_date_str = abstract_due.strftime("%d/%m/%Y")
|
|
536
|
+
|
|
537
|
+
if start_date is None:
|
|
538
|
+
start_date_str = ""
|
|
539
|
+
else:
|
|
540
|
+
if start_date == "TBD":
|
|
541
|
+
start_date_str = "TBD"
|
|
542
|
+
else:
|
|
543
|
+
start_date_str = start_date.strftime("%d/%m/%Y")
|
|
525
544
|
|
|
526
545
|
# Format start date with link if available
|
|
527
546
|
start_date_display = self._format_link(start_date_str, year_url) if start_date_str else ""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|