diff options
author | Starfall <us@starfall.systems> | 2021-10-29 00:17:39 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2023-12-05 10:00:52 -0600 |
commit | c1a35008f59d53feaac6cf4c4c8893e4c956a5e8 (patch) | |
tree | eb265ed25f51094dbc2b569cc0381bcd5e1c9948 | |
parent | d528dcbf7fb70d6004c6408e5663d9ce1bd1cb5c (diff) |
strike: rename location -> file in handle_file()
-rwxr-xr-x | strike.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/strike.py b/strike.py index 1f37a77..1bb3769 100755 --- a/strike.py +++ b/strike.py @@ -20,12 +20,12 @@ def read_config(location): config.read(location) return location.resolve().parent, config -def handle_file(location): +def handle_file(file): meta = dict( - title = location.stem, - date = strftime('%a, %d %b %Y %H:%M:%S GMT', gmtime(location.stat().st_mtime)) + title = file.stem, + date = strftime('%a, %d %b %Y %H:%M:%S GMT', gmtime(file.stat().st_mtime)) ) - contents = location.read_text() + contents = file.read_text() delim = '---\n' if contents.startswith(delim): parts = contents.split(delim, maxsplit=2) |