Some documentation changes

This commit is contained in:
sebastien committed 2026-09-26 22:08:27 +02:00
1 parent 4c56b655fe
commit a03e0e3b4c
9 files changed
+88 -26

No files matched your search

+22 -8
View File
@@ -24,6 +24,7 @@ from copienator import (
)
from copienator.filesystem import staged_files
from copienator.copy_errors import clear_copy_error, mark_copy_error, marked_copy_paths
from copienator.configuration import SHOW_PERSONAL_STEPS
DELIMITER_WIDTH = 5
DELIMITER_COLOR = (0, 0, 0)
@@ -32,6 +33,9 @@ CROP_SHIFT_STEP = 50
CROP_WIDTH_STEP = 50
pdf_cache_lock = threading.Lock()
# The requested spelling is kept as the public switch for this alternate layout.
personnal_binding = bool(SHOW_PERSONAL_STEPS)
def distribute_pages(total_pages: int, max_per_file: int = 5) -> list[int]:
"""Distribute pages into balanced chunks no larger than max_per_file."""
@@ -189,13 +193,17 @@ class ImageReviewer:
self.label_info = tk.Label(self.root, text="", font=("Arial", 12, "bold"))
self.label_info.pack(pady=5)
self.root.bind("<Return>", self.on_next)
self.root.bind("s", self.on_skip)
self.root.bind("!", self.on_skip)
self.root.protocol("WM_DELETE_WINDOW", self.on_close)
self.root.bind("n", lambda _event: self.on_shift(CROP_SHIFT_STEP))
self.root.bind("N", lambda _event: self.on_shift(2 * CROP_SHIFT_STEP))
self.root.bind("t", lambda _event: self.on_shift(-CROP_SHIFT_STEP))
self.root.bind("l", lambda _event: self.on_enlarge(CROP_WIDTH_STEP))
self.root.bind("L", lambda _event: self.on_enlarge(-CROP_WIDTH_STEP))
self.root.bind("<Left>", lambda _event: self.on_shift(-CROP_SHIFT_STEP))
self.root.bind("<Right>", lambda _event: self.on_shift(CROP_SHIFT_STEP))
self.root.bind("<Up>", lambda _event: self.on_enlarge(CROP_WIDTH_STEP))
self.root.bind("<Down>", lambda _event: self.on_enlarge(-CROP_WIDTH_STEP))
if personnal_binding:
self.root.bind("t", lambda _event: self.on_shift(-CROP_SHIFT_STEP))
self.root.bind("n", lambda _event: self.on_shift(CROP_SHIFT_STEP))
self.root.bind("r", lambda _event: self.on_enlarge(CROP_WIDTH_STEP))
self.root.bind("s", lambda _event: self.on_enlarge(-CROP_WIDTH_STEP))
self.root.bind("1", lambda _event: self.on_set_max_pages(1))
Thread(target=self.prefetch_worker, daemon=True).start()
@@ -283,6 +291,11 @@ class ImageReviewer:
tk_image = ImageTk.PhotoImage(self.current_preview)
self.label_img.configure(image=tk_image)
self.label_img.image = tk_image
personal_instructions = (
"\nt/s/r/n also available: left / narrower / wider / right"
if personnal_binding
else ""
)
self.label_info.configure(
text=(
f"[{self.index + 1}/{len(self.files)}] {filename} | "
@@ -290,8 +303,9 @@ class ImageReviewer:
f"Extra width: {self.current_width_offset}px\n"
f"Files: {schema['number_of_files']} | "
f"Cols: {schema['columns_per_file']}\n"
"Enter: Save and next | s: flag error and skip | n: +50 | N: +100 | t: -50 | "
"l: widen by 50 | Shift+l: undo widening by 50 | 1: use full pages"
"Arrows: left/right move by 50px | up/down widen/narrow by 50px\n"
"Enter: Save and next | !: flag error and skip | 1: use full pages"
f"{personal_instructions}"
),
fg="black",
)
+1
View File
@@ -33,6 +33,7 @@ else:
# Keep new optional settings compatible with older personal configuration files.
ALWAYS_CROP = False
SHOW_PERSONAL_STEPS = False
RETURN_JPEG_ENABLED = True
RETURN_PDF_ENABLED = True
RETURN_ANSWERS_ENABLED = False