质量前缀和后缀
Mass prefix and subfix
输入数据:
Text 1
Text 2
Etc...
我想要这样的输出。更喜欢 .txt 文件
<a target="_blank" href="https://www.website.com/Text 1">Text 1</a>
<a target="_blank" href="https://www.website.com/Text 2">Text 2</a>
前缀是:
<a target="_blank" href="https://www.website.com/"></a>
有人可以帮助我吗?
根据您的评论,您需要学习脚本...
例如使用 python 你可以:
#!python3
inputext = """Text 1
Text 2
Etc..."""
outputext = ''
for line in inputext.split('\n'):
outputext += "<a target=\"_blank\" href=\"https://www.website.com/" + line + "\">" + line + "</a>\n"
with open('outfilepath.html', 'w') as outfile:
outfile.write(outputext)
制作了一个.bat文件(.py需要在同一个目录)
python text.py > text.txt
输入数据:
Text 1
Text 2
Etc...
我想要这样的输出。更喜欢 .txt 文件
<a target="_blank" href="https://www.website.com/Text 1">Text 1</a>
<a target="_blank" href="https://www.website.com/Text 2">Text 2</a>
前缀是:
<a target="_blank" href="https://www.website.com/"></a>
有人可以帮助我吗?
根据您的评论,您需要学习脚本...
例如使用 python 你可以:
#!python3
inputext = """Text 1
Text 2
Etc..."""
outputext = ''
for line in inputext.split('\n'):
outputext += "<a target=\"_blank\" href=\"https://www.website.com/" + line + "\">" + line + "</a>\n"
with open('outfilepath.html', 'w') as outfile:
outfile.write(outputext)
制作了一个.bat文件(.py需要在同一个目录)
python text.py > text.txt