Metadata-Version: 2.1
Name: pdfshot
Version: 0.2.1
Summary: A Python CLI to export pages from PDF files as images.
Home-page: https://github.com/joaopalmeiro/pdfshot
License: MIT
Keywords: pdfshot,pdf,screenshot,image,cli
Author: João Palmeiro
Author-email: joaommpalmeiro@gmail.com
Requires-Python: >=3.6,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Requires-Dist: importlib-metadata (>=1.0,<2.0); python_version < "3.8"
Requires-Dist: pdf2image (>=1.14.0,<2.0.0)
Requires-Dist: typer[all] (>=0.3.2,<0.4.0)
Requires-Dist: yaspin (>=1.4.1,<2.0.0)
Project-URL: Bug Tracker, https://github.com/joaopalmeiro/pdfshot/issues
Project-URL: Repository, https://github.com/joaopalmeiro/pdfshot
Project-URL: Twitter, https://twitter.com/joaompalmeiro
Description-Content-Type: text/markdown

# pdfshot

A Python CLI to export pages from PDF files as images.

## Quickstart

- Install [poppler](http://macappstore.org/poppler/) (macOS): `brew install poppler`.

**Usage**:

```console
$ pdfshot [OPTIONS] INPUT_PATH PDF_PAGE
```

**Arguments**:

* `INPUT_PATH`: The input PDF file.  [required]
* `PDF_PAGE`: The page number of the PDF file to export as an image. Page numbering starts at 1 (1-based indexing).  [required]

**Options**:

* `-b, --add-border`: Add border to the page image.  [default: False]
* `--version`: Show the version and exit.
* `--install-completion`: Install completion for the current shell.
* `--show-completion`: Show completion for the current shell, to copy it or customize the installation.
* `--help`: Show this message and exit.

## Notes

- [pdf2image](https://github.com/Belval/pdf2image):
  - To **only convert** PDF files to images.
- Commands:
  - `poetry init` + `poetry install`.
  - `poetry add "typer[all]"`.
  - `which pdfshot`.
  - `pdfshot test.pdf 1` or `pdfshot test.pdf 1 --add-border`.
- [Typer](https://github.com/tiangolo/typer):
  - CLI arguments (_required_ by default): CLI parameters (`./myproject`, for example) passed in some specific order to the CLI application (`ls`, for example).
  - CLI options (_optional_ by default): _CLI parameters_ (`--size`, for example) passed to the CLI application with a specific name.
  - [Data validation](https://typer.tiangolo.com/tutorial/options/callback-and-context/).
  - [Numeric validation](https://typer.tiangolo.com/tutorial/parameter-types/number/).
  - For commands, think of `git` (`git push`, `git clone`, etc.).
- [Poetry](https://python-poetry.org/):
  - [Outdated metadata after version bump for local package](https://github.com/python-poetry/poetry/issues/3289) (open) issue.

## References

- [Building a Package](https://typer.tiangolo.com/tutorial/package/).
- [Version CLI Option, is_eager](https://typer.tiangolo.com/tutorial/options/version/).

