You've already forked amazing-qr
mirror of
https://github.com/x-hw/amazing-qr.git
synced 2025-08-10 22:41:23 +02:00
fixed a problem about characters support
This commit is contained in:
@@ -21,7 +21,8 @@ from PIL import Image
|
|||||||
# See [https://github.com/sylnsfar/qrcode] for more details!
|
# See [https://github.com/sylnsfar/qrcode] for more details!
|
||||||
def run(words, version=1, level='H', picture=None, colorized=False, contrast=1.0, brightness=1.0, save_name=None, save_dir=os.getcwd()):
|
def run(words, version=1, level='H', picture=None, colorized=False, contrast=1.0, brightness=1.0, save_name=None, save_dir=os.getcwd()):
|
||||||
|
|
||||||
supported_chars = r'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ·,.:;+-*/\~!@#$%^&`[]()?_{}|'
|
supported_chars = r"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ··,.:;+-*/\~!@#$%^&`'=<>[]()?_{}|"
|
||||||
|
|
||||||
|
|
||||||
# check every parameter
|
# check every parameter
|
||||||
if not isinstance(words, str) or any(i not in supported_chars for i in words):
|
if not isinstance(words, str) or any(i not in supported_chars for i in words):
|
||||||
|
@@ -257,7 +257,7 @@ Optional parameters
|
|||||||
* 常用**英文标点符号**和空格
|
* 常用**英文标点符号**和空格
|
||||||
|
|
||||||
```console
|
```console
|
||||||
· , . : ; + - * / \ ~ ! @ # $ % ^ & ` [ ] ( ) ? _ { } | and (space)
|
· , . : ; + - * / \ ~ ! @ # $ % ^ & ` ' = < > [ ] ( ) ? _ { } | and (space)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@@ -255,11 +255,11 @@ Optional parameters
|
|||||||
* Common punctuations:
|
* Common punctuations:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
· , . : ; + - * / \ ~ ! @ # $ % ^ & ` [ ] ( ) ? _ { } | and (space)
|
· , . : ; + - * / \ ~ ! @ # $ % ^ & ` ' = < > [ ] ( ) ? _ { } | and (space)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
``
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user