From: Jan Szejko Date: Thu, 21 Jan 2016 14:01:34 +0000 (+0100) Subject: removed dependency from wolnelektury X-Git-Tag: 1.7~81 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/84b462901aece7eda7ef1704c748a5e5b4b3df26?ds=sidebyside;hp=-c removed dependency from wolnelektury --- 84b462901aece7eda7ef1704c748a5e5b4b3df26 diff --git a/librarian/__init__.py b/librarian/__init__.py index d307def..0c77901 100644 --- a/librarian/__init__.py +++ b/librarian/__init__.py @@ -10,7 +10,7 @@ import re import shutil import urllib -from wolnelektury.utils import makedirs +from util import makedirs class UnicodeException(Exception): diff --git a/librarian/packagers.py b/librarian/packagers.py index b3ae955..f57a983 100644 --- a/librarian/packagers.py +++ b/librarian/packagers.py @@ -7,7 +7,7 @@ import os from librarian import pdf, epub, mobi, DirDocProvider, ParseError from librarian.parser import WLDocument -from wolnelektury.utils import makedirs +from util import makedirs class Packager(object): diff --git a/librarian/partners.py b/librarian/partners.py index dccb5b6..33198f7 100644 --- a/librarian/partners.py +++ b/librarian/partners.py @@ -13,7 +13,7 @@ New partners shouldn't be added here, but in the partners repository. """ from librarian import packagers, cover -from wolnelektury.utils import makedirs +from util import makedirs class GandalfEpub(packagers.EpubPackager): diff --git a/librarian/util.py b/librarian/util.py index 396c84b..0886fd5 100644 --- a/librarian/util.py +++ b/librarian/util.py @@ -2,6 +2,8 @@ # by Paul Winkler # http://code.activestate.com/recipes/81611-roman-numerals/ # PSFL (GPL compatible) +import os + def int_to_roman(input): """ @@ -115,3 +117,8 @@ def roman_to_int(input): return sum else: raise ValueError, 'input is not a valid roman numeral: %s' % input + + +def makedirs(path): + if not os.path.isdir(path): + os.makedirs(path) \ No newline at end of file