我正在尝试创建一个脚本,其中在搜索中找到的所有文件都将转换为 href 链接并重定向到 html 文件。
假设我正在搜索“单词”,它给出了以下命中:
/archive/here/is/the/first/found/file1.txt
/archive/here/is/the/second/found/file2.txt
/archive/here/is/the/third/found/file3.txt
我想重定向这些点击并转换为包含以下内容的文件“hits.html”:
<a href="/archive/here/is/the/first/found/file1.txt">file1.txt</a>
<a href="/archive/here/is/the/second/found/file2.txt">file2.txt</a>
<a href="/archive/here/is/the/third/found/file3.txt">file3.txt</a>
可以这样做(以不太复杂的方式)吗?
我试过latex2html,但没能做到。