From a2414cb3a3a7cb8f3f08d52d8af2f207959a7b1e Mon Sep 17 00:00:00 2001 From: Mike Lynch Date: Tue, 3 Oct 2023 09:52:05 +1100 Subject: [PATCH] Initial commit --- .gitignore | 1 + README.md | 0 autoradio/__init__.py | 0 autoradio/autoradio.py | 20 ++++++++++++++++++++ poetry.lock | 30 ++++++++++++++++++++++++++++++ pyproject.toml | 18 ++++++++++++++++++ tests/__init__.py | 0 7 files changed, 69 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 autoradio/__init__.py create mode 100644 autoradio/autoradio.py create mode 100644 poetry.lock create mode 100644 pyproject.toml create mode 100644 tests/__init__.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c18dd8d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/autoradio/__init__.py b/autoradio/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/autoradio/autoradio.py b/autoradio/autoradio.py new file mode 100644 index 0000000..52f886f --- /dev/null +++ b/autoradio/autoradio.py @@ -0,0 +1,20 @@ + +import feedparser +import argparse +import json +from pathlib import Path + +def main(): + ap = argparse.ArgumentParser("autoradio - download audio from RSS feeds") + ap.add_argument( + "--config", + default="./config.json", + type=Path, + help="Config file", + ) + args = ap.parse_args() + with open(args.config, 'r') as cfh: + cf = json.load(cfh) + print(cf) + + diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..0425be6 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,30 @@ +# This file is automatically @generated by Poetry 1.5.0 and should not be changed by hand. + +[[package]] +name = "feedparser" +version = "6.0.10" +description = "Universal feed parser, handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds" +optional = false +python-versions = ">=3.6" +files = [ + {file = "feedparser-6.0.10-py3-none-any.whl", hash = "sha256:79c257d526d13b944e965f6095700587f27388e50ea16fd245babe4dfae7024f"}, + {file = "feedparser-6.0.10.tar.gz", hash = "sha256:27da485f4637ce7163cdeab13a80312b93b7d0c1b775bef4a47629a3110bca51"}, +] + +[package.dependencies] +sgmllib3k = "*" + +[[package]] +name = "sgmllib3k" +version = "1.0.0" +description = "Py3k port of sgmllib." +optional = false +python-versions = "*" +files = [ + {file = "sgmllib3k-1.0.0.tar.gz", hash = "sha256:7868fb1c8bfa764c1ac563d3cf369c381d1325d36124933a726f29fcdaa812e9"}, +] + +[metadata] +lock-version = "2.0" +python-versions = "^3.9" +content-hash = "b174a7eabcd92b902e7d7381cd453724319fb6563151d344f5011cc51efb3689" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..41ca383 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,18 @@ +[tool.poetry] +name = "autoradio" +version = "0.1.0" +description = "" +authors = ["Mike Lynch "] +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.9" +feedparser = "^6.0.10" + +[tool.poetry.scripts] +autoradio = "autoradio.autoradio:main" + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29