Feat: add exemple
21
example/album.py
Normal file
@ -0,0 +1,21 @@
|
||||
from photobook import Photobook
|
||||
from pathlib import Path
|
||||
|
||||
name = "album"
|
||||
pagesize = (250, 200)
|
||||
src_fig = Path("./fig/")
|
||||
output = Path("./build/")
|
||||
dest = output / (name + ".pdf")
|
||||
out_fig = output / "fig"
|
||||
|
||||
photobook = Photobook(name, pdf_size=pagesize, base_fig=src_fig, margin=5, img_px=2)
|
||||
photobook.set_font("Arial", "B", 20)
|
||||
photobook.set_auto_page_break(False)
|
||||
|
||||
|
||||
photobook.set_fig_folder("textures")
|
||||
photobook.one_centered("eugene.jpg", "one_centered default")
|
||||
photobook.one_centered("eugene.jpg", "one_centered part_of_text=2", part_of_text=2)
|
||||
|
||||
|
||||
photobook.output(dest)
|
BIN
example/fig/food/crepe.jpg
Normal file
After Width: | Height: | Size: 125 KiB |
BIN
example/fig/food/glass.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
example/fig/food/muffle.jpg
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
example/fig/textures/eugene.jpg
Normal file
After Width: | Height: | Size: 149 KiB |
BIN
example/fig/textures/hiroyuki.jpg
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
example/fig/textures/marek.jpg
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
example/fig/textures/saqib.jpg
Normal file
After Width: | Height: | Size: 170 KiB |