Browse Source

linted

master
Holger Frey 6 years ago
parent
commit
1fbe133e7f
  1. 6
      pdftools/cli.py
  2. 4
      pdftools/formfill.py
  3. 1
      pdftools/nameplate.py
  4. 1
      pdftools/ruler.py

6
pdftools/cli.py

@ -66,13 +66,13 @@ def nameplates(attendees, logo, size, adjust_x, adjust_y): @@ -66,13 +66,13 @@ def nameplates(attendees, logo, size, adjust_x, adjust_y):
size and adjustment options.
"""
if logo is not None:
logo = nameplate.Logo(logo, size * mm, adjust_x=adjust_x, adjust_y=adjust_y)
logo = nameplate.Logo(
logo, size * mm, adjust_x=adjust_x, adjust_y=adjust_y
)
npc = nameplate.NamePlateCards(logo)
npc.generate(attendees, show=True)
@click.command()
@click.argument(
"pdf",

4
pdftools/formfill.py

@ -1,11 +1,9 @@ @@ -1,11 +1,9 @@
import pdfrw
import subprocess
import itertools
import tempfile
from pathlib import Path
from reportlab.pdfgen import canvas
from reportlab.lib.units import mm
from reportlab.lib.pagesizes import A4
@ -48,5 +46,3 @@ def fill(original_form, values, draw_function, output_file="filled.pdf"): @@ -48,5 +46,3 @@ def fill(original_form, values, draw_function, output_file="filled.pdf"):
# write the combined file to the output
pdfrw.PdfWriter().write(output_file, form)
subprocess.run(["open", output_file])

1
pdftools/nameplate.py

@ -41,6 +41,7 @@ false_and_true = itertools.cycle([False, True]) @@ -41,6 +41,7 @@ false_and_true = itertools.cycle([False, True])
imtek_logo_path = Path(__file__).parent / "logo_imtek.png"
class NamePlateCards:
def __init__(
self,

1
pdftools/ruler.py

@ -5,7 +5,6 @@ from . import formfill @@ -5,7 +5,6 @@ from . import formfill
def ruler_overlay(original_form):
def ruler(c, item):
c.setStrokeColorRGB(0, 0, 1)
c.setFillColorRGB(0, 0, 1)

Loading…
Cancel
Save