A command line utility for getting resources available online
Project description
Table of Contents
Installation Methods
Install using pipx
:
-> python3 -m pip install --user pipx
-> python3 -m pipx ensurepath
-> pipx install git+https://github.com/Audiosutras/getdat.git
Commands
Cinema
Ebook
Cinema
Launches movie-web.app in your default browser
-> getdat cinema
Ebook
Search and download an ebook available through Anna's Archive. You can think of this command as "headless" Anna's Archive
- The demo for this command downloaded an epub format of Robert Louis Stevenson's and N.C. Wyeth's book Treasure Island. This book is in the public domain.
- The demo for this command opens the downloaded ebook using epr, a terminal epub reader to show the contents of the downloaded book. You can expect higher ebook quality by using a desktop e-reader like librum
- Anna's Archive
SciDB
search is not yet supported.
-> getdat ebook [OPTIONS] [Q]
ARGUMENTS
Name | Help |
---|---|
Q | Search |
Example:
-> getdat ebook "Treasure Island Stevenson"
or
-> getdat ebook Treasure Island Stevenson
OPTIONS
Name | Convention 1 | Convention 2 | Type | Help |
---|---|---|---|---|
Output Directory | -o | --output_dir | Text | Path to ebook's output directory from home directory. Path must be prefixed by ~ on Unix or ~user on Windows. This argument overrides GETDAT_BOOK_DIR env var if set. Outputs book to working directory if neither are set. |
Extension | -e | --ext | [epub | pdf] |
Example:
-> getdat ebook Treasure Island Stevenson --ext=epub --output_dir=~/books/epub/
or
-> getdat ebook "Treasure Island Stevensonn" -e epub -o ~/books/epub
Environment Variable
GETDAT_BOOK_DIR
- Path from home directory to destination directory. Ignored if--output_dir
is specified as an option
Local Development
Python Version: 3.11
. To install python on MacOS & Debian-based systems
-> sudo apt install software-properties-common
-> sudo add-apt-repository ppa:deadsnakes/ppa
-> sudo apt update
-> sudo apt install python3.11
This python package uses poetry for dependency management. To install:
# install pipx if you have not already
-> python3 -m pip install --user pipx
-> python3 -m pipx ensurepath
# install poetry
-> pipx install poetry
Assuming that you have forked the repository and have a copy on your local machine. Within the getdat
directory, install dependencies and open a virtualenv
shell managed by poetry.
-> poetry install
-> poetry shell
(getdat-py3.11) ->
To run/develop the cli program.
(getdat-py3.11) -> getdat
Usage: getdat [OPTIONS] COMMAND [ARGS]...
A command line utility for getting resources available online
Options:
--help Show this message and exit.
Commands:
cinema Launches movie-web.app in your default browser
ebook Search and download an ebook available through Anna's Archive...
Check out our docs at https://github.com/Audiosutras/getdat/docs for more
details
Project uses pytest for unit testing. Test run quickly with the help of pytest-mock
(getdat-py3.11) -> pytest -v
Style guide and code check enforced with pre-commit
(getdat-py3.11) -> pre-commit install
Publishing Package
Workflow: master
branch
-
In
pyproject.toml
bump the version number*.*.*
-
Create a git tag with the new version number
*.*.*
you specified inpyproject.toml
. -
Push the newly created tag
git push origin *.*.*
to the repository. This will trigger thepre-release.yml
github workflow to publish our package totest.pypi
.
Contributors
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
File details
Details for the file getdat-0.1.1.tar.gz
.
File metadata
- Download URL: getdat-0.1.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.11.6 Linux/6.2.0-1015-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5105c557f12f78ce581ee79f3dd5cac378943e3edf21befc18995189819ed362 |
|
MD5 | 87598ce00a851d5f31e0aef655c9aa7f |
|
BLAKE2b-256 | ae518b01ef70631d6e6723bf0924c6e376a8e588d2fba0820663da85b246c37c |
File details
Details for the file getdat-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: getdat-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.11.6 Linux/6.2.0-1015-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06c217e5227369dab2cd38a501b3d4b890c364a25833ebc19587f51636a37492 |
|
MD5 | 285189961eff03b9656ed8b617acf604 |
|
BLAKE2b-256 | c899f3abf6d20292fd4d657b592a21d4d783fec4f9d6234b1fcb59e180294629 |