Skip to main content

帮助flask框架中将普通HTML文档转义为url-for的文档

Project description

url_for_Int v2.3.0

简介

新版内容

  • 2.2.4 修复 ui 数组 bug,增加逆转函数 omit_int
  • 2.3.0 修复 omit_int 函数 bug,完善逆转义功能并添加到GUI上

使用方法

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)
  • 逆转录一个文件
    • 同上理,不过要加入参数 if_omit=True
  • 转义/逆转录一串字符
    content = "xxx"
    after_1 = int_main(content) # 转义
    after_2 = omit_int(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.3.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distributions

url_for_int-2.3.0-py3.9.egg (10.0 kB view details)

Uploaded Source

url_for_int-2.3.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file url_for_int-2.3.0.tar.gz.

File metadata

  • Download URL: url_for_int-2.3.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for url_for_int-2.3.0.tar.gz
Algorithm Hash digest
SHA256 994cb628544e4e1a5fa3e9a246d1a580ec2beaef743f5ea082498b7960a154d5
MD5 2cc7f1cfb08e9e4f96bb96c4604544f0
BLAKE2b-256 28b993b2cd48ff7a5ea6d1811d0a9109df121bbfa16bfcd9523dde918453f474

See more details on using hashes here.

File details

Details for the file url_for_int-2.3.0-py3.9.egg.

File metadata

  • Download URL: url_for_int-2.3.0-py3.9.egg
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for url_for_int-2.3.0-py3.9.egg
Algorithm Hash digest
SHA256 39086da23dcd96d7e08966821fc73312b7280695cd85d1d6ac07ed2f6e54a2cb
MD5 7fec004848b32bd1e61d8103d9efba1a
BLAKE2b-256 b517885be046ef4633d6ace0086355c081d6522d8af57b757f5bffc32b4eb614

See more details on using hashes here.

File details

Details for the file url_for_int-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: url_for_int-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for url_for_int-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8035f82c8f700509afbf137a714821a5a2488e11e4ae729b155f67afae5e3ec
MD5 ce0dff55f0dd23cbaeb223bcf93ff375
BLAKE2b-256 eeadab865743f87188da81c92072e43d97c677573098a738f929779541d2eb8d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page