Skip to content

Manual duplex printing helper #83 - #205

Draft
J453260 wants to merge 20 commits into
developfrom
feature/paper-size
Draft

Manual duplex printing helper #83#205
J453260 wants to merge 20 commits into
developfrom
feature/paper-size

Conversation

@J453260

@J453260 J453260 commented Aug 16, 2026

Copy link
Copy Markdown

Zrobiony task z ręcznym drukowaniem dwustronnym.
Funkcja calculate_duplex_pages sprawdza liczbę stron w dokumencie. Sprawdza czy ilość stron jest parzysta lub nieparzysta. Jeżeli nieparzysta do jest dodawana pusta strona by zachować parzystość.

Funkcja split_pdf_for_manual_duplex na podstawie oryginalnego PDF'a tworzy jego kopię. Pierwsza kopia jest dla pierwszego przebiegu, druga dla drugiego.

W models.py jest wykonywana pauza w drukowaniu - czekanie na akcję człowieka.

ManualDuplexModal.vue to wzkazówki i wznowienie druku po przełożeniu papieru.

Closes #83

@dominik-korsa dominik-korsa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your changes are chaotic and break existing functionality. Please review the changes you submit in this pull request.

As explained previously, please also make sure to stick to English, both in the user interface and code (including code comments). In this pull request you seem to be mixing both in new UI strings.
It's fine to use Polish in comments on GitHub, if writing them in English would be a challenge for you.

Comment thread docker-compose.yml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not commit your modified docker-compose.yml

Comment thread webapp/nuxt.config.ts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert these accidental (?) changes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not put these instructions for performing the second print in the job page, which the user gets redirected to after they submit a print job?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path of the docker_settings.py.example is backend/gutenberg/settings/docker_settings.py.example, why copy it?

Comment thread backend/gutenberg/urls.py
Comment on lines +48 to +52
urlpatterns = [
# ... istniejące ścieżki ...
path('jobs/<int:job_id>/duplex-info/', views.get_duplex_instructions, name='duplex-info'),
path('jobs/<int:job_id>/resume-duplex/', views.resume_manual_duplex_job, name='resume-duplex'),
]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LLM-generated comment instructed you that you should modify the urlpatterns list instead of overriding it. C'mon.

Comment thread backend/control/models.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read what you commit... You just deleted used functions here and comments meant as a baseline for implementing scanner support in the future.

Comment thread backend/control/models.py
PRINTING = 'PRINTING', _('printing')
# SCANNING = 'SCANNING', _('scanning')
# WAITING_FOR_NEXT_PAGE = 'WAITING_PAGE', _('waiting for next page')
WAITING_FOR_MANUAL_DUPLEX = 'WAITING_DUPLEX', _('waiting for paper flip') # <-- Nowy status

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not describe changes in the comments. Comments persist in the codebase after merging your PR, this comment is useless for trying to understand the code in the future.

Comment thread backend/control/models.py
Comment on lines +39 to +42
manual_duplex_supported = models.BooleanField(
default=False,
help_text=_("Check if the printer supports manual (software-guided) two-sided printing.")
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this field used for? Is your feature making use of two-sided printing helpers built into printers?

Comment thread backend/control/views.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be action views in backend/api/views.py. Please try to follow the existing structure of the project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manual duplex printing helper

2 participants