From ca65cfcfbd8c28a80db32c3457528c14822896f8 Mon Sep 17 00:00:00 2001 From: Takahiro Tomita Date: Fri, 10 Jun 2022 13:15:29 +0900 Subject: [PATCH 1/5] doc: Update README --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 9dc3b7b..eb7fd37 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,17 @@ This is an rMQR Code image generator implemented in Python. This is implemented based on [ISO/IEC 23941:2022](https://www.iso.org/standard/77404.html). + ## Important Notice Please verify an image generated by this software whether it can decode correctly before use. + +## Installation +``` +pip install rmqrcode +``` + + ## Basic Usage ```py from rmqrcode import rMQR @@ -32,6 +40,7 @@ The `fit_strategy` parameter is enum value of rmqrcode.FitStrategy to specify ho Here is an example of images genereated by each fit strategies for data `Test test test`: ![Example of fit strategies](https://user-images.githubusercontent.com/14174940/172822478-4f2b5fb8-49bd-464f-b6b2-c7347f71cbf5.png) + ## Advanced Usage ### Select rMQR Code size manually To select rMQR Code size manually, use `rMQR()` constructor. @@ -40,6 +49,7 @@ qr = rMQR('R11x139', ErrorCorrectionLevel.H) qr.make("https://oudon.xyz") ``` + ---- The word "QR Code" is registered trademark of DENSO WAVE Incorporated.
http://www.denso-wave.com/qrcode/faqpatent-e.html From 5ed090cb5fd855c5def15f255c0312eea811296d Mon Sep 17 00:00:00 2001 From: Takahiro Tomita Date: Fri, 10 Jun 2022 22:15:23 +0900 Subject: [PATCH 2/5] doc: Update README.md --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index eb7fd37..1b8773b 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ pip install rmqrcode ## Basic Usage +### Generate rMQR Code ```py from rmqrcode import rMQR import rmqrcode @@ -40,6 +41,15 @@ The `fit_strategy` parameter is enum value of rmqrcode.FitStrategy to specify ho Here is an example of images genereated by each fit strategies for data `Test test test`: ![Example of fit strategies](https://user-images.githubusercontent.com/14174940/172822478-4f2b5fb8-49bd-464f-b6b2-c7347f71cbf5.png) +### Save as image +```py +from rmqrcode import QRImage + +image = QRImage(qr, module_size=8) +image.show() +image.save("my_qr.png") +``` + ## Advanced Usage ### Select rMQR Code size manually @@ -49,6 +59,17 @@ qr = rMQR('R11x139', ErrorCorrectionLevel.H) qr.make("https://oudon.xyz") ``` +`R11x139` means 11 rows and 139 columns. The following table shows available combinations. + +| |27|43|59|77|99|139| +|-|-|-|-|-|-|-| +|R7|❌|✅|✅|✅|✅|✅| +|R9|❌|✅|✅|✅|✅|✅| +|R11|✅|✅|✅|✅|✅|✅| +|R13|✅|✅|✅|✅|✅|✅| +|R15|❌|✅|✅|✅|✅|✅| +|R17|❌|✅|✅|✅|✅|✅| + ---- The word "QR Code" is registered trademark of DENSO WAVE Incorporated.
From e9d600229d5063484f6bf3533563958836153bb7 Mon Sep 17 00:00:00 2001 From: Takahiro Tomita Date: Fri, 10 Jun 2022 23:39:58 +0900 Subject: [PATCH 3/5] doc: update README.md --- README.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1b8773b..75f97e1 100644 --- a/README.md +++ b/README.md @@ -5,17 +5,17 @@ This is an rMQR Code image generator implemented in Python. This is implemented based on [ISO/IEC 23941:2022](https://www.iso.org/standard/77404.html). -## Important Notice +## 📌 Important Notice Please verify an image generated by this software whether it can decode correctly before use. -## Installation +## 🚀 Installation ``` pip install rmqrcode ``` -## Basic Usage +## 📕 Basic Usage ### Generate rMQR Code ```py from rmqrcode import rMQR @@ -29,11 +29,11 @@ qr = rMQR.fit( ) ``` -The `ecc` parameter is an enum value of rmqrcode.ErrorCorrectionLevel to select error correction level. The following values are available: +The `ecc` parameter is an enum value of `rmqrcode.ErrorCorrectionLevel` to select error correction level. The following values are available: - **`ErrorCorrectionLevel.M`**: Approx. 15% Recovery Capacity. - **`ErrorCorrectionLevel.H`**: Approx. 30% Recovery Capacity. -The `fit_strategy` parameter is enum value of rmqrcode.FitStrategy to specify how to determine size of rMQR Code. The following values are available: +The `fit_strategy` parameter is enum value of `rmqrcode.FitStrategy` to specify how to determine size of rMQR Code. The following values are available: - **`FitStrategy.MINIMIZE_WIDTH`**: Try to minimize width. - **`FitStrategy.MINIMIZE_HEIGHT`**: Try to minimize height. - **`FitStrategy.BALANCED`**: Try to keep balance of width and height. @@ -51,7 +51,7 @@ image.save("my_qr.png") ``` -## Advanced Usage +## 📚 Advanced Usage ### Select rMQR Code size manually To select rMQR Code size manually, use `rMQR()` constructor. ```py @@ -62,7 +62,7 @@ qr.make("https://oudon.xyz") `R11x139` means 11 rows and 139 columns. The following table shows available combinations. | |27|43|59|77|99|139| -|-|-|-|-|-|-|-| +|-|:-:|:-:|:-:|:-:|:-:|:-:| |R7|❌|✅|✅|✅|✅|✅| |R9|❌|✅|✅|✅|✅|✅| |R11|✅|✅|✅|✅|✅|✅| @@ -71,6 +71,18 @@ qr.make("https://oudon.xyz") |R17|❌|✅|✅|✅|✅|✅| +## 🛠️ Under the Hood +### Encoding modes + +The rMQR Code has the four encoding modes Numeric, Alphanumeric, Byte and Kanji to convert data efficiently. However, this package supoprts only Byte mode currently. + +|Mode|Supported?| +|-|:-:| +|Numeric| | +|Alphanumeric|| +|Byte|✅| +|Kanji|| + ---- The word "QR Code" is registered trademark of DENSO WAVE Incorporated.
http://www.denso-wave.com/qrcode/faqpatent-e.html From 49056406497bad2e61fbd46380970957c74f9d1f Mon Sep 17 00:00:00 2001 From: Takahiro Tomita Date: Sun, 12 Jun 2022 00:29:26 +0900 Subject: [PATCH 4/5] chore: Update the version to 0.1.1 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index d82df4f..5086838 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = rmqrcode -version = 0.1.0 +version = 0.1.1 author = Takahiro Tomita author_email = ttp8101@gmail.com description = An rMQR Code Generetor From 943ef2d4edccbe2d0424a0a2e2accf97dc143cee Mon Sep 17 00:00:00 2001 From: Takahiro Tomita Date: Sun, 12 Jun 2022 00:30:41 +0900 Subject: [PATCH 5/5] chore: Change ci name --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 74f237b..617334c 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a single version of Python # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Python application +name: pytest on: push: