Skip to content

Commit

Permalink
Update cli.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaos599 authored Oct 30, 2024
1 parent 010d5a4 commit 41dc4b2
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion pdfly/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import pdfly.cat
import pdfly.compress
import pdfly.uncompress
import pdfly.extract_images
import pdfly.metadata
import pdfly.pagemeta
Expand Down Expand Up @@ -226,7 +227,28 @@ def compress(
],
) -> None:
pdfly.compress.main(pdf, output)

@app.command(name="uncompress", help="Uncompress a PDF.")
def uncompress(
pdf: Annotated[
Path,
typer.Argument(
exists=True,
file_okay=True,
dir_okay=False,
writable=False,
readable=True,
resolve_path=True,
),
],
output: Annotated[
Path,
typer.Argument(
file_okay=True,
writable=True,
),
],
) -> None:
pdfly.uncompress.main(pdf, output)

@entry_point.command(name="x2pdf", help=pdfly.x2pdf.__doc__) # type: ignore[misc]
def x2pdf(
Expand Down

0 comments on commit 41dc4b2

Please sign in to comment.