Skip to content

Commit d725177

Browse files
authored
Merge pull request #3 from OUDON/develop
v0.1.1
2 parents 007abc3 + 943ef2d commit d725177

File tree

3 files changed

+50
-7
lines changed

3 files changed

+50
-7
lines changed

.github/workflows/python-app.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a single version of Python
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Python application
4+
name: pytest
55

66
on:
77
push:

README.md

+48-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@
44

55
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).
66

7-
## Important Notice
7+
8+
## 📌 Important Notice
89
Please verify an image generated by this software whether it can decode correctly before use.
910

10-
## Basic Usage
11+
12+
## 🚀 Installation
13+
```
14+
pip install rmqrcode
15+
```
16+
17+
18+
## 📕 Basic Usage
19+
### Generate rMQR Code
1120
```py
1221
from rmqrcode import rMQR
1322
import rmqrcode
@@ -20,26 +29,60 @@ qr = rMQR.fit(
2029
)
2130
```
2231

23-
The `ecc` parameter is an enum value of rmqrcode.ErrorCorrectionLevel to select error correction level. The following values are available:
32+
The `ecc` parameter is an enum value of `rmqrcode.ErrorCorrectionLevel` to select error correction level. The following values are available:
2433
- **`ErrorCorrectionLevel.M`**: Approx. 15% Recovery Capacity.
2534
- **`ErrorCorrectionLevel.H`**: Approx. 30% Recovery Capacity.
2635

27-
The `fit_strategy` parameter is enum value of rmqrcode.FitStrategy to specify how to determine size of rMQR Code. The following values are available:
36+
The `fit_strategy` parameter is enum value of `rmqrcode.FitStrategy` to specify how to determine size of rMQR Code. The following values are available:
2837
- **`FitStrategy.MINIMIZE_WIDTH`**: Try to minimize width.
2938
- **`FitStrategy.MINIMIZE_HEIGHT`**: Try to minimize height.
3039
- **`FitStrategy.BALANCED`**: Try to keep balance of width and height.
3140

3241
Here is an example of images genereated by each fit strategies for data `Test test test`:
3342
![Example of fit strategies](https://user-images.githubusercontent.com/14174940/172822478-4f2b5fb8-49bd-464f-b6b2-c7347f71cbf5.png)
3443

35-
## Advanced Usage
44+
### Save as image
45+
```py
46+
from rmqrcode import QRImage
47+
48+
image = QRImage(qr, module_size=8)
49+
image.show()
50+
image.save("my_qr.png")
51+
```
52+
53+
54+
## 📚 Advanced Usage
3655
### Select rMQR Code size manually
3756
To select rMQR Code size manually, use `rMQR()` constructor.
3857
```py
3958
qr = rMQR('R11x139', ErrorCorrectionLevel.H)
4059
qr.make("https://oudon.xyz")
4160
```
4261

62+
`R11x139` means 11 rows and 139 columns. The following table shows available combinations.
63+
64+
| |27|43|59|77|99|139|
65+
|-|:-:|:-:|:-:|:-:|:-:|:-:|
66+
|R7|||||||
67+
|R9|||||||
68+
|R11|||||||
69+
|R13|||||||
70+
|R15|||||||
71+
|R17|||||||
72+
73+
74+
## 🛠️ Under the Hood
75+
### Encoding modes
76+
77+
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.
78+
79+
|Mode|Supported?|
80+
|-|:-:|
81+
|Numeric| |
82+
|Alphanumeric||
83+
|Byte||
84+
|Kanji||
85+
4386
----
4487
The word "QR Code" is registered trademark of DENSO WAVE Incorporated.<br>
4588
http://www.denso-wave.com/qrcode/faqpatent-e.html

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = rmqrcode
3-
version = 0.1.0
3+
version = 0.1.1
44
author = Takahiro Tomita
55
author_email = ttp8101@gmail.com
66
description = An rMQR Code Generetor

0 commit comments

Comments
 (0)