2020-04-18 11:45:44 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
2024-02-18 16:26:54 +00:00
|
|
|
# SPDX-FileCopyrightText: © 2004 Tristan Seligmann and Jonathan Jacobs
|
|
|
|
# SPDX-FileCopyrightText: © 2012 Bastian Kleineidam
|
|
|
|
# SPDX-FileCopyrightText: © 2015 Tobias Gruetzmacher
|
2012-06-20 19:58:13 +00:00
|
|
|
"""
|
2013-03-06 19:00:30 +00:00
|
|
|
Automated comic downloader. Dosage traverses comic websites in
|
2012-06-20 19:58:13 +00: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 16:29:20 +00:00
|
|
|
The primary interface is the 'dosage' commandline script.
|
|
|
|
Comic modules for each comic are located in L{dosagelib.plugins}.
|
2012-06-20 19:58:13 +00:00
|
|
|
"""
|
2013-07-04 18:55:43 +00:00
|
|
|
|
2024-02-18 16:26:54 +00:00
|
|
|
from importlib.metadata import version, PackageNotFoundError
|
2016-06-05 14:01:35 +00:00
|
|
|
|
2019-12-05 19:51:39 +00:00
|
|
|
from .output import out
|
|
|
|
|
2024-02-18 16:26:54 +00:00
|
|
|
AppName = 'dosage'
|
2019-06-19 05:12:43 +00:00
|
|
|
try:
|
2019-12-05 19:51:39 +00:00
|
|
|
__version__ = version(AppName) # PEP 396
|
|
|
|
except PackageNotFoundError:
|
2019-06-19 05:12:43 +00:00
|
|
|
# package is not installed
|
2019-12-05 20:23:30 +00: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'
|