Skip to content
This repository was archived by the owner on Mar 22, 2025. It is now read-only.

Commit c058309

Browse files
committed
feat: Integrate click for cli and config-parsing
1 parent ccf67d9 commit c058309

File tree

13 files changed

+596
-367
lines changed

13 files changed

+596
-367
lines changed

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
strategy:
1515
matrix:
1616
python-version:
17-
- "3.9"
1817
- "3.10"
1918
- "3.11"
19+
- "3.12"
2020

2121
name: pytest-${{ matrix.python-version }}
2222
steps:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![python](https://img.shields.io/pypi/pyversions/podcast-archiver.svg)](https://pypi.org/project/podcast-archiver/)
1010
[![downloads](https://img.shields.io/pypi/dm/podcast-archiver)](https://pypi.org/project/podcast-archiver/)
1111

12-
[![Code Quality](https://app.codacy.com/project/badge/Grade/d0c31899a9964ccc82fa4080717d45a6)](https://app.codacy.com/gh/janw/podcast-archiver/dashboard)
12+
[![Maintainability](https://api.codeclimate.com/v1/badges/1cdd7513333043558ee7/maintainability)](https://codeclimate.com/github/janw/podcast-archiver/maintainability)
1313
[![codecov](https://codecov.io/gh/janw/podcast-archiver/branch/main/graph/badge.svg?token=G8WI2ZILRG)](https://codecov.io/gh/janw/podcast-archiver)
1414
[![pre-commit.ci](https://results.pre-commit.ci/badge/github/janw/podcast-archiver/main.svg)](https://results.pre-commit.ci/latest/github/janw/podcast-archiver/main)
1515

podcast_archiver/__main__.py

Lines changed: 0 additions & 40 deletions
This file was deleted.

podcast_archiver/argparse.py

Lines changed: 0 additions & 84 deletions
This file was deleted.

podcast_archiver/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from podcast_archiver import constants
1919

2020
if TYPE_CHECKING:
21-
from podcast_archiver.config import Settings
21+
from podcast_archiver.settings import Settings
2222

2323

2424
class PodcastArchiver:
@@ -196,7 +196,7 @@ def truncateLinkList(self, linklist, feed_info):
196196
link = episode_dict["url"]
197197
filename = self.linkToTargetFilename(link, feed_info)
198198

199-
if path.isfile(filename):
199+
if filename and path.isfile(filename):
200200
del linklist[index:]
201201
if self.verbose > 1:
202202
print(f" found existing episodes, {len(linklist)} new to process")
@@ -221,7 +221,7 @@ def parseFeedInfo(self, feedobj):
221221
return None
222222

223223
def processPodcastLink(self, feed_next_page):
224-
feed_info = None
224+
feed_info = {}
225225
linklist = []
226226
while True:
227227
if not (feedobj := self.getFeedObj(feed_next_page)):
@@ -255,7 +255,7 @@ def checkEpisodeExistsPreflight(self, link, *, feed_info, episode_dict):
255255
if self.verbose > 1:
256256
print("\tLocal filename:", filename)
257257

258-
if path.isfile(filename):
258+
if filename and path.isfile(filename):
259259
if self.verbose > 1:
260260
print("\t✓ Already exists.")
261261
return None

0 commit comments

Comments
 (0)