mirror of
https://github.com/Ircama/epson_print_conf.git
synced 2025-05-09 13:42:03 -04:00
Refinements
This commit is contained in:
parent
24010451ad
commit
47d41da010
4 changed files with 141 additions and 34 deletions
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
|
@ -1,7 +1,9 @@
|
|||
name: Build Workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
|
@ -10,7 +12,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v1
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
architecture: 'x64'
|
||||
|
@ -23,8 +25,13 @@ jobs:
|
|||
run: |
|
||||
python -m PyInstaller epson_print_conf.spec -- --default
|
||||
|
||||
- name: Generate Changelog
|
||||
shell: bash
|
||||
run: echo "# This executable is auto-generated by a GitHub Action" > ${{ github.workspace }}-CHANGELOG.txt
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
body_path: ${{ github.workspace }}-CHANGELOG.txt
|
||||
files: dist/epson_print_conf.exe
|
||||
|
|
61
CONTRIBUTING.md
Normal file
61
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,61 @@
|
|||
# epson_print_conf contribution guidelines
|
||||
|
||||
Contributions might involve:
|
||||
|
||||
- Adding features and enhancemeents
|
||||
- Updating code
|
||||
- Performing corrections and bug fixing
|
||||
|
||||
In all these cases, we operate the "Fork & Pull" model explained at
|
||||
|
||||
https://help.github.com/articles/about-pull-requests/
|
||||
|
||||
First contributors can follow a [tutorial page](https://github.com/firstcontributions/first-contributions).
|
||||
|
||||
Please discuss the change you wish to make via an [issue](https://github.com/Ircama/construct-gallery/issues) before developing a pull request.
|
||||
|
||||
# Bugs
|
||||
|
||||
You can help to report bugs by filing an [issue](https://github.com/Ircama/construct-gallery/issues) on the software or on the documentation.
|
||||
|
||||
# Code of Conduct
|
||||
|
||||
### Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and owner pledge to making participation in our project and our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
### Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of improper language
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
### Our Responsibilities
|
||||
|
||||
Project owner is responsible for clarifying the standards of acceptable
|
||||
behavior and is expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project owner has the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that he deems inappropriate,
|
||||
threatening, offensive, or harmful.
|
64
README.md
64
README.md
|
@ -53,38 +53,6 @@ This program exploits [pysnmp](https://github.com/etingof/pysnmp), with related
|
|||
|
||||
It is tested with Ubuntu / Windows Subsystem for Linux, Windows.
|
||||
|
||||
## Creating an executable for the GUI
|
||||
|
||||
Alternatively to run the GUI via `python ui.py`, it is possible to build an executable file via *pyinstaller*.
|
||||
|
||||
Install *pyinstaller* with `pip install pyinstaller`.
|
||||
|
||||
The *epson_print_conf.spec* file helps building the executable program. Run it with the following command.
|
||||
|
||||
```bash
|
||||
pip install pyinstaller # if not yet installed
|
||||
pyinstaller epson_print_conf.spec -- --default
|
||||
```
|
||||
|
||||
Then run the *epson_print_conf.exe* file created in the *dist/* folder, which has the same options of `ui.py`.
|
||||
|
||||
An alternative way to create the executable file named *epson_print_conf.exe* from *ui.py* without using *epson_print_conf.spec* is the following:
|
||||
|
||||
```bash
|
||||
pyinstaller --onefile ui.py --name epson_print_conf --hidden-import babel.numbers --windowed
|
||||
```
|
||||
|
||||
A file named *gui.py* is also included (similar to *ui.py*), which automatically loads a previously created configuration file that has to be named *printer_conf.pickle*, merging it with the program configuration. To build the executable program with this file instead of the default *ui.py*, run the following command:
|
||||
|
||||
```bash
|
||||
pip install pyinstaller # if not yet installed
|
||||
curl -o devices.xml https://codeberg.org/attachments/147f41a3-a6ea-45f6-8c2a-25bac4495a1d
|
||||
python3 parse_devices.py -a 192.168.178.29 -s XP-205 -p printer_conf.pickle # use your default IP address and printer model as default settings for the GUI
|
||||
pyinstaller epson_print_conf.spec
|
||||
```
|
||||
|
||||
When the build operation is completed, you can run the *epson_print_conf.exe* file created in the *dist/* folder. This executable program does not have options, embeds the *printer_conf.pickle* file and starts with the default IP address and printer model defined in the build phase.
|
||||
|
||||
## Usage
|
||||
|
||||
### Running the GUI with Python
|
||||
|
@ -191,6 +159,38 @@ python3 epson_print_conf.py -m XP-205 -a 192.168.1.87 -R 173,172
|
|||
|
||||
Note: resetting the ink waste counter is just removing a warning; not replacing the tank will make the ink spill.
|
||||
|
||||
## Creating an executable for the GUI
|
||||
|
||||
Alternatively to run the GUI via `python ui.py`, it is possible to build an executable file via *pyinstaller*.
|
||||
|
||||
Install *pyinstaller* with `pip install pyinstaller`.
|
||||
|
||||
The *epson_print_conf.spec* file helps building the executable program. Run it with the following command.
|
||||
|
||||
```bash
|
||||
pip install pyinstaller # if not yet installed
|
||||
pyinstaller epson_print_conf.spec -- --default
|
||||
```
|
||||
|
||||
Then run the *epson_print_conf.exe* file created in the *dist/* folder, which has the same options of `ui.py`.
|
||||
|
||||
An alternative way to create the executable file named *epson_print_conf.exe* from *ui.py* without using *epson_print_conf.spec* is the following:
|
||||
|
||||
```bash
|
||||
pyinstaller --onefile ui.py --name epson_print_conf --hidden-import babel.numbers --windowed
|
||||
```
|
||||
|
||||
A file named *gui.py* is also included (similar to *ui.py*), which automatically loads a previously created configuration file that has to be named *printer_conf.pickle*, merging it with the program configuration. To build the executable program with this file instead of the default *ui.py*, run the following command:
|
||||
|
||||
```bash
|
||||
pip install pyinstaller # if not yet installed
|
||||
curl -o devices.xml https://codeberg.org/attachments/147f41a3-a6ea-45f6-8c2a-25bac4495a1d
|
||||
python3 parse_devices.py -a 192.168.178.29 -s XP-205 -p printer_conf.pickle # use your default IP address and printer model as default settings for the GUI
|
||||
pyinstaller epson_print_conf.spec
|
||||
```
|
||||
|
||||
When the build operation is completed, you can run the *epson_print_conf.exe* file created in the *dist/* folder. This executable program does not have options, embeds the *printer_conf.pickle* file and starts with the default IP address and printer model defined in the build phase.
|
||||
|
||||
## Utilities and notes
|
||||
|
||||
### parse_devices.py
|
||||
|
|
39
RELEASES.md
Normal file
39
RELEASES.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Tagging
|
||||
|
||||
Push all changes:
|
||||
|
||||
```shell
|
||||
git commit -a
|
||||
git push
|
||||
```
|
||||
|
||||
_After pushing the last commit_, add a local tag (shall be added AFTER the commit that needs to rebuild the exe):
|
||||
|
||||
```shell
|
||||
git tag # list local tags
|
||||
git tag v2.1.3
|
||||
```
|
||||
|
||||
Push this tag to the origin, which starts the rebuild workflow (GitHub Action):
|
||||
|
||||
```shell
|
||||
git push origin v2.1.3
|
||||
git ls-remote --tags https://github.com/Ircama/epson_print_conf # list remote tags
|
||||
```
|
||||
|
||||
Check the published tag here: https://github.com/Ircama/epson_print_conf/tags
|
||||
|
||||
It shall be even with the last commit.
|
||||
|
||||
Check the GitHub Action: https://github.com/Ircama/epson_print_conf/actions
|
||||
|
||||
# Updating the same tag (using a different build number for publishing)
|
||||
|
||||
```shell
|
||||
git tag # list tags
|
||||
git tag -d epson_print_conf # remove local tag
|
||||
git push --delete origin epson_print_conf # remove remote tag
|
||||
git ls-remote --tags https://github.com/Ircama/epson_print_conf # list remote tags
|
||||
```
|
||||
|
||||
Then follow the tagging procedure again to add the tag to the latest commit.
|
Loading…
Add table
Add a link
Reference in a new issue