A powerful file organizer and ebook manager for e-book metadata retrieval and renaming with ease
Project description
forgy
forgy is a powerful file organizer and e-book manager with a command-line interface for reliable retrieval of e-book metadata and easy renaming of PDF e-books.
With forgy, you can automatically extract valid ISBNs from many PDF e-books, get metadata for ebooks using extracted ISBNs, rename 'unknown' books using retrieved metadata, organize a messy file collection into folders according to their formats, and much more. This project arose due to the perceived need to reliably rename e-books with their correct titles while keeping them organized on a computer, without installing and depending on bloated software with busy interface.
The goal is to easily create and maintain a decent personal PDF e-book library, especially when identifying PDF e-books by their names becomes difficult. The name forgy is from the project's roots as a file organizer in Python.
Note: Development and testing was done on a Windows 10 PC, with python 3.12 installed, in such a way as to ensure platform independence. Feel free to try forgy out on other
platforms.
Table of Contents
Installation
-
Verify that you have python installed on your computer.
Open windows command prompt (
windows button + cmd + enter) and check python version usingpython --version+enter. You should see your python version, which in this case is3.12.If you don't have python installed, you can download it here
-
Install forgy directly from PyPI.
python -m pip install forgy
This installation includes forgy public APIs and its command-line interface. You can also include
forgy>=0.1.0in yourrequirements.txtto install forgy as a dependency in your project
Usage
forgy can be used via its CLI (recommended) or by importing or calling its public APIs directly. The CLI option currently has more documentation and is therefore recommended.
This section assumes that you have installed forgy via pip as earlier explained.
-
Check whether the commandline tool is properly installed on your computer. Once you enter forgy in your command line, you should see the Namespace object from parser.
Namespace(subcommands=None) Please provide a valid subcommandIf you see the above, forgy CLI should be accessible via command prompt. However, if that is not the case, you may need to add python Scripts to your PATH to enable execution of the CLI.
-
To view help page to understand all sub-commands available in forgy, pass the h*elp argument to forgy.
forgy -hSample output:
usage: forgy [-h] [--version] {get_metadata,get_isbns_from_texts,get_single_metadata,organize_extension,get_files_from_dir,copy_directory_contents,move_directories,delete_files_directories} ... A powerful file organizer, ebook manager, and book metadata extractor in python options: -h, --help show this help message and exit --version show program's version number and exit forgy Operations: Valid subcommands {get_metadata,get_isbns_from_texts,get_single_metadata,organize_extension,get_files_from_dir,copy_directory_contents,move_directories,delete_files_directories} get_metadata retrieve PDF e-book metadata and rename several PDF e-books with it get_isbns_from_texts extract isbns from several PDF e-books contained in source_directory get_single_metadata get metatada for a single book using file path and title or isbn organize_extension organize files by extension or format get_files_from_dir aggregate pdf files from various directories/sources copy_directory_contents copy contents of source directory into destination directory (files and directories included) move_directories move directories to another destination delete_files_directories delete files or directo- ries in source directory. WARNING: permanent operation!
Welcome to forgy v0.1.3!
<br/>
From the above, there are eight major sub-commands you can use to carryout various operations on your files and directories. These include:
<br/>
- ```get_metadata```
- ```get_isbns_from_texts```
- ```get_single_metadata```
- ```organize_extension```
- ```get_files_from_dir```
- ```copy_directory_contents```
- ```move_directories```
- ```delete_files_directories```
<br/>
The function of the above sub-commands are as stated in the command-line help shown earlier. You can view usage of sub-commands using: ```forgy sub-command --help```.
See project GitHub page [here](https://github.com/misterola/forgy) for more details.
<br/>
<br/>
[🔝 Back to Table of Contents](#table-of-contents)
<br/>
<br/>
## License
GNU Affero General Public License ([AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.txt))
<br/>
[🔝 Back to Table of Contents](#table-of-contents)
<br/>
<br/>
## Dependencies
- [requests - make HTTP request](https://github.com/psf/requests)
- [pypdf - extract text from PDF ebook](https://github.com/py-pdf/pypdf)
- [dotenv - manage user Google BooksAPI key-value pairs as environment variables](https://github.com/theskumar/python-dotenv)
- [flake8 - format code](https://flake8.pycqa.org/en/latest/)
- [reportlab - to create pdf file in some test](https://pypi.org/project/reportlab)
<br/>
<br>
[Back to Top](#forgy)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file forgy-0.1.3.tar.gz.
File metadata
- Download URL: forgy-0.1.3.tar.gz
- Upload date:
- Size: 58.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c10059e741880c367b8e10644433083f8b3577bb6309806ca34baac65af9470
|
|
| MD5 |
3e81c173808f3c74678451c0f180aa50
|
|
| BLAKE2b-256 |
e6e0241da34051d731641285b792adb661d5d94353f5a214e6f7f5101ff260a5
|
File details
Details for the file forgy-0.1.3-py3-none-any.whl.
File metadata
- Download URL: forgy-0.1.3-py3-none-any.whl
- Upload date:
- Size: 54.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbef5e8ad5d73ac988f20258a48554c891496e87b7ae1eddb858a81cc92bbc01
|
|
| MD5 |
1e1380ad6cfa1ebf2e2f89439c770552
|
|
| BLAKE2b-256 |
3380963ceddb22f5a47d348daa257556d69def29b87b814d16f5e7c60fc0b4c2
|