PK!harmonator/__init__.py__version__ = "0.1.0" PK!"мv--+harmonator/exceptions/malformed_filename.pyclass MalformedFilename(Exception): pass PK!A*((,harmonator/exceptions/malformed_filename.pyiclass MalformedFilename(Exception): ... PK!w}harmonator/filename_helpers.pyfrom datetime import datetime import re from .exceptions.malformed_filename import MalformedFilename def format_filename(episode, episode_date): return "Harmontown - S01E{} - {}.mp4".format( str(episode).zfill(3), episode_date.strftime("%Y-%m-%d") ) def parse_filename(episode_filename): if not episode_filename.startswith("Harmontown - S01E"): raise MalformedFilename() matches = re.match( r"Harmontown - S01E(\d+) - (\d+)-(\d+)-(\d+)\.mp4", episode_filename ) return ( int(matches.group(1)), datetime( int(matches.group(2)), int(matches.group(3)), int(matches.group(4)) ), ) PK!Bharmonator/filename_helpers.pyifrom datetime import datetime from typing import Tuple def format_filename(episode: int, episode_date: datetime) -> str: ... def parse_filename(episode_filename: str) -> Tuple: ... def test(a: str) -> str: ... PK!L&SSharmonator/harmonate.pyimport sys import click """ Harmonator Download Harmontown podcasts Format: Harmontown - S01E01 - 2019-01-01.mp4 """ __author__ = "Chris Read" __email__ = "centurix@gmail.com" EXIT_OK = 0 EXIT_HELP = 2 HARMONTOWN_URL = "http://download.harmontown.com/video" @click.command() @click.option("--episode", default=None, help="Episode number to download") @click.argument("destination", default=".") def download(episode, destination): """ With no specific episode 1. Scan the destination folder looking for existing HT episodes 2. Return the latest 3. Scan the download URL for newer ones 4. Download the newest one 5. Rename With a specific episode 1. Find URL's from the first known episode and count forward 2. Once the episode is found, download it 3. Rename With a date 1. Find URL's from the specific date and count forward 2. Once the episode is found, download it 3. Rename :param episode: :param destination: :return: """ return EXIT_OK if __name__ == "__main__": sys.exit(download()) # pragma: no cover PK!HnHTU harmonator-0.1.2.dist-info/WHEEL A н#Z;/"d&F[xzw@Zpy3Fv]\fi4WZ^EgM_-]#0(q7PK!HeP #harmonator-0.1.2.dist-info/METADATAVMs6WN;cR6JIck%_@˜DLcy۷K}rYZ0+&!R+%I<m-%MJ[EGh%ZBdX87.LJzgZN|md3PW\]yENk_iee7(ɸHiֳV} &7O-h }8,s Ah#zkGS̛Fte!:b{ A:2u^!e^2U֨@~P]%\qdo/ K=2)а:z->>~|NjṄs/=spíqϾП-qr$N~&ߐ2R1q{ \fXR]c=g:gY0l37Z`Z1ٞܞ 9/v!w{*zJ} AXnO]P)v4๯ Ty ;G.@aÓB[|[E5n:)jgЛҔO5d!CzrP !H4zЌ);0`f۷yEV6LLWe 쯀zKud++| Pt1!I]7;bOVMC-IBR2(<(cb.x3e*"w1ד5K`i󍀨5*۸R,ދs㤵L }o# ;DKf=LNf,ÚONl^x6s8_'/GlFĿ^>8] C?2i~ o¨BUuTte]Cݭ}UhU3c}4_,UEڸRLj~q e5r$q!1H18EP]2(+a'UPEA 0CK}d/}#ӽ-ΐHaG++\1م"W1^,o؜shC EE%sշ8eoB;?l ` o?;g~*YlJ-z9d[hZ}PK!harmonator/__init__.pyPK!"мv--+Jharmonator/exceptions/malformed_filename.pyPK!A*((,harmonator/exceptions/malformed_filename.pyiPK!w}2harmonator/filename_helpers.pyPK!B harmonator/filename_helpers.pyiPK!L&SSharmonator/harmonate.pyPK!HnHTU  harmonator-0.1.2.dist-info/WHEELPK!HeP #9 harmonator-0.1.2.dist-info/METADATAPK!Hm!?harmonator-0.1.2.dist-info/RECORDPK <