polar: add test for orger integration
This commit is contained in:
parent
0f27071dcc
commit
87ad9d38bb
2 changed files with 42 additions and 13 deletions
|
@ -246,3 +246,10 @@ def isoparse(s: str) -> tzdatetime:
|
|||
assert s.endswith('Z'), s
|
||||
s = s[:-1] + '+00:00'
|
||||
return fromisoformat(s)
|
||||
|
||||
|
||||
import re
|
||||
# https://stackoverflow.com/a/295466/706389
|
||||
def get_valid_filename(s: str) -> str:
|
||||
s = str(s).strip().replace(' ', '_')
|
||||
return re.sub(r'(?u)[^-\w.]', '', s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue