diff --git a/.github/workflows/poetry-publish.yml b/.github/workflows/poetry-publish.yml new file mode 100644 index 0000000..8815573 --- /dev/null +++ b/.github/workflows/poetry-publish.yml @@ -0,0 +1,14 @@ +name: Python package +on: + push: + tags: + - "v*.*.*" +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build and publish to pypi + uses: JRubics/poetry-publish@v1.10 + with: + pypi_token: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file diff --git a/src/hstp/__init__.py b/hstp/__init__.py similarity index 100% rename from src/hstp/__init__.py rename to hstp/__init__.py diff --git a/src/hstp/__main__.py b/hstp/__main__.py similarity index 100% rename from src/hstp/__main__.py rename to hstp/__main__.py diff --git a/src/audioboom/__init__.py b/hstp/audioboom/__init__.py similarity index 100% rename from src/audioboom/__init__.py rename to hstp/audioboom/__init__.py diff --git a/src/audioboom/channel.py b/hstp/audioboom/channel.py similarity index 100% rename from src/audioboom/channel.py rename to hstp/audioboom/channel.py diff --git a/src/audioboom/downloader/__main__.py b/hstp/audioboom/downloader/__main__.py similarity index 100% rename from src/audioboom/downloader/__main__.py rename to hstp/audioboom/downloader/__main__.py diff --git a/src/audioboom/structures.py b/hstp/audioboom/structures.py similarity index 100% rename from src/audioboom/structures.py rename to hstp/audioboom/structures.py diff --git a/src/audioboom/utils.py b/hstp/audioboom/utils.py similarity index 100% rename from src/audioboom/utils.py rename to hstp/audioboom/utils.py diff --git a/src/hstp/episode.py b/hstp/episode.py similarity index 100% rename from src/hstp/episode.py rename to hstp/episode.py diff --git a/src/hstp/info.py b/hstp/info.py similarity index 100% rename from src/hstp/info.py rename to hstp/info.py diff --git a/src/hstp/podcast.py b/hstp/podcast.py similarity index 97% rename from src/hstp/podcast.py rename to hstp/podcast.py index 237d0f6..cbed194 100644 --- a/src/hstp/podcast.py +++ b/hstp/podcast.py @@ -87,8 +87,8 @@ def dump(self, include_episodes=True): "name": self.name, "slug": self.slug, "description": self.description, - "last-updated": dates[-1], - "first-episode": dates[0], + "last-updated": dates[-1] if dates else "1970-01-01T00:00:00Z", + "first-episode": dates[0] if dates else "1970-01-01T00:00:00Z", "links": self.links } diff --git a/src/hstp/reader.py b/hstp/reader.py similarity index 100% rename from src/hstp/reader.py rename to hstp/reader.py diff --git a/src/hstp/utils.py b/hstp/utils.py similarity index 100% rename from src/hstp/utils.py rename to hstp/utils.py diff --git a/pyproject.toml b/pyproject.toml index ac2e2e1..7cbb289 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,4 +22,4 @@ build-backend = "poetry.core.masonry.api" [tool.poetry.plugins."console_scripts"] "hstp" = "hstp.__main__:main" -"audioboom-download" = "audioboom.downloader.__main__:main" \ No newline at end of file +"audioboom-download" = "hstp.audioboom.downloader.__main__:main" \ No newline at end of file