![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-08 22:20 |
47,811 topics / 349,895 posts / today 0 new / 48,253 members |
| DOS批处理 & 脚本技术(批处理室) » [Share] Super Powerful Tool for Converting Web Pages to Text in the Command Line |
| Printable Version 9,783 / 37 |
| Floor1 无奈何 | Posted 2006-11-27 11:48 |
| 荣誉版主 Posts 356 Credits 1,338 | |
|
Super Powerful Tool for Converting Web Pages to Text in Command Line
Software Name: HtoX32c This is the command line version of HtoX32, with strong customizable functions and very ideal conversion effects. I have used many html2txt - like software, and this is the only one whose conversion effect satisfies me. This is a work of Japanese, so the interface is in Japanese. I referred to the Chinese - localized version of HtoX32 and the usage experience to localize it. But it was not localized now, it was a long time ago, and I just dug it out from the bottom of the box. I don't understand Japanese, and in order to fill bytes, the localization quality is very poor. Sweat for myself, such a thing dares to be posted. When using it, be sure to pay attention to adding the /IP parameter to not do encoding conversion, otherwise the converted things will be impossible for anyone to understand. I hope the recommended software can bring a little convenience to everyone when organizing web page materials. Attachments HtoX32c.zip (63.34 KiB) |
|
| Floor2 redtek | Posted 2006-11-27 12:24 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
Thanks to the moderator for providing such a good tool, download and collect it~:)
|
|
| Floor3 lxmxn | Posted 2006-11-27 12:43 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Well, it's really good. There are so many parameters available. Thanks to the small tool from the moderator "Chen Feng", heh heh~ |
|
| Floor4 vkill | Posted 2006-11-27 23:02 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
Why is it garbled after conversion? Still prefer wget + sed, and think HTML tags are sometimes really useful
|
|
| Floor5 无奈何 | Posted 2006-11-27 23:24 |
| 荣誉版主 Posts 356 Credits 1,338 | |
|
RE vkill
The garbled code issue has been mentioned in the top post. You must add the /IP parameter. HtoX32c and processing with sed, awk, etc. have different focuses. The former is suitable for converting the whole article, and the latter is suitable for extracting partial information. If HTML tags are split into multiple lines, processing with sed, etc. will be a bit more troublesome. |
|
| Floor6 vkill | Posted 2006-11-27 23:32 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
Originally posted by Wú Nài Hé at 2006-11-27 23:24: The splitting of HTML tags into multiple lines is indeed a problem. It's really difficult to handle when using sed~ Hehe~ They each have their own focuses |
|
| Floor7 electronixtar | Posted 2006-11-28 09:06 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
Personally, I think it's better to use IE to do this kind of manual work to ensure the effect is the same as what users see in IE htm2txt.vbs Usage examples: Convert web pages in .chm to txt cscript //NoLogo //e:vbscript htm2txt.vbs ms-its:C:\WINDOWS\Help\ntcmds.chm::/ntcmds.htm > "%UserProfile%\Desktop\Nt Command Line.txt" Convert URL to txt cscript //NoLogo //e:vbscript htm2txt.vbs http://www.Google.com > "%UserProfile%\Desktop\Google Homepage.txt" Convert html file to txt cscript //NoLogo //e:vbscript htm2txt.vbs D:\test.htm > D:\test.txt Note: Here, D:\test.htm must be written with the complete full path [ Last edited by electronixtar on 2006-11-28 at 11:38 PM ] |
|
| Floor8 lxmxn | Posted 2006-11-28 10:37 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Not bad, give my brother extra points~ |
|
| Floor9 lotus516 | Posted 2006-11-28 12:04 |
| 高级用户 Posts 246 Credits 551 | |
|
Why did I get an error with the electronixtar script!! The cmd display is in the attached file!!!!
|
|
| Floor10 lxmxn | Posted 2006-11-28 12:48 |
| 版主 Posts 4,938 Credits 11,386 | |
Originally posted by lotus516 at 2006-11-28 12:04: Carefully check your file name and path, as well as whether the file exists and if there are spaces in the path, and you will know the answer. |
|
| Floor11 electronixtar | Posted 2006-11-28 23:39 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
Forgot to mention, relative paths are not supported |
|
| Floor12 lotus516 | Posted 2006-11-29 01:35 |
| 高级用户 Posts 246 Credits 551 | |
Originally posted by lxmxn at 2006-11-28 12:48: It's strange. My path has no spaces, it's an absolute path, and the file exists, but it's still wrong!!! Still see the attachment!!!! I took screenshots of the error and the path!!! |
|
| Floor13 无奈何 | Posted 2006-11-30 01:33 |
| 荣誉版主 Posts 356 Credits 1,338 | |
|
RE electronixtar
Thank you, brother, for the VBS script. I also know the power of VBS, but I can only hope to study it in the future. Why is VBS so slow at processing characters? |
|
| Floor14 electronixtar | Posted 2006-11-30 07:06 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
It's not that VBS is slow, but that the IE loading speed is slow. Those few lines are parsed by calling the IE kernel mshtml.dll. [ Last edited by electronixtar on 2006-11-30 at 07:19 AM ] |
|
| Floor15 electronixtar | Posted 2006-11-30 07:15 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
re lotus516
You can try the form like file://E:/E-books/1/0001.htm. Judging from the icon of your htm file, I guess you have modified the htm file association, which may have a certain impact on the effect of the code. [ Last edited by electronixtar on 2006-11-30 at 07:18 AM ] Attachments cmd.JPG (32.45 KiB) |
|
| 1 2 3 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |