-
Notifications
You must be signed in to change notification settings - Fork 2
printing status #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
printing status #140
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b595124
virtual printer stuff
thebeninator d039687
add dev printer flag; add hold to virtual prints
thebeninator 3a3e783
LF warning
thebeninator ce21dac
get status from db
thebeninator 1e7e060
just return completed if not using virtual printer and in dev mode
thebeninator 16cdf1a
i lied
thebeninator 4db2acd
fix unit test
thebeninator fe13d6c
fix unit tests 2
thebeninator 2d1acc2
error checking for status; some other misc changes
thebeninator 7761b97
fix bad datetime module access
thebeninator 7092d61
remove dev printer flag
thebeninator 47389cd
remove dev printer flag again
thebeninator 65023cf
fix tests
thebeninator 9a9a331
is_development_mode
evanugarte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| version: '2' | ||
| services: | ||
| sce-printer: | ||
| container_name: sce-printer-dev | ||
| build: | ||
| context: . | ||
| dockerfile: ./printer/Dockerfile.printer.dev | ||
| ports: | ||
| # we use port 14000 as that is what the website expects | ||
| # the printing server to be running on | ||
| - 14000:14000 | ||
| volumes: | ||
| - ./config:/app/config | ||
| - ./printer:/app/printer | ||
| - ./tmp:/tmp | ||
| command: | ||
| - --development | ||
| - --port=14000 | ||
| - --dont-delete-pdfs | ||
| - --config-json-path=/app/config/config.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Base image from https://github.com/DrPsychick/docker-cups-airprint | ||
| # Docker images are here https://hub.docker.com/r/drpsychick/airprint-bridge/tags | ||
| FROM drpsychick/airprint-bridge:jammy | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| RUN apt-get update | ||
|
|
||
| RUN apt install -y python3 python3-pip python3-venv | ||
|
|
||
| # Create the virtual environment with Python | ||
| RUN python3 -m venv /opt/venv | ||
|
|
||
| # Set the virtual environment as the default Python environment | ||
| ENV PATH="/opt/venv/bin:$PATH" | ||
|
|
||
| COPY ./printer/requirements.txt /app/printer/requirements.txt | ||
|
|
||
| RUN /opt/venv/bin/pip install -r /app/printer/requirements.txt | ||
|
|
||
| EXPOSE 9000 | ||
|
|
||
| ENTRYPOINT ["./printer/what_dev.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/bin/sh | ||
|
|
||
| # MAKE SURE THIS FILE IS USING LF FOR ITS EOL SEQUENCE!!!!!!!!!!! | ||
| # OTHERWISE DOCKER WILL COMPLAIN THAT THIS FILE DOESNT EXIST!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
|
||
| /root/start-cups.sh > /dev/null 2>&1 & | ||
|
|
||
| sleep 10 | ||
|
|
||
| lpadmin -p HP_LaserJet_p2015dn_Right -E -v file:///dev/null | ||
|
|
||
| python3 /app/printer/server.py $@ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.