Skip to content

Search_for_wildcards function updated to add @DATETO@ functionality #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
19 changes: 19 additions & 0 deletions datashuttle/configs/canonical_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,24 @@ def tags(tag_name: str) -> str:
"datetime": "@DATETIME@",
"to": "@TO@",
"*": "@*@",
"DATETO": "@DATETO@",
"TIMETO": "@TIMETO@",
"DATETIMETO": "@DATETIMETO@",
}
return tags[tag_name]


def get_datetime_formats() -> dict:
"""
Get all datetime format strings.

Returns
-------
dict
A dictionary containing format strings for datetime, time, and date
"""
return {
"datetime": "%Y%m%dT%H%M%S",
"time": "%H%M%S",
"date": "%Y%m%d",
}
2 changes: 1 addition & 1 deletion datashuttle/utils/data_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def get_processed_names(
processed_names = formatting.check_and_format_names(
names_checked, prefix
)
processed_names = folders.search_for_wildcards(
processed_names = folders.search_with_tags(
self.__cfg,
self.__base_folder,
self.__local_or_central,
Expand Down
Loading