Package: py-ebooktools
🚧Work-In-ProgressThis project is a Python port ofebook-toolswhich is written in Shell byna–. The Python scriptebooktools.pyis a collection of tools for automated
and semi-automated organization and management of large ebook collections.ebooktools.pymakes use of the following tools:edit: to edit a configuration file which can either be the main config
file that contains all the options defined below or the logging config file.split: to split the supplied ebook files (and the accompanying metadata
files if present) into folders with consecutive names that each contain the
specified number of files.WarningMore to come!Check theRoadmapto know what is coming soon.ContentsInstallationUsage, options and configurationGeneral optionsGeneral control flagsOptions related to extracting ISBNs from files and finding metadata by ISBNOptions for OCROptions related to extracting and searching for non-ISBN metadataOptions related to the input and output filesMiscellaneous optionsScript usage and optionsedit [<OPTIONS>] cfg_type {main,log}DescriptionOptionssplit [<OPTIONS>] folder_with_booksDescriptionOptionsUninstallRoadmapReferencesLicenseInstallationIt is highly recommended to install the packagepy_ebooktoolsin a virtual
environment using for examplevenvorconda.Make sure to updatepip:$ pip install --upgrade pipInstall the packagepy_ebooktools(bleeding-edge version) withpip:$ pip install git+https://github.com/raul23/py-ebooktools#egg=py-ebooktoolsWarningMake sure thatpipis working with the correct Python version. It might be
the case thatpipis using Python 2.x You can find what Python versionpipuses with the following:$ pip -VIfpipis working with the wrong Python version, then try to usepip3which works with Python 3.xTest installationTest your installation by importingpy_ebooktoolsand printing its version:$ python -c "import py_ebooktools; print(py_ebooktools.__version__)"You can also test that the scriptebooktools.pyruns by showing the program’s
version:$ ebooktools --versionUsage, options and configurationAll of the options documented below can either be passed to theebooktools.pyscript via command-line parameters or via the configuration fileconfig.py.
Command-line parameters supersede variables defined in the configuration file.
Most parameters are not required and if nothing is specified, the default value
defined in the default config filedefault_config.pywill be used.General optionsGeneral control flags-v,--verbose; config variableverbose; default valueFalse-d,--dry-run; config variabledry_run; default valueFalse--sl,--symlink-only; config variablesymlink_only; default valueFalseOptions related to extracting ISBNs from files and finding metadata by ISBN-i<value>,--isbn-regex<value>; config variableisbn_regex; see
default value inlib.pyOptions for OCR--ocr<value>,--ocr-enabled<value>; config variableocr_enabled;
default valueFalse--ocrop<value>,--ocr-only-first-last-pages<value>; config variableocr_only_first_last_pages; default value(7,3)(except forconvert-to-txt.pywhere it’sFalse)Options related to extracting and searching for non-ISBN metadataOptions related to the input and output filesMiscellaneous options-r,--reverse; config variablefile_sort_reverse; default valueFalseIf this is enabled, the files will be sorted in reverse (i.e. descending) order.
By default, they are sorted in ascending order.Script usage and optionsedit [<OPTIONS>] cfg_type {main,log}DescriptionEdit a configuration file, either the main configuration file (main) or the
logging configuration file (log). The configuration file can be opened by a
user-specified application (app) or a default program associated with this
type of file (whenappisNone).Options-a<value>,--app<value>; config variableapp;
default valueNone-r,--reset; no config variable; default valueFalsesplit [<OPTIONS>] folder_with_booksDescriptionSplit the supplied ebook files (and the accompanying metadata files if present)
into folders with consecutive names that each contain the specified number of
files.Options-o<value>,--output-folder<value>; config variableoutput_folder;default value is the current working directory(check withpwd)The output folder in which all the new consecutively named folders will be
created.-s<value>,--start-number<value>; config variablestart_number;
default value0The number of the first folder.-f<value>,--folder-pattern<value>; config variablefolder_pattern; default value%05d000The print format string that specifies the pattern with which new folders
will be created. By default it creates folders like00000000, 00001000, 00002000, ....--fpf<value>,--files-per-folder<value>; env. variablefiles_per_folder; default value1000How many files should be moved to each folder.UninstallTo uninstall the packagepy_ebooktools:$ pip uninstall py_ebooktoolsInformationWhen uninstalling thepy_ebooktoolspackage, you might be informed
that the configuration fileslogging.pyandconfig.pywon’t be
removed bypip. You can remove those files manually by noting their paths
returned bypip. Or you can leave them so your saved settings can be
re-used the next time you re-install the package.Example:uninstall the package and remove the config files$pipuninstallpy_ebooktoolsFound existing installation: py-ebooktools 0.1.0
Uninstalling py-ebooktools-0.1.0:
  Would remove:
    /Users/test/miniconda3/envs/ebooktools_py37/bin/ebooktools
    /Users/test/miniconda3/envs/ebooktools_py37/lib/python3.7/site-packages/py_ebooktools-0.1.0.dist-info/*
    /Users/test/miniconda3/envs/ebooktools_py37/lib/python3.7/site-packages/py_ebooktools/*
  Would not remove (might be manually added):
    /Users/test/miniconda3/envs/ebooktools_py37/lib/python3.7/site-packages/py_ebooktools/configs/config.py
    /Users/test/miniconda3/envs/ebooktools_py37/lib/python3.7/site-packages/py_ebooktools/configs/logging.py
Proceed (y/n)? y
  Successfully uninstalled py-ebooktools-0.1.0$rm-r/Users/test/miniconda3/envs/ebooktools_py37/lib/python3.7/site-packages/py_ebooktools/RoadmapPort all ofebook-toolsshell scripts into Pythonorganize-ebooks.sh:not started yetinteractive-organizer.sh:not started yetfind-isbns.sh:working on itconvert-to-txt.sh:working on itrename-calibre-library.sh:not started yetsplit-into-folders.sh:done, seesplit_into_folders.pyAdd testsEventually add documentation onreadthedocsReferencesebook-tools: Shell scripts for organizing and managing ebook collections.LicenseThis program is licensed under the GNU General Public License v3.0. For more
details see theLICENSEfile in the repository.