From c1a35008f59d53feaac6cf4c4c8893e4c956a5e8 Mon Sep 17 00:00:00 2001 From: Starfall Date: Fri, 29 Oct 2021 00:17:39 -0500 Subject: strike: rename location -> file in handle_file() --- strike.py | 8 ++++---- 1 file 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) -- cgit