htmltree icon indicating copy to clipboard operation
htmltree copied to clipboard

Simple HTML parser

Open phorward opened this issue 6 years ago • 3 comments

Hello, this is a first version of a simple HTML parser that can be used to transform an HTML input source into a nested htmltree elements structure. Maybe you find it useful. I didn't test it yet with all runtime environments htmltree should run within.

phorward avatar Sep 18 '18 09:09 phorward

Thanks, Jan. A parser could be a nice addition to htmltree. I have a tight deadline to finish a project for a client this week so I won't get a chance to look at your contribution and test it until next week. Hope that's ok.

Kind regards, Mike

Michael-F-Ellis avatar Sep 18 '18 11:09 Michael-F-Ellis

Hope that's ok.

Sure it is, don't feel stressed with it in any way. I think this implementation won't work with Transcrypt so far. Transcrypt has so many pitfalls and problems to deal with right now...

phorward avatar Sep 18 '18 12:09 phorward

Hi @Michael-F-Ellis, I've just updated my HTML parser to work both with CPython 3.7 and Transcrypt 3.7.5.

I've put the pragmas above the docsctring because they produced different results with Transcrypt. Please feel free to change the section below around the "main" to fulfill previous standards, I've just changed it this way for direct testing.

phorward avatar Sep 20 '18 11:09 phorward