Skip to content

Instantly share code, notes, and snippets.

@pleabargain
Last active May 6, 2026 07:57
Show Gist options
  • Select an option

  • Save pleabargain/d28672887636e8eecfc881c9d9fca82c to your computer and use it in GitHub Desktop.

Select an option

Save pleabargain/d28672887636e8eecfc881c9d9fca82c to your computer and use it in GitHub Desktop.
uv python one liner to concatenate all numbered pdfs into one new pdf
uv run --with pypdf python -c "import os; from pypdf import PdfWriter; writer = PdfWriter(); [writer.append(f) for f in sorted(os.listdir('.')) if f.lower().endswith('.pdf') and f != 'Merged_Document.pdf']; writer.write('Merged_Document.pdf')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment