This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#7114 - HTML_Parser. Creates a txt file readable in the viewer.
|
DetailsI have only tested this on the sansa.
The txt file created is in the same dir (name.txt), and is very readable with the text viewer. All tags are striped as well as extra blank spaces and newlines are limited. More formatting to come. Do not forget to add the file name to SOURCES and add to viewers.config html,veiwers/HTML_Parser,0 htm,veiwers/HTML_Parser,0 with the icon number of your choice. GRaTT |
This task depends upon
TODO additional formatting. It is almost not
required on these small screens.
GRaTT
Looks much better now.
Added: support for nested tags, it cleans up some stuff.
A bad HTML page will give a bad conversion.
If a closing > is missed then all the following text will
be discarded.
patch -p0 < HTML_ParserV1.1.diff
Nothing additional required.
GRaTT
When the parser exits the created text file is highlighted
in the directory view.
GRaTT
added 2 to the filetypes array for htm and html
GRaTT
Use of CATALOG file and adds htm and html fyle types.
increase file type array by two (2).
GRaTT
Use of CATAGORIES file
GRaTT
Here's a copy without part of the calendar patch:
I was heading out of town and trying to get a few things done.
I was not trying to force another patch on anyone.
GRaTT
-Jack
I tried to open the text viewer automatically with the
created text file by adding the function plugin_load()
to plugin.(c/h). It worked great to open and use but on
exit of the text viewer I allways got an undef instruction.
Anybody know of a way to successfully open and close a plugin
from a plugin??
GRaTT
Also, make sure that the trailing '\0' of your header/footer strings doesn't go into the text file, all text editor I tried (I tried some 7-8) had problems.
I also did some simplification: replace snprintf with strcpy (I wonder why you used snprintf in the first place). Also, there's no need to rb->write every single byte in a loop, just write all at once. Removed some uneeded variables.
Even though the simulator worked just fine, there was a weird error while compiling a test build.