From b819afec391194f89b399dab1f227ed3311eb2e6 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Tue, 3 Nov 2015 23:27:53 +0100 Subject: [PATCH] Switch build to PBR. This gets us: - Automatic changelog - Automatic authors list - Automatic git version management --- .gitignore | 3 +- .mailmap | 7 + MANIFEST.in | 3 +- doc/changelog.txt | 1031 ------------------------------------ dosage | 3 +- dosagelib/__init__.py | 11 +- dosagelib/configuration.py | 10 +- dosagelib/updater.py | 6 +- requirements.txt | 6 - setup.cfg | 46 ++ setup.py | 62 +-- 11 files changed, 75 insertions(+), 1113 deletions(-) create mode 100644 .mailmap delete mode 100644 doc/changelog.txt create mode 100644 setup.cfg diff --git a/.gitignore b/.gitignore index 4ecd05d6f..324c33c03 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,9 @@ /Comics /build /dist -/Changelog.dosage* +/ChangeLog /testresults.txt /dosage.prof /dosage.egg-info /scripts/*.json +/AUTHORS diff --git a/.mailmap b/.mailmap new file mode 100644 index 000000000..b84982353 --- /dev/null +++ b/.mailmap @@ -0,0 +1,7 @@ +Bastian Kleineidam +Bastian Kleineidam +Dirk Reiners +Dirk Reiners +Helge Stasch +Helge Stasch +Tobias Gruetzmacher diff --git a/MANIFEST.in b/MANIFEST.in index 413f1a48c..9f0f608ac 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,2 @@ -exclude .git* -exclude .travis.yml +exclude .* recursive-exclude scripts dosage.* diff --git a/doc/changelog.txt b/doc/changelog.txt deleted file mode 100644 index 604975742..000000000 --- a/doc/changelog.txt +++ /dev/null @@ -1,1031 +0,0 @@ -Dosage 2.16 (released xx.xx.xxxx) - -Features: -- comics: Added Nimona, ShotgunShuffle, Optipess. - Closes: GH bug #80, #81, #86 -- comics: image text can be optional (not on every page) -- output: Next and previous link in HTML output also at the end of the page - -Fixes: -- output: Don't crash when HTML output is run more than once - per day. - Closes: GH bug #78 -- comics: Fixed AbstruseGoose, Carciphona, Curtailed, DieFruehreifen, - DorkTower, GrrlPower, MadamAndEve, OnTheFastTrack, PennyArcade, PvPonline, - RedMeat, Ruthe, ShermansLagoon, SnowFlakes, SnowFlame. - Closes: GH bug #73, #77 - - -Dosage 2.15 (released 3.7.2014) - -Features: -- comics: Added TheThinHLine, Whomp. - Closes: GH bug #64, #67 - -Fixes: -- comics: Fixed DungeonsAndDenizens, GirlGenius, GirlsWithSlingshots, - LookingForGroup, ScandinaviaAndTheWorld. - Closes: GH bug #63, #66 - - -Dosage 2.14 (released 8.6.2014) - -Changes: -- installation: Source releases are now available from PyPi. - -Fixes: -- comics: Fixed LoadingArtist, PennyArcade, ZenPencils. - Closes: GH bug #62 - - -Dosage 2.13 (released 3.3.2014) - -Features: -- comics: Added OhJoySexToy, TheGentlemansArmchair, Underling, DongeonsAndDenizens, - GrimTalesFromDownBelow, TheLandscaper, DieFruehreifen, MonsieurLeChien. - -Fixes: -- comics: Fixed EvilInc, FredoAndPidjin. -- cmdline: Make download threads interruptable with Ctrl-C - - -Dosage 2.12 (released 24.1.2014) - -Changes: -- cmdline: The --basepath option now replaces "~" or "~user" with the - users home directory. -- documentation: Added install instructions at doc/install.txt - -Fixes: -- comics: Fix AbstruseGoose, AxeCop, BardsWorth, DemolitionSquad. -- comics: Remove broken ChugWorth. - - -Dosage 2.11 (released 15.1.2014) - -Features: -- comics: Added CampComic, EatThatToast, FoulLanguage, - PoorlyDrawnLines and StandStillStaySilent. - - -Dosage 2.10 (released 5.1.2014) - -Features: -- comics: Comic strips are downloaded in parallel. To prevent overload - of comic sites, no more than one download thread per host is allowed. - -Changes: -- cmdline: Ensure only one instance of dosage is running to prevent - accidental DoS when fetching multiple comics of one site. -- comics: Wait up to 1 second between two URL page downloads. - - -Dosage 2.9 (released 22.12.2013) - -Features: -- events: Ensure maximum display width on RSS and HTML images. -- comics: Added EdmundFinney, Gaia, GaiaGerman, InternetWebcomic, - NotInventedHere, RedsPlanet, RomanticallyApocalyptic, - ScandinaviaAndTheWorld, TheGamerCat, Weregeek. - Thanks to Null000 for the patches. - Closes: GH bug #48 - -Fixes: -- comics: Get larger images from GoComics. -- comics: Fix AbstruseGoose and QuestionabelContent. - Closes: GH bug #50 - - -Dosage 2.8 (released 8.12.2013) - -Features: -- comics: Added image text saving for comic strips. - Used in xkcd and AbstruseGoose comics to store the - image title text. - Closes: GH bug #42 - -Fixes: -- comics: Fixed ForLackOfABetterComic. -- comics: Store large xkcd images if available. - Closes: GH bug #43 - - -Dosage 2.7 (released 24.11.2013) - -Fixes: -- comics: Fixed GoComic image URL matcher. -- comics: Fixed AxeCop, PensAndTales_FireflyCross. -- comics: Remove broken ComicFury_Rosie, InsideOut, SodiumEyes. - - -Dosage 2.6 (released 12.11.2013) - -Features: -- comics: Added DarthsAndDroid -- docs: Document how to add new comics in docs/adding_new_comics.txt - Closes: GH bug #39 - -Fixes: -- comics: Fixed all DrunkDuckk comics since the domain has moved. -- comics: Fixed AllTheGrowingThings, AxeCop, BookOfBiff, BroodHollow, - Carciphona, CatAndGirl, CatsAndCameras, ChainsawSuit, ElGoonishShive, - EvilInc, Garanos, GleefulNihilism, LeastICouldDo, MysteriesOfTheArcana, - NineteenNinetySeven, NoNeedForBushido, Oglaf, OneQuestion, - OverCompensating, ScenesFromAMultiverse, Shivae, Spinnerette, - Wigu, Wonderella, Wulffmorgenthaler - Closes: GH bug #41 -- comics: Removed broken AetheriaEpics, ChuckBrain, Fallen, HMHigh, - IanJay, InsideOut, Nodwick, WebcomicsNation_ClownSamurai - -Changes: -- cmdline: Display genres in module help (dosage -m). - - -Dosage 2.5 (released 18.7.2013) - -Features: -- comics: Added EatLiver, ICanBarelyDraw, JimBenton, MarriedToTheSea - and NatalieDee. - Closes: GH bug #37 - -Fixes: -- comics: Fixed AxeCop, GoblinsComic, KevinAndKell and other comics. - - -Dosage 2.4 (released 24.6.2013) - -Features: -- comics: Added LinuxComFridayFunnies and OnTheFasttrack. - -Fixes: -- cmdline: The --continue option fetched only one image. - Closes: GH bug #32 - - -Dosage 2.3 (released 26.5.2013) - -Features: -- scripts: Added script to create a CBZ archive for a given comic - directory. - -Fixes: -- comics: Fix LookingForGroup and other comics. - Closes: GH bug #31 - - -Dosage 2.2 (released 30.4.2013) - -Features: -- comics: Added ARedTailsDream, Carciphona, Curtailed, GirlGenius, - Lackadaisy, SabrinaOnline, TheDreamlandChronicles, TwoGuysAndGuy - and Unsound. Patches by Dirk Reiners. - Closes: GH bug #29 -- comics: Comics which are not updated anymore can now be marked. - Closes: GH bug #30 - -Changes: -- cmdline: Ignore trailing '/' at end of comic names. Useful - when using shell completion to pick comics. Patch by Dirk Reiners. - -Fixes: -- comics: Fix DorkTower, MadamAndEve and Saturday Morning Breakfast - Cereal, and improve image filenames of CtrlAltDel. - Patches by Dirk Reiners. - - -Dosage 2.1 (released 14.4.2013) - -Features: -- comics: Add some comic descriptions from their webpages. - -Fixes: -- cmdline: Fix output encoding errors on comic listing. - Closes: GH bug #24 - - -Dosage 2.0 (released 11.4.2013) - -Features: -- comics: Added DamnLol, EverydayBlues, ExtraOrdinary, - ForLackOfABetterComic, GoblinsComic, RealmOfAtland, Science, - SnowFlakes, StuffNoOneToldMe, WebDesignerCOTW and ZenPencils. -- comics: Added the --vote option to vote for popular comics. - -Changes: -- cmdline: Remove deprecated mainline script. - -Fixes: -- install: Add install_requires to setup.py to fix pip install. - Closes: GH bug #22 -- comics: Fixed Curvy, DasLebenIstKeinPonyhof, ExtraLife, EyeOfRamalach, - KatzenfutterGeleespritzer, Oglaf, Precocious, SnowFlame. - Closes: GH bug #23 -- comics: Removed CaribbeanBlue, GreystoneInn, SarahZero. - - -Dosage 1.15 (released 1.4.2013) - -Features: -- comics: Added DrMcNinja, Schuelert. -- output: Added a new JSON output logger. - -Changes: -- comics: Add better source for HagarTheHorrible - Closes: GH bug #21 -- output: Display error traceback information in verbose mode. - -Fixes: -- comics: Fixed GoComics by downloading zoomed images, - fixed WorlWorldSaga* and Eriadan, and removed DerFlix. - - -Dosage 1.14 (released 21.3.2013) - -Features: -- comics: Added KeenSpot comic strips and enable ComicGenesis - comic strips -- comics: Added CucumberQuest, DasLebenIstKeinPonyHof, DemolitionSquad, - DerFlix, DerTodUndDasMaedchen, DogHouseDiaries, FonFlatter, - FullFrontalNerdity, GeeksNextDoor, Hipsters, KatzenfutterGeleespritzer, - KickInTheHead, MyCartoons, OrnerBoy, ParallelUniversum, Ruthe, - SandraAndWooGerman, WormWorldSaga. - Closes: GH bug #15, #19 - -Changes: -- comics: The scraper can check a list of previous and image link - regular expressions, not only a single one. -- comics: Continue searching for images if one image is not found. - Closes: GH bug #18 - -Fixes: -- comics: Fix dilbert image naming. - Closes: GH bug #20 - - -Dosage 1.13 (released 11.3.2013) - -Features: -- comics: Added comic strips AhoiPolloi, AxeCop, Bearmageddon, DeadWinter, - HarkAVagrant, IAmArg, LoadingArtist, Nnewts, PHDComics, PokeyThePenguin, - SnowFlame, WorldOfMrToast and Zwarwald. - -Changes: -- cmdline: Comic lists are displayed one page at a time. -- output: HTML output embeds the images in the page and show the page URLs. -- output: The --output option can be given multiple times. - -Fixes: -- cmdline: Catch error when piping output to another - program or file under Windows. - Closes: GH bug #13 -- cmdline: Catch error when multiple comics match. - Closes: GH bug #16 -- comics: Retry download on empty content to reduce empty file errors. -- comics: Don't save thumbnails in LookingForGroup - Closes: GH bug #17 - - -Dosage 1.12 (released 4.3.2013) - -Features: -- comics: Added comic strips AlphaLuna, AlphaLunaSpanish, BrentalFloss - BrentalFlossFit, BrentalFlossGuest, DangerouslyChloe, MagickChicks, - MenageA3, Namesake, ShadowGirls, StickyDillyBuns. - -Fixes: -- cmdline: Fix option parsing for -l, --singlelist and --version. - Closes: GH bug #10 -- comics: Ensure the file is written to disk on save and detect - empty files as an error. - Closes: GH bug #11 - - -Dosage 1.11 (released 1.3.2013) - -Features: -- comics: Added comic strips Caggage, ManlyGuysDoingManlyThings, - SandraAndWoo and SupernormalStep. - -Changes: -- comics: Always use connection pooling when downloading pages or files. -- cmdline: Replace the deprecated argument parser optparse with argparse. -- installation: The Windows installer now adds a help entry to the start menu - and has a flag to add dosage.exe to the PATH. - -Fixes: -- comics: Correct the list of characters not to quote for URL path encoding. - This fixes a lot of download errors of DrunkDuck comics. -- comics: Fixed a lot of comic strips (see git log for details). - Closes: GH bug #8 - - -Dosage 1.10 (released 10.2.2013) - -Features: -- comics: Added comic strips SequentialArt, VampireCheerleader, - GrrlPower, Spinnerette, HijinksEnsue, Nedroid, Antics, ChannelAte, - ToonHole, ThisIsIndexed, WastedTalent, ChainsawSuit, ThreePanelSoul, - SpaceTrawler, ScenesFromAMultiverse, BroodHollow, BoxerHockey, - Wonderella, BadMachinery, TheBrads, FirstWorldProblems, - OmakeTheater, SkinDeep, ParadigmShift. - -Changes: -- cmdline: Added the --continue option. -- output: Add encoding, inline images and guid tags to RSS output. - -Fixes: -- comics: Fixed Gunnerkrigcourt comic strip. - - -Dosage 1.9 (released 28.1.2013) - -Features: -- comics: Added AmazingSuperPowers comic strip. -- comics: Added PandyLand comic strip. -- comics: Added all comic strips from Arcamax (eg. including - Hagar the horrible). -- documentation: Document parallel download example with xargs - on Unix systems. - -Changes: -- comics: CyanideAndHappiness image filename now has the strip number prefixed. -- comics: Indexed retrieval can now retrieve all (-a) or some (-n) - strips, not only one. - -Fixes: -- comics: Fixed LeastICouldDo image URL. - Closes: GH bug #1 -- comics: Fix URL norming. - Closes: GH bug #2 -- documentation: Fix wrong option name: it's -a instead of -c. - Closes: GH bug #3 -- comics: Fix UnboundLocalError when using indexed retrieval. - Closes: GH bug #4 -- scripts: Ensure the generated comic names do not exceed 100 characters so - they do not cause problems with path length restrictions. -- installation: Set correct homepage url so "pip install dosage" works. - Closes: GH bug #5 - - -Dosage 1.8 (released 20.12.2012) - -Changes: -- comics: Add compatibility to requests module >= 1.0. -- comics: Updated the comic list with the generator scripts. - - -Dosage 1.7 (released 18.12.2012) - -Features: -- cmdline: Added proper return codes for error conditions. -- comics: Added more robust regular expressions for HTML tags. - They match case insensitive and ignore whitespaces now. -- comics: Use the python-requests module for HTTP requests. -- comics: Respect the robots.txt of downloaded HTML pages - -Changes: -- installation: Added support for dynamic configuration values. -- installation: Require and use Python 2.7 -- comics: Removed the twisted and zope dependencies by adding - an internal plugin search mechanism. -- comics: Replace the disable mechanism with an adult option. -- comcis: Add scripts to automate comic listings for Creators, Universal, - KeenSpot, GoComics and DrunkDuck. -- testing: Refactored the test comic routine into fully automatic and - complete tests cases for every comic. -- cmdline: Improved terminal feature detection. - -Fixes: -- comics: Fix all comics! -- comics: Don't add empty URLs to the list of found URLs. - - -Dosage v.1.6.0: - * The "Not Dead Yet" release. - * Added / Fixed / etc. comics: - - Too many to list, really. - * New dependencies: - - Twisted - - zope.interface (not zope) - * Revamped plugin system, the first step on the road to Twisted. - -Dosage v.1.5.8: - * Added comics: - - BonoboConspiracy - - ChasingTheSunset - - Comedity - - GoneWithTheBlastwave - - KeenSpot/* -- a *LOT* of KeenSpot submodules - - NichtLustig - - OtenbaFiles - - Wulffmorgenthaler - - Y - * Fixed comics: - - AbstractGender - - AlienLovesPredator - - AppleGeeks - - EarthsongSaga - - NewWorld - - WhiteNinja - * Moved comics: - - KeenSpot/CatLegend (previously CatLegend) - - All KeenSpot/* comic subnames no longer have "The" prefixes. - - UClick (replaces UComics and UComicsEspanol) - * Removed comics: - - KeenSpot/TheDevilsPanties (duplicate of KeenSpot/DevilsPanties) - -Dosage v.1.5.7: - * Important SmackJeeves module fix. Catchup used to loop around from the - first strip to the last one, thus potentially hammering the SmackJeeves - servers with floods of requests from neverending catchups. - * Added comics: - - AbleAndBaker - - AcademyVale - - Aikida - - Angels2200 - - BetterDays - - BlankLabel (virtual module) - - BoredAndEvil - - Catharsis - - ChuckAndElmo - - CloneManga/PennyTribute - - CourtingDisaster - - DeathToTheExtremist - - DogComplex - - DownToEarth - - Dracula - - DragonTails - - DrFun - - DungeonCrawlInc - - ExtraLife - - FalconTwin - - FightCastOrEvade - - Flipside - - Housd - - JerkCity - - JoeAndMonkey - - KeenSpot/SuicideForHire - - LasLindas - - Nekobox - - Nervillsaga - - NewAdventures - - NewAdventuresOfBobbin - - Nihilism - - Nukees - - OkayPants - - PartiallyClips - - PensAndTales - - RWWR - - WebcomicsNation (virtual module) - - Yirmumah - * Fixed comics: - - Asif - - CatLegend - - CloneManga/NanasEverydayLife - - CloneManga/PaperEleven - - DrunkDuck (various comics no longer present) - - EarthsongSaga - - ErrantStory - - InkTank - - KeenSpot/ (ComicGenesis migration) - - KiagiSwordscat - - Qwantz - - SGVY - - SmackJeeves - - Smamusement - - SnafuComics - - UComicsEspanol - * Moved comics: - - Stubble (previously KeenSpot/Stubble) - -Dosage v.1.5.6: - * Added comics: - - CandyCartoon - - CloneManga/Kanami - - Drowtales - - KeenSpot/FoxTails - - Krakow - - SmackJeeves (virtual module) - * Fixed comics: - - CrapIDrewOnMyLunchBreak - - CtrlAltDel - - DMFA - - EarthsongSaga - - EverybodyLovesEricRaymond - - GirlsWithSlingshots - - KeenSpot - - KeenSpot/WapsiSquare - - NewWorld - - PennyArcade - - PiledHigherAndDeeper - - QuestionableContent - - SluggyFreelance - - SnafuComics - - Sokora - - UComicsEspanol (updated submodules) - - UComics (updated submodules) - * Moved comics: - - CatLegend (previously KeenSpot/CatLegend) - - DominicDeegan (previously KeenSpot/DominicDeegan) - - KeenSpot/TriquetraCats (previously DrunkDuck/TriquetraCats) - - NekoTheKitty (previously KeenSpot/NekoTheKitty) - - TheNoob (previously KeenSpot/TheNoob) - -Dosage v.1.5.5: - * Added comics: - - AbstractGender - - AnimeArcadia - - CaptainSNES - - DrunkDuck/Holy_Zen - - EarthsongSaga - - NinthElsewhere (9th Elsewhere) - - PebbleVersion - - SGVY (Sparkling Generation Valkyrie Yuuki) - - SuccubusJustice - - ErrantStory (previously KeenSpot/ErrantStory) - * Fixed comics: - - DrunkDuck - - PvPonline - - SluggyFreelance - -Dosage v.1.5.4: - * Added comics: - - Andiwear - - DrunkDuck (virtual) - - EverybodyLovesEricRaymond - - FantasyRealms - - KeenSpot/2WayMirror - - KeenSpot/ANT - - KeenSpot/AngelTheDemoness - - KeenSpot/Apotheosis - - KeenSpot/Aquatica - - KeenSpot/BadlyDrawnKitties - - KeenSpot/BobAndFred - - KeenSpot/BrunoTheBandit - - KeenSpot/CatLegend - - KeenSpot/EdibleDirt - - KeenSpot/FelicityFlint - - KeenSpot/Flem - - KeenSpot/GreenAvenger - - KeenSpot/LangLang - - KeenSpot/Picatrix - - KeenSpot/ScandalSheet - - KeenSpot/Shifters - - KeenSpot/SoapOnARope - - KeenSpot/SuburbanJungle - - KeenSpot/TheClassMenagerie - - KeenSpot/TheDevilsPanties - - KeenSpot/ToddAndPenguin - - KeenSpot/TwoLumps - - KeenSpot/Wereworld - - KeenSpot/YouDamnKid - - SokoraRefugees - * Fixed comics: - - AbsurdNotions - - CloneManga - - PastelDefender - - PennyArcade - - SluggyFreelance - -Dosage v.1.5.3: - * Fixed a bug that caused RSS output to crash if the file already existed, - but had no items. - * Added comics: - - CatAndGirl - - CloneManga - - Commissioned - - JoyOfTech - - KeenSpot/AlphaLuna - - KeenSpot/Lowroad75 - - KeenSpot/Werechild - - TheWotch - - TonjaSteele - * Fixed comics: - - DieselSweeties - - LittleGamers - - PennyArcade - - StarCrossdDestiny - - VGCats - -Dosage v.1.5.2: - * Removed some debugging cruft that slipped through in the last release. - * Added comics: - - KeenSpot/TheNoob - - PiledHigherAndDeeper - * Fixed comics: - - ALessonIsLearned - - Misfile - - RealLife - - UComics - - UComicsEspanol - -Dosage v.1.5.1: - * Output event modules now generate proper URLs. You can now pass a base URL - with --base-url, which should correspond to --base-path. If not passed, - Dosage will try to generate a working file:/// URL, but this may not work in - some circumstances. - * RSS output tweaked. - * --list now outputs in columns; pass --single-list to get the old - behaviour (thanks TobiX). - * Added comics: - - AbsurdNotions (contributed by TobiX) - - Altermeta (contributed by TobiX) - - AModestDestiny (contributed by TobiX) - - BadBlood - - BetterYouThanMe - - Bhag (contributed by Shrimp) - - ChroniclesOfGaras (contributed by Shrimp) - - CrapIDrewOnMyLunchBreak (contributed by Shrimp) - - EternalVenture (contributed by Shrimp) - - Evercrest (contributed by TobiX) - - Frump (contributed by Shrimp) - - GUComics (contributed by TobiX) - - KeenSpot/BoomerExpress (contributed by TobiX) - - KevinAndKell (contributed by TobiX) - - LethalDosesClassic (contributed by TobiX) - - LethalDoses (contributed by TobiX) - - ListeningTo11975MHz (contributed by TobiX) - - Marilith - - MinesBigger (contributed by Shrimp) - - MyPrivateLittleHell (contributed by TobiX) - - MyWarWithCulture - - NeoGreenwood (contributed by Shrimp) - - NuklearPower (contributed by Shrimp) - - PerkiGoth (contributed by TobiX) - - PreludesEnd (contributed by Shrimp) - - ShadowInTheMirror (contributed by Shrimp) - - UComicsEspanol - - WhyTheLongFace (contributed by TobiX) - - Winter (contributed by TobiX) - * Fixed comics: - - Creators - - PennyArcade - - UComics (removed comics no longer supported and moved Spanish comics - to UComicsEspanol) - - UnicornJelly - -Dosage v.1.5.0: - * Added an RSS output event. (contributed by Colin Alston) - * Dosage now sends a more descriptive User-Agent HTTP header. - * Dosage will now continue downloading strips until no new strips are - downloaded, this fixed problems with comics that had multiple strips per - page or comics that employed "precache" methods. - * Specific modules can now be disabled by specifying them in - /etc/dosage/disabled (global) and ~/.dosage/disabled (local). - * Fixed problem with division by zero error often occuring under Windows. - * Added comics: - - AlienLovesPredator (contributed by Shrimp) - - AllGrownUp (contributed by Shrimp) - - AsylumOn5thStreet (contributed by Shrimp) - - BizarreUprising (contributed by Shrimp) - - Creators/Archie - - Creators/AskShagg - - Creators/ForHeavensSake - - Creators/Rugrats - - Creators/StateOfTheUnion - - Creators/TheDinetteSet - - Creators/TheMeaningOfLila - - Creators/WeePals - - Creators/ZackHill - - DMFA (contributed by TobiX) - - DoctorRoboto (contributed by Shrimp) - - DoemainOfOurOwn - - EntertainDome (contributed by Shrimp) - - FauxPas (contributed by TobiX) - - IrregularWebcomic (contributed by TobiX) - - JamesFrancis/gonzo - - JamesFrancis/psycindom0 - - JamesFrancis/psycindom1 - - JamesFrancis/psycindom2 - - KeenSpot/AlienDice - - KeenSpot/Avalon - - KeenSpot/CountYourSheep - - KeenSpot/DexLives (contributed by TobiX) - - KeenSpot/DominicDeegan - - KeenSpot/ElGoonishShive - - KeenSpot/ElfLife - - KeenSpot/ErrantStory - - KeenSpot/EverythingJake - - KeenSpot/FriendlyHostility - - KeenSpot/FunnyFarm - - KeenSpot/GamingGuardians - - KeenSpot/GeneCatlow - - KeenSpot/GoblinHollow (contributed by TobiX) - - KeenSpot/GreystoneInn - - KeenSpot/InAPerfectWorld (contributed by TobiX) - - KeenSpot/JoeAverage (contributed by TobiX) - - KeenSpot/MariposaRevelation (contributed by TobiX) - - KeenSpot/NaughtFramed - - KeenSpot/NekoTheKitty (contributed by TobiX) - - KeenSpot/NipAndTuck (contributed by TobiX) - - KeenSpot/OneOverZero (contributed by TobiX) - - KeenSpot/PastelDefender - - KeenSpot/RoadWaffles - - KeenSpot/Scatterplot - - KeenSpot/SchlockMercenary - - KeenSpot/TalesOfTheQuestor (contributed by TobiX) - - KeenSpot/UberSoft - - KeenSpot/UnicornJelly - - KeenSpot/WorldOfFenninRo (contributed by TobiX) - - KeenSpot/ZebraGirl - - LessThanKate (contributed by Shrimp) - - OurHomePlanet (contributed by Shrimp) - - Spamusement - - Sternstaub (contributed by Shrimp) - - TheLounge (contributed by Shrimp) - - TheOrderOfTheStick - - UComics/animatedoliphant - - UComics/anntelnaes - - UComics/askcaptainribman - - UComics/baldoespanol - - UComics/barbarabrandon - - UComics/bensargent - - UComics/billdeore - - UComics/brewsterrockit - - UComics/brucehammond - - UComics/calvinandhobbesespanol - - UComics/cathyespanol - - UComics/chanlowe - - UComics/condorito - - UComics/danasummers - - UComics/danwasserman - - UComics/davidhorsey - - UComics/dicklocher - - UComics/dickwright - - UComics/donwright - - UComics/dougmarlette - - UComics/drewsheneman - - UComics/facesinthenews - - UComics/foxtrotespanol - - UComics/fredbassetespanol - - UComics/garfieldespanol - - UComics/garyvarvel - - UComics/gaturro - - UComics/glennmccoy - - UComics/hubertandabby - - UComics/jackhiggins - - UComics/jackohman - - UComics/jeffdanziger - - UComics/laloalcaraz - - UComics/mattdavies - - UComics/modestyblaise - - UComics/muttandjeffespanol - - UComics/neurotica - - UComics/overboardespanol - - UComics/patoliphant - - UComics/paulconrad - - UComics/pepe - - UComics/poochcafeespanol - - UComics/pricklycity - - UComics/sigmund - - UComics/smallworld - - UComics/stevesack - - UComics/stuartcarlson - - UComics/tedrall - - UComics/thebigpicture - - UComics/theelderberries - - UComics/thefifthwave - - UComics/thefuscobrothers - - UComics/themiddletons - - UComics/thequigmans - - UComics/tomtoles - - UComics/tonyauth - - UComics/tutelandia - - UComics/walthandelsman - - UComics/waynestayskal - - UComics/ziggyespanol - - WiguTV - * Fixed comics: - - Dominion - - KeenSpot/GeneralProtectionFault (contributed by TobiX) - - SluggyFreelance - - UserFriendly - - VGCats (contributed by TobiX) - - Wigu - -Dosage v.1.4.0: - * A manual page for 'mainline' is now inculded. - * Events output; currently the only useful handler is 'html', which - outputs an HTML page with all of the downloaded comics. These - files are named by date, and have links to the previous and next - days (similar to dailystrips). - * Added comics: - - MadamAndEve (contributed by Anthony Caetano) - - SnafuComics/Grim - - SnafuComics/KOF - - SnafuComics/PowerPuffGirls - - SnafuComics/Snafu - - SnafuComics/Tin - - TheParkingLotIsFull - - Zapiro (contributed by Anthony Caetano) - * Fixed comics: - - UserFriendly (naming fix) - -Dosage v.1.3.0: - * Progress bar has been improved; specifically for gauging downloads of - unknown size - * All relevant images are now downloaded where necessary; thanks bruce :) - * Incomplete downloads are discarded - * Removed junview - * Main script is now 'mainline' (used to be 'dosage') - * Added comics: - - AstronomyPOTD - - CounterCulture - - Dominion - - Fallen - - Freefall - - GenrezvousPoint - - KeenSpot/Blindworks - - KeenSpot/BoyMeetsBoy - - KeenSpot/Scrued - - KeenSpot/Stubble - - KeenSpot/TAVision - - KeenSpot/TangsWeeklyComic - - KingFeatures - - OhMyGods - - RedMeat - - WotNow - * Fixed comics: - - MegaTokyo - - SomethingPositive (naming fix) - - TheFray (now a virtual module) - -Dosage v.1.2.0: - * Progress bar is now disabled if the window size cannot be determined - * Source was restructured; the dosage script is now located in the bin/ - directory. - * Added comics: - - BiggerThanCheeses - - BrickShitHouse - - ChugworthAcademy - - DandyAndCompany - - Girly - - HighPingBastard - - Jack - - KeenSpot/ChoppingBlock - - KeenSpot/SaturdayMorningBreakfastCereal - - KeenSpot/StrangeCandy - - KeenSpot/WapsiSquare - - KiagiSwordscat - - MakeWithTheFunny - - Pixel - - PockyBot - - SamAndFuzzy - - Spoonies - -Dosage v.1.1.0: - * A download progress bar is now available on Linux (and probably other - UNIX-like systems) - * Timestamps are now updated even if the strip is not redownloaded - * Added comics: - - ALessonIsLearned - - ASofterWorld - - BoyOnAStickAndSlither - - Chisuji - - ExploitationNow - - KeenSpot/Ghastly - - KeenSpot/Saturnalia - - Loserz - - Qwantz - - StarCrossdDestiny - * Fixed comics: - - LittleGamers - -Dosage v.1.0.1: - * Fix embarassing typo in 1.0.0 which rendered it completely unusable - (albeit a trivial fix). - -Dosage v.1.0.0: - * 1.0 release, yay! - * Set modified time on downloaded images based on Last-Modified header: - Patch provided by gopalv82@yahoo.com, thanks :) - * Fixed --basepath on Windows: - Passing a path that included a drive letter didn't work. - * Added comics: - - TwoTwoOneFour - * Fixed comics: - - SluggyFreelance - -Dosage v.0.3.2: - * Added comics: - - FreakCentral - - KeenSpot/AntiHeroForHire - - KeenSpot/ElfOnlyInn - - KeenSpot/GeneralProtectionFault - - KeenSpot/LimitedSpace - - KeenSpot/LostAndFound - - KeenSpot/Zortic - - RabidMonkeys - - SluggyFreelance - - SpellsAndWhistles - - SuburbanTribe - - TheFray - -Dosage v.0.3.1: - * Removed external helper scripts - * Filesize displayed for downloaded files - * Various documentation changes - * Added --timestamps: - Displays timestamps before every message. - * Added comics: - - SomethingPositive - - UnderPower - - UserFriendly - - KeenSpot/QueenOfWands - - CombustibleOrange - - InkTank/* - - QuestionableContent - * Fixed comics: - - ComicsDotCom/flightdeck - - ComicsDotCom/peanuts - - ButternutSquash - - LifeOfConvenience - -Dosage v.0.3.0: - * Removed filename override: - Since the comic modules now generally have sane names, this is no - longer of much use. - * Better feedback: - The various info levels (up to 3 now) provide much more informative - output. - * Comic wildcards: - @ expands to every comic already present in the basepath, and @@ - expands to every single comic supported by Dosage. - * Added Comics: - - AppleGeeks - - ButternutSquash - - Comet7 - - ComicsDotCom - Lots of submodules, most of them are untested. - - CtrlAltDel - - EightBitTheater - - FragileGravity - - KeenSpot/24fps - - KeenSpot/Alice - - KeenSpot/DeltaVenture - - KeenSpot/ItsWalky - - KeenSpot/PurplePussy - - KeenSpot/TheShadows - - LaurasComics - - MacHall - - Supafine - - VGCats - - WhiteNinja - * Fixed comics: - - KeenSpot/CollegeRoomiesFromHell - - KeenSpot/Wigu (renamed to Wigu) - - UComics/{mullets, nonsequitur, tomthedancingbug} - - PennyArcade - Switch back to the "low" resolution comics; some of the "high" - resolution comics are broken, and the "low" ones seem to be - identical anyway. - * Junview: - Lots of fixes / enhancements, still fairly alpha. - -Dosage v.0.2.0: - * Virtual comic modules - * URL retrying: - Also, if you specify multiple comics, and one of them errors out - for some reason, Dosage will continue with the others. - * Indexed catchup: - You can now start a catchup from a specific index. - * Added comics: - - FilibusterCartoons - - GlueMeat - - RPGWorld - - RealLife - - UComics (see --list, there are around 70 submodules) - * Fixed comics: - - BasilFlint - - DiselSweeties - - SexyLosers - Generate nice filenames now. - * Comic help: - You can now pass --module-help to see module-specific help for - comic modules. - * Junview: - Image viewer written in wxPython, pretty alpha at this stage, - but feel free to play around with it if you're brave. - -Dosage v.0.1.0: - * Various documentation updates - * Added comics: - - LittleGamers - - ClanOfTheCats - - DieselSweeties - - PvPonline - - RadioactivePanda - - ScaryGoRound - * Fixed comics: - - PennyArcade - The comic "bounces" when you get to the first strip, the - "previous" link points to the second comic. Work around this by - checking for the first comic. - - SexyLosers - SexyLosers seems to have implemented referrer checking recently, - this is handled by the new referrer passing support. - * Fix indexed mode up a bit: - The documentation has better examples now. - -Dosage v.0.0.1: - * Initial public release diff --git a/dosage b/dosage index c2c9de103..60f0f4240 100755 --- a/dosage +++ b/dosage @@ -15,6 +15,7 @@ import os import argparse import pydoc from io import StringIO +import dosagelib from dosagelib import events, configuration, singleton, director from dosagelib.output import out from dosagelib.util import internal_error, strlimit @@ -113,7 +114,7 @@ def displayVersion(verbose): text = ('A new version %(version)s of %(app)s is ' 'available at %(url)s.') attrs = dict(version=version, app=configuration.AppName, - url=url, currentversion=configuration.Version) + url=url, currentversion=dosagelib.__version__) print(text % attrs) else: if value is None: diff --git a/dosagelib/__init__.py b/dosagelib/__init__.py index 66bf80429..b082fc6a2 100644 --- a/dosagelib/__init__.py +++ b/dosagelib/__init__.py @@ -12,10 +12,9 @@ your intentions, and received permission to distribute. The primary interface is the 'dosage' commandline script. Comic modules for each comic are located in L{dosagelib.plugins}. """ -import sys -if not (hasattr(sys, 'version_info') or - sys.version_info < (2, 7, 0, 'final', 0)): - raise SystemExit("This program requires Python 2.7 or later.") -# PEP 396 -from .configuration import Version as __version__ +from pkg_resources import get_distribution + +AppName = u'dosage' +dist = get_distribution(AppName) +__version__ = dist.version # PEP 396 diff --git a/dosagelib/configuration.py b/dosagelib/configuration.py index e69df2e58..042ffcf95 100644 --- a/dosagelib/configuration.py +++ b/dosagelib/configuration.py @@ -4,14 +4,16 @@ Define basic configuration data like version or application name. """ -AppName = u'dosage' -Version = u'2.16' # Should be PEP 440 compatible -App = AppName + u' ' + Version +from __future__ import print_function +from . import __version__, AppName + +App = AppName + u' ' + __version__ + Maintainer = u'Tobias Gruetzmacher' MaintainerEmail = u'tobias-dosage@23.gs' Url = u'http://dosage.rocks/' SupportUrl = u'https://github.com/webcomics/dosage/issues' -UserAgent = u"Mozilla/5.0 (compatible; %s/%s; +%s)" % (AppName, Version, Url) +UserAgent = u"Mozilla/5.0 (compatible; %s/%s; +%s)" % (AppName, __version__, Url) Copyright = u"""Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs Copyright (C) 2012-2014 Bastian Kleineidam Copyright (C) 2015 Tobias Gruetzmacher diff --git a/dosagelib/updater.py b/dosagelib/updater.py index 09fc67f40..56ab9fc20 100644 --- a/dosagelib/updater.py +++ b/dosagelib/updater.py @@ -3,7 +3,7 @@ Function to check for updates. """ import os -from .configuration import Version as CurrentVersion +import dosagelib from .util import urlopen from distutils.version import StrictVersion import requests @@ -29,7 +29,7 @@ def check_update (): if version is None: # value is an error message return False, value - if version == CurrentVersion: + if version == dosagelib.__version__: # user has newest version return True, None if is_newer_version(version): @@ -55,4 +55,4 @@ def get_online_version (): def is_newer_version (version): """Check if given version is newer than current version.""" - return StrictVersion(version) > StrictVersion(CurrentVersion) + return StrictVersion(version) > StrictVersion(dosagelib.__version__) diff --git a/requirements.txt b/requirements.txt index 2ea5688d4..856cb4577 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1 @@ -# required: requests>=2.0 -# optional: -argcomplete -lxml -cssselect -Pillow diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..126a347f6 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,46 @@ +[metadata] +name = dosage +maintainer = Tobias Gruetzmacher +maintainer-email = tobias-dosage@23.gs +summary = a comic strip downloader and archiver +description-file = doc/README.txt +home-page = http://dosage.rocks/ +requires-python = >=2.7 +license = MIT +platform = Any +keywords = comic,webcomic,downloader,archiver,crawler +classifier = + Environment :: Console + Intended Audience :: End Users/Desktop + Topic :: Multimedia :: Graphics + Topic :: Internet :: WWW/HTTP + Development Status :: 4 - Beta + License :: OSI Approved :: MIT License + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.3 + Programming Language :: Python :: 3.4 + Operating System :: OS Independent + +[files] +packages = + dosagelib +data_files = + bin = dosage + +[extras] +parser = + lxml +css = + cssselect +dimensions = + Pillow +bash = + argcomplete +test = + pytest-xdist + +[bdist_wheel] +universal=1 diff --git a/setup.py b/setup.py index e6b8091c1..cd1314ae9 100644 --- a/setup.py +++ b/setup.py @@ -1,67 +1,11 @@ #!/usr/bin/env python -# -*- coding: iso-8859-1 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015 Tobias Gruetzmacher -from __future__ import print_function -import os -import codecs -from setuptools import setup, find_packages - -def get_authors(): - """Read list of authors from a text file, filtering comments.""" - authors = [] - authorfile = os.path.join('doc', 'authors.txt') - with codecs.open(authorfile, 'r', 'utf-8') as f: - for line in f: - line = line.strip() - if line and not line.startswith(u'#'): - authors.append(line) - return u", ".join(authors) - - -config = {} -with codecs.open(os.path.join('dosagelib', 'configuration.py')) as fp: - exec(fp.read(), config) +from setuptools import setup setup( - name = config['AppName'], - version = config['Version'], - description = 'a comic strip downloader and archiver', - keywords = 'comic,webcomic,downloader,archiver', - author = get_authors(), - maintainer = config['Maintainer'], - maintainer_email = config['MaintainerEmail'], - license = 'MIT', - url = config['Url'], - packages = find_packages(exclude=['tests']), - scripts = ( - 'dosage', - ), - classifiers = ( - 'Environment :: Console', - 'Intended Audience :: End Users/Desktop', - 'Topic :: Multimedia :: Graphics', - 'Topic :: Internet :: WWW/HTTP', - 'Development Status :: 4 - Beta', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Operating System :: OS Independent', - ), - install_requires = ( - 'requests', - ), - extras_require = { - 'xpath': ["lxml"], - 'css': ['cssselect'], - }, - setup_requires = [ - "setuptools_git >= 1.0", - ] + setup_requires=['pbr'], + pbr=True, )