diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..a2cd290 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,30 @@ +name: Upload Python Package + +on: + release: + types: [published] + workflow_dispatch: {} + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index e003665..73e70f0 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,6 @@ I was not expecting to own a label printer, but after caming across to this onli ![](./assets/cover.jpg) -_The image on the printed label shown in the picture can be found [here.](https://github.com/ysfchn/dymo-bluetooth/blob/main/assets/example_image.png)_ -
More about this printer model
@@ -29,9 +27,11 @@ This project depends on [`bleak`](https://pypi.org/project/bleak/) for cross-pla ## Installation ``` -python -m pip install --upgrade "https://github.com/ysfchn/dymo-bluetooth/archive/refs/heads/main.zip" +python -m pip install --upgrade dymo-bluetooth ``` +For `main` branch, you can use `https://github.com/ysfchn/dymo-bluetooth/archive/refs/heads/main.zip` as package name. + Python 3.10 or up is targeted, but 3.9 should work too. It depends on; * `bleak` for Bluetooth communication. @@ -41,7 +41,7 @@ Additionally, if `python-barcode` is installed (which is optional), it can be al ## Usage -There is a CLI provided with the module to print images to the first found printer nearby. +There is a CLI provided with the module to print images to the first found printer nearby. If looking for a test image, you can try [this.](https://github.com/ysfchn/dymo-bluetooth/blob/main/assets/example_image.png)_ ``` python -m dymo_bluetooth --help diff --git a/dymo_bluetooth/__main__.py b/dymo_bluetooth/__main__.py index f2f76fb..1a12795 100644 --- a/dymo_bluetooth/__main__.py +++ b/dymo_bluetooth/__main__.py @@ -85,7 +85,7 @@ def main(): ) args.add_argument( "--ensure-mac", - default = 5, + default = False, action = "store_true", help = ( "Also ensures the MAC address does match with the pre-defined MAC prefixes when " diff --git a/pyproject.toml b/pyproject.toml index 9f9ae5b..7e7f885 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "dymo-bluetooth" -version = "0.0.2" +version = "0.1.0" authors = [{ name = "ysfchn" }] license.file = "LICENSE" readme = "README.md" @@ -8,8 +8,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "License :: OSI Approved :: MIT License", "Development Status :: 5 - Production/Stable", - "Topic :: Printing", - "Private :: Do Not Upload" + "Topic :: Printing" ] dependencies = [ "bleak~=0.22.2",