<tt>,<b>,<i>,等和盈亏线 <br>,类似于山猫.例如:
# cat test.html
<body>
<div id="foo" class="blah">
<tt>test<br>
<b>test</b><br>
whatever<br>
test</tt>
</div>
</body>
Run Code Online (Sandbox Code Playgroud)
# lynx.exe --dump test.html
test
test
whatever
test
Run Code Online (Sandbox Code Playgroud)
注意:第二行应该是粗体.
sin*_*ish 10
Lynx是一个很大的程序,它的html渲染将是非常重要的.
这个怎么样:
my $lynx = '/path/to/lynx';
my $html = [ html here ];
my $txt = `$lynx --dump --width 9999 -stdin <<EOF\n$html\nEOF\n`;
Run Code Online (Sandbox Code Playgroud)
转到search.cpan.org并搜索HTML文本,它将为您提供许多选项以满足您的特定需求. HTML :: FormatText是一个很好的基线,然后分支到它的特定变体,例如HTML :: FormatText :: WithLinks,如果你想保留链接作为脚注.
| 归档时间: |
|
| 查看次数: |
2966 次 |
| 最近记录: |