2016-03-03 01:05:36 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
2016-10-29 00:21:41 +02:00
|
|
|
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
|
2014-01-05 16:50:57 +01:00
|
|
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
2019-06-19 07:12:43 +02:00
|
|
|
# Copyright (C) 2015-2019 Tobias Gruetzmacher
|
2012-06-20 21:58:13 +02:00
|
|
|
"""
|
2013-03-06 20:00:30 +01:00
|
|
|
Automated comic downloader. Dosage traverses comic websites in
|
2012-06-20 21:58:13 +02:00
|
|
|
order to download each strip of the comic. The intended use is for
|
|
|
|
mirroring the strips locally for ease of viewing; redistribution of the
|
|
|
|
downloaded strips may violate copyright, and is not advisable unless you
|
|
|
|
have communicated with all of the relevant copyright holders, described
|
|
|
|
your intentions, and received permission to distribute.
|
|
|
|
|
2013-03-26 17:29:20 +01:00
|
|
|
The primary interface is the 'dosage' commandline script.
|
|
|
|
Comic modules for each comic are located in L{dosagelib.plugins}.
|
2012-06-20 21:58:13 +02:00
|
|
|
"""
|
2016-06-05 16:01:35 +02:00
|
|
|
from __future__ import absolute_import, division, print_function
|
2013-07-04 20:55:43 +02:00
|
|
|
|
2019-12-05 20:51:39 +01:00
|
|
|
try:
|
|
|
|
from importlib.metadata import version, PackageNotFoundError
|
|
|
|
except ImportError:
|
|
|
|
from importlib_metadata import version, PackageNotFoundError
|
2016-06-05 16:01:35 +02:00
|
|
|
|
2019-12-05 20:51:39 +01:00
|
|
|
from .output import out
|
|
|
|
|
|
|
|
AppName = u'dosage'
|
2019-06-19 07:12:43 +02:00
|
|
|
try:
|
2019-12-05 20:51:39 +01:00
|
|
|
__version__ = version(AppName) # PEP 396
|
|
|
|
except PackageNotFoundError:
|
2019-06-19 07:12:43 +02:00
|
|
|
# package is not installed
|
2019-12-05 21:23:30 +01:00
|
|
|
out.warn('{} is not installed, no version available.'
|
|
|
|
' Use at least {!r} or {!r} to fix this.'.format(
|
|
|
|
AppName, 'pip install -e .', 'setup.py egg_info'))
|
|
|
|
__version__ = 'ERR.NOT.INSTALLED'
|