tool script to convert back slash
Back slash is used in windows, which makes so many headache for me. Then an idea came to my mind. It's
- writing a python script to modify my clipboard content, and
- creating a listary command to call the script.
steps
- create the script
D:\tool\slash_convertion.pywith following content.
import re
import clipboard
text = clipboard.paste()
lsA = text.splitlines()
lsB = []
for line in lsA:
line = re.sub(r"\\", "/", line)
theMatch = re.search("^\"*(.*?)\"*$", line)
# print(theMatch)
line = f'"{theMatch.groups()[0]}"'
lsB.append(line)
text = "\n".join(lsB)
text += "\n"
# print(text.encode("utf8"))
# print(text)
clipboard.copy(text)
- create listary command

- input keyword
slashto modify you clipboard content.
tool script to convert back slash的更多相关文章
- javascript: Convert special characters to HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- ASP.NET IIS Registration Tool (Aspnet_regiis.exe)
IIS Version Special cases for 32-bit versions of Aspnet_regiis.exe 6.0 You can run the 32-bit versio ...
- How do I convert an IIR filter into a FIR filter in digital signal processing?
Maybe you were asking if there is some kind of design tool allowing to convert an IIR filter into an ...
- Bulk Convert DOC to DOCX
原文链接 :http://blogs.msdn.com/b/ericwhite/archive/2008/09/19/bulk-convert-doc-to-docx.aspx 帮助文档:http:/ ...
- Sed - An Introduction and Tutorial by Bruce Barnett
http://www.grymoire.com/unix/sed.html Quick Links - NEW Sed Commands : label # comment {....} Block ...
- Liunx面试题
答案待定 1.请用shell查询file1 里面空行的所在行号2.编写ShellScript查询file1 以abc 结尾的行3.打印出file1 文件第1 到第3 行4.如何将本地80 端口的请求转 ...
- Quality assessment and quality control of NGS data
http://www.molecularevolution.org/resources/activities/QC_of_NGS_data_activity_new table of contents ...
- Linux常用Shell脚本珍藏【转载】
我们在运维中,尤其是linux运维,都知道脚本的重要性,脚本会让我们的 运维事半功倍,所以学会写脚本是我们每个linux运维必须学会的一门功课,这里收藏linux运维常用的脚本.如何学好脚本,最关键的 ...
- linux常用脚本
转载于http://justcoding.iteye.com/blog/1943504 我们在运维中,尤其是linux运维,都知道脚本的重要性,脚本会让我们的 运维事半功倍,所以学会写脚本是我们每个l ...
- 【OS】NMON的简介和使用
[OS]NMON的简介和使用 目前NMON已开源,以sourceforge为根据地,网址是http://nmon.sourceforge.net. 1. 目的 本文介绍操作系统监控工具Nmon的概念. ...
随机推荐
- 郁金香 用C写一个定时器来循环获取阳光
先来张效果图 定时器代码 HWND 游戏窗口句柄 = FindWindowA("MainWindow", "植物大战僵尸中文版"); ::SetTimer( ...
- python 中常用可视化工具库
python 中常用可视化工具库 a.Numpy常用属性及方法 为什么用它:它可以方便的使用数组,矩阵进行计算,包含线性代数.傅里叶变换.随机数生成等大量函数(处理数值型的数组) import num ...
- JZOJ 3226. 【HBOI2013】ALO
题目 网上自己搜 解析 区间异或很容易想到可持久化字典树 但本题的关键是如何高效率求出以某个数为区间最大值时这个区间的范围 依题我们知道区间最长可到比它第二大的位置(开区间) 所以我们如果能找到每个数 ...
- CF818G - Four Melody
题意:对于一个序列,令一个 \(melody\) 为一个子序列满足子序列的相邻两项相差 \(1\) 或者模 \(7\) 同余.现在提取四个不重合的 \(melody\),求最长总长度. 我们先考虑暴力 ...
- 基于Linux编译JDK18
1.概述 JDK都没手动编译过,敢说自己是Java程序员吗?(By 羊哥--JDK都没手动编译过,敢说自己是Java程序员吗?实战编译Java源码(JDK源码,JVM)视频教程_哔哩哔哩_bilibi ...
- 人工智能,丹青圣手,全平台(原生/Docker)构建Stable-Diffusion-Webui的AI绘画库教程(Python3.10/Pytorch1.13.0)
世间无限丹青手,遇上AI画不成.最近一段时间,可能所有人类画师都得发出一句"既生瑜,何生亮"的感叹,因为AI 绘画通用算法Stable Diffusion已然超神,无需美术基础,也 ...
- FTP调优
最近在解决客户的问题时接触到了一些FTP的问题,自己在使用过程中发现了很多问题,所以这里总结了一些调优的办法: 服务:vsftp 非常安全文件传输 配置文件:/etc/vsftpd/vsftpd.co ...
- C# datatable group by分组
DataTable dt = new DataTable(); dt.Columns.Add("A"); dt.Columns.Add("B"); dt.Col ...
- grafana嵌入iframe,websoket连接报错400或403(nginx代理)
1.custom.ini配置文件修改allowed_origins=* 2. nginx中增加配置,如下:
- JAVA丑数
leetcode题目链接 有些数的素因子只有 3,5,7,请设计一个算法找出第 k 个数.注意,不是必须有这些素因子,而是必须不包含其他的素因子.例如,前几个数按顺序应该是 1,3,5,7,9,15, ...