Update readme
Bugfix debug logging during update unrar-free is now also recognized for displaying unrar version in about section, removed unused not configured string
This commit is contained in:
parent
ef7c6731bc
commit
0aac961cde
14
README.md
14
README.md
|
@ -40,16 +40,12 @@ Calibre-Web is a web app providing a clean interface for browsing, reading and d
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
#### Installation via pip (recommended)
|
#### Installation via pip (recommended)
|
||||||
1. Install calibre web via pip with the command `pip install calibreweb` (Depending on your OS and or distro the command could also be `pip3`).
|
1. To avoid problems with already installed python dependencies, it's recommended to create a virtual environment for Calibre-Web
|
||||||
2. Optional features can also be installed via pip, please refer to [this page](https://github.com/janeczku/calibre-web/wiki/Dependencies-in-Calibre-Web-Linux-Windows) for details
|
2. Install Calibre-Web via pip with the command `pip install calibreweb` (Depending on your OS and or distro the command could also be `pip3`).
|
||||||
3. Calibre-Web can be started afterwards by typing `cps` or `python3 -m cps`
|
3. Optional features can also be installed via pip, please refer to [this page](https://github.com/janeczku/calibre-web/wiki/Dependencies-in-Calibre-Web-Linux-Windows) for details
|
||||||
|
4. Calibre-Web can be started afterwards by typing `cps` or `python3 -m cps`
|
||||||
|
|
||||||
#### Manual installation
|
In the Wiki there are also examples for a [manual installation](https://github.com/janeczku/calibre-web/wiki/Manual-installation) and for installation on [Linux Mint](https://github.com/janeczku/calibre-web/wiki/How-To:Install-Calibre-Web-in-Linux-Mint-19-or-20)
|
||||||
1. Install dependencies by running `pip3 install --target vendor -r requirements.txt` (python3.x). Alternativly set up a python virtual environment.
|
|
||||||
2. Execute the command: `python3 cps.py` (or `nohup python3 cps.py` - recommended if you want to exit the terminal window)
|
|
||||||
|
|
||||||
Issues with Ubuntu:
|
|
||||||
Please note that running the above install command can fail on some versions of Ubuntu, saying `"can't combine user with prefix"`. This is a [known bug](https://github.com/pypa/pip/issues/3826) and can be remedied by using the command `pip install --system --target vendor -r requirements.txt` instead.
|
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ from .subproc_wrapper import process_wait
|
||||||
log = logger.create()
|
log = logger.create()
|
||||||
|
|
||||||
# _() necessary to make babel aware of string for translation
|
# _() necessary to make babel aware of string for translation
|
||||||
_NOT_CONFIGURED = _('not configured')
|
|
||||||
_NOT_INSTALLED = _('not installed')
|
_NOT_INSTALLED = _('not installed')
|
||||||
_EXECUTION_ERROR = _('Execution permissions missing')
|
_EXECUTION_ERROR = _('Execution permissions missing')
|
||||||
|
|
||||||
|
@ -48,14 +47,16 @@ def _get_command_version(path, pattern, argument=None):
|
||||||
|
|
||||||
|
|
||||||
def get_calibre_version():
|
def get_calibre_version():
|
||||||
return _get_command_version(config.config_converterpath, r'ebook-convert.*\(calibre', '--version') \
|
return _get_command_version(config.config_converterpath, r'ebook-convert.*\(calibre', '--version')
|
||||||
or _NOT_CONFIGURED
|
|
||||||
|
|
||||||
|
|
||||||
def get_unrar_version():
|
def get_unrar_version():
|
||||||
return _get_command_version(config.config_rarfile_location, r'UNRAR.*\d') or _NOT_CONFIGURED
|
unrar_version = _get_command_version(config.config_rarfile_location, r'UNRAR.*\d')
|
||||||
|
if unrar_version == "not installed":
|
||||||
|
unrar_version = _get_command_version(config.config_rarfile_location, r'unrar.*\d','-V')
|
||||||
|
return unrar_version
|
||||||
|
|
||||||
def get_kepubify_version():
|
def get_kepubify_version():
|
||||||
return _get_command_version(config.config_kepubifypath, r'kepubify\s','--version') or _NOT_CONFIGURED
|
return _get_command_version(config.config_kepubifypath, r'kepubify\s','--version')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@ class Updater(threading.Thread):
|
||||||
if not os.path.exists(dst_dir):
|
if not os.path.exists(dst_dir):
|
||||||
try:
|
try:
|
||||||
os.makedirs(dst_dir)
|
os.makedirs(dst_dir)
|
||||||
log.debug('Create directory: {}', dst_dir)
|
log.debug('Create directory: {}'.format(dst_dir))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
log.error('Failed creating folder: {} with error {}'.format(dst_dir, e))
|
log.error('Failed creating folder: {} with error {}'.format(dst_dir, e))
|
||||||
if change_permissions:
|
if change_permissions:
|
||||||
|
@ -233,7 +233,7 @@ class Updater(threading.Thread):
|
||||||
permission = os.stat(dst_file)
|
permission = os.stat(dst_file)
|
||||||
try:
|
try:
|
||||||
os.remove(dst_file)
|
os.remove(dst_file)
|
||||||
log.debug('Remove file before copy: %s', dst_file)
|
log.debug('Remove file before copy: {}'.format(dst_file))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
log.error('Failed removing file: {} with error {}'.format(dst_file, e))
|
log.error('Failed removing file: {} with error {}'.format(dst_file, e))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user