diff --git a/API_Reference.py b/API_Reference.py index 8d3e0a5..f9423db 100644 --- a/API_Reference.py +++ b/API_Reference.py @@ -530,6 +530,9 @@ links = guan.get_links_from_pdf(pdf_path, link_starting_form='') # 将PDF文件转成文本 content = guan.pdf_to_text(pdf_path) +# 生成二维码 +guan.creat_qrcode(data="https://www.guanjihuan.com", filename='a', file_format='.png') + # 将文本转成音频 guan.str_to_audio(str='hello world', filename='str', rate=125, voice=1, read=1, save=0, compress=0, bitrate='16k', print_text=0) diff --git a/PyPI/setup.cfg b/PyPI/setup.cfg index d043956..9933bbd 100644 --- a/PyPI/setup.cfg +++ b/PyPI/setup.cfg @@ -1,7 +1,7 @@ [metadata] # replace with your username: name = guan -version = 0.0.167 +version = 0.0.168 author = guanjihuan author_email = guanjihuan@163.com description = An open source python package diff --git a/PyPI/src/guan.egg-info/PKG-INFO b/PyPI/src/guan.egg-info/PKG-INFO index 01c54a0..0ae3a0f 100644 --- a/PyPI/src/guan.egg-info/PKG-INFO +++ b/PyPI/src/guan.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: guan -Version: 0.0.167 +Version: 0.0.168 Summary: An open source python package Home-page: https://py.guanjihuan.com Author: guanjihuan diff --git a/PyPI/src/guan/__init__.py b/PyPI/src/guan/__init__.py index 7d4c4be..9bf6147 100644 --- a/PyPI/src/guan/__init__.py +++ b/PyPI/src/guan/__init__.py @@ -2,7 +2,7 @@ # With this package, you can calculate band structures, density of states, quantum transport and topological invariant of tight-binding models by invoking the functions you need. Other frequently used functions are also integrated in this package, such as file reading/writing, figure plotting, data processing. -# The current version is guan-0.0.167, updated on April 06, 2023. +# The current version is guan-0.0.168, updated on April 25, 2023. # Installation: pip install --upgrade guan @@ -3184,6 +3184,16 @@ def pdf_to_text(pdf_path): content = content + x.get_text().strip() return content + +## image + +# 生成二维码 +def creat_qrcode(data="https://www.guanjihuan.com", filename='a', file_format='.png'): + import qrcode + img = qrcode.make(data) + img.save(filename+file_format) + + ## audio # 将文本转成音频