https://github.com/vasnake/fb2tools
Python scripts for prepare FB2 files easily
https://github.com/vasnake/fb2tools
Last synced: about 1 month ago
JSON representation
Python scripts for prepare FB2 files easily
- Host: GitHub
- URL: https://github.com/vasnake/fb2tools
- Owner: vasnake
- License: gpl-3.0
- Created: 2014-06-11T09:33:37.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-18T20:50:34.000Z (about 12 years ago)
- Last Synced: 2025-01-03T12:12:31.218Z (over 1 year ago)
- Language: Python
- Size: 188 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
fb2tools
========
Python scripts for prepare FB2 files easily
This Python package make use of fb2desc.py by [Con Radchenko] and contains some useful functions.
In the beginning it was [Prelude].
Function
fb2tools.zipname.zipToFullname
or console command
python -u -m fb2tools namezip --workdir /path/to/write/zip --scandir /path/where/search/fb2
Search for all ``*.fb2`` files in ``scandir`` folder recursively and for each file:
- extract Author name and Book name;
- pack book to ``workdir/Authorname - Bookname.fb2.zip`` file.
Function
fb2tools.zipname.booksNameStays
or console command
python -u -m fb2tools stripauthor --workdir /path/where/search/zip
Search for all ``*.zip`` files in ``workdir`` folder recursively and for each file:
- rename file from ``Authorname - Bookname.fb2.zip`` to ``Bookname.fb2.zip``;
- remove non alphabetic symbols from filename.
Usage
-----
Install package using setuptools and virtualenv
python setup.py develop
or
pip install git+git://github.com/vasnake/fb2tools.git@master
or
pip install /path/to/sdist/distribution/fb2tools-0.0.1.zip
Call a function
python -u -m fb2tools namezip --workdir /path/to/write/zip --scandir /path/where/search/fb2
python -u -m fb2tools stripauthor --workdir /path/where/search/zip
[Prelude]:http://vasnake.blogspot.ru/2011/04/blog-post_18.html
[Con Radchenko]:http://pybookreader.narod.ru/misc.html