帮助flask框架中将普通HTML文档转义为url-for的文档
Project description
url_for_Int v2.2.4
简介
- 这是 url-for Interpreter 的开源使用版,遵循 MIT 协议。
开发者:Hifive - Github: https://github.com/Hifive55555/url_for_Int
Pypi: https://pypi.org/project/url-for-int - 它总共分为两个部分:GUI 和 API,使用方法见下
新版内容
2.2.4 修复ui数组bug,增加逆转函数omit_int
使用方法
API
函数及类
-
int_main 主函数
- 输入:origin_text原始字符
- 返回:x:str处理后的字符
-
file_catcher :导入文件处理
- 输入:origin_file, to_path, prefix, if_pre
- to_path默认为None,表示生成于原文件目录。若指定目录,则会加入pre_folder
- prefix默认为"int_"
- if_pre默认为False。若为True,则文件目录加上pre_folder
- 返回:bool值,表示是否成功
-
omit_int :删除所有url_for
-
GUI :用户界面
- GUI是一个继承了tk.Tk的窗口类
教程
- 安装:
pip install url_for_int
- 导入库:
from url_for_int import start_gui, file_catcher, int_main
- 启用GUI界面:
start_gui()
或直接运行 __init__.py 文件 - 转义一个文件
- 转录到当前文件夹:
file_catcher("test.html")
- 转录到指定文件夹:
file_catcher("test.html", "D:/test")
- 转录并覆盖原文件:
file_catcher("test.html", prefix="")
- 转录并指定前缀:
file_catcher("test.html", prefix="xxx-")
- 转录并增加pre_folder:
file_catcher("test.html", "D:/test", if_pre=True)
- 转录到当前文件夹:
- 转义一串字符
content = "xxx" after = int_main(content)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
url_for_int-2.2.4.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file url_for_int-2.2.4.tar.gz
.
File metadata
- Download URL: url_for_int-2.2.4.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cea5c90644b3307e21745bab3de58fbcc618a0964ac92c9673d6ad63d9374fc7 |
|
MD5 | 825a60315d09f9a0f1c2335861ff25a1 |
|
BLAKE2b-256 | 42016c3f3050ddc78b5bd93a7bd16525081c2a2b505ec1114065dd6614b35d4d |
File details
Details for the file url_for_int-2.2.4-py3-none-any.whl
.
File metadata
- Download URL: url_for_int-2.2.4-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db7f9f21fe77c56dd097cdbc083454689fc6df5eed65fbefa972d8e9e8a8af17 |
|
MD5 | 71a8e9065a753cc5425179dd1d824769 |
|
BLAKE2b-256 | 2b6892786d659fd405db50c44a92860d9887df81951f81c3eb1b2e51f4553110 |