diff options
Diffstat (limited to 'strike.py')
-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) |