diff options
Diffstat (limited to '')
| -rw-r--r-- | patternutils/commands/prss.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/patternutils/commands/prss.py b/patternutils/commands/prss.py index cc81ee1..95e6a3c 100644 --- a/patternutils/commands/prss.py +++ b/patternutils/commands/prss.py @@ -51,7 +51,7 @@ def prss( "feed_description": parsed_feed.feed.description, } - files = [f for f in walk(directory)] + files = [f.name for f in walk(directory)] matches = [] @@ -68,18 +68,15 @@ def prss( except ValueError: click.secho(f"{file_to_search} not found!", fg="red", err=True) else: - filename = file_to_search[file_index] + filename = files[file_index] entry_values = { "title": entry.title, "link": entry.link, "description": entry.description, "id": entry.id, "enclosure_href": entry.enclosures[0]["href"], - "_path": filename.path, - "_name": filename.name, - "_abspath": os.path.abspath(f.path), - "_realpath": os.path.realpath(f.path), - "_relpath": os.path.relpath(f.path), + "_name": filename, + "_abspath": os.path.abspath(filename), } entry_values.update(default_values) matches.append(entry_values) |
