Code
Hub
Trending
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/geekcomputers/Python
/ sanitize_prefix
Function
sanitize_prefix
photo_timestamp_renamer.py:41–46 ·
view source on GitHub ↗
(s: str)
Source
from the content-addressed store, hash-verified
39
40
41
def
sanitize_prefix(s: str) -> str:
42
s = s.strip()
43
if
not s:
44
return
""
45
s = re.sub(r
"[^\w\-]+"
,
"_"
, s)
46
return
s[:50]
47
48
49
def
exif_datetime_original(path: Path) -> datetime | None:
Callers
1
rename_photos
Function · 0.85
Calls
1
sub
Method · 0.80
Tested by
no test coverage detected