|
Post by alexfish on Mar 19, 2019 2:55:24 GMT 1
and a picky of Switching off a browser :: IE one clicks Reboot ;; since One does no Realise what is happening when the Spinning"Widget" gets STUCK Attachments:
|
|
|
Post by bigbass on Mar 19, 2019 8:00:21 GMT 1
Hello Alex this isn't directly related to what you are doing be patient my friend but it maybe a useful idea when you are on a frame buffer just for fun but we may have a good use for it sudo apt-get install netsurf-fb # you will get this sad error if you try to run it # Unable to initialise the font system # the fix however was easy we need some fonts cd /usr/share/fonts/truetype/dejavu sudo cp *.ttf /usr/share/netsurf #now run it netsurf-fb -b 24 basic-converter.proboards.com/#now you have a frame buffer running the browser ! #I am using a large screen tv so this works for me #but you get the idea to adjust it #netsurf-fb -w 1920 -h 1080 -b 32 basic-converter.proboards.com/Joe
|
|
|
Post by alexfish on Mar 20, 2019 17:39:25 GMT 1
Hi Joe
Thanks for the prom't netsurf-fb has been installed for some time ,
Re can remember downloading lib-hubbub, that is netsurf's parser util's , sadly like quite a few people 'not a cmake make fan'
hence gave up on it.
the Prom't, I decided to download all the sources of netsurf , all the libs are there , but the cmake install libs instruction are not working
as per the read me , as mentioned the only bits I am after are the parser util's ' hence did the usual cp the bits,
still digging around to find what else is missing , and possible wondering why youtube videos will work.
BR Alex
|
|
|
Post by bigbass on Mar 22, 2019 16:13:02 GMT 1
Hello Alex sometimes I just want to save plain text which is easy enough but code can get mangled or removed here is a good example how to get all the plain text w3m -dump www.fltk.org/doc-1.3/classFl__Check__Browser.html#a3b5c4334eba9cf931a304b465bede9fd > output.txt if you use that page for testing your or any other parser or even netsurf plain text you can see the results and compare them (w3m won on this example) I actually needed to save some code to help document some things good to do because we trust web links always are available to show code but then they go 404 on us so I can back up just the plain text version and copy /paste into your text editor saves you a lot time in formatting text Joe
|
|
|
Post by alexfish on Mar 30, 2019 21:21:40 GMT 1
Hi All
Just an update on a My html2text parser
the bit where I was stuck on where the Table
now have the c++ working in same manor as Bacon , so hopeful can post a BaCon version
and it is pretty fast; Forum real 0m0.026s user 0m0.020s sys 0m0.000s ====================
Bacon Site times real 0m0.049s user 0m0.020s sys 0m0.020s =================== some example outputs here No table formatting done and no utf8 lookups: but can see where the table sections are RE the "|" bits
Forum
The BAsic CONverter Forum
|Goto the BaCon website
Welcome Guest. Please Login or Register .
The BAsic CONverter Forum
Home
General
News
Documentation
Code Projects
Troubleshooting area
Bugs, features General
|||Board |Threads |Posts |Last Post
||News - 1 Viewing
News and announcements
Moderator: Pjot |92 |830 |HAPPY BIRTHDAY BACON! by bigbass Mar 16, 2019 5:47:42 GMT 1
||Documentation
Tutorials & demonstrations
Moderator: Pjot |122 |1,769 |fltk using fluid GUI by bigbass Mar 17, 2019 1:56:15 GMT 1
||Code Projects
Programs, challenges, competitions
Moderator: Pjot |196 |4,096 |Raspberry(PI3) by alexfish Mar 15, 2019 19:11:29 GMT 1
||
Troubleshooting area - 1 Viewing
Problems, issues, tips & tricks
Moderator: Pjot |390 |2,876 |trying to get events in fltk by bigbass Feb 27, 2019 23:20:31 GMT 1
||Bugs, features
Report a bug, request a feature
Moderator: Pjot |233 |2,219 |Bug with "bacon -e" by faustin Feb 17, 2019 19:33:48 GMT 1
Legend |New Posts |No New Posts
Forum Information & Statistics ||||Threads and Posts
|Total Threads: 1,033 Total Posts: 11,790
|Last Updated: fltk using fluid GUI by bigbass ( Mar 17, 2019 1:56:15 GMT 1
|Recent Threads - Recent Posts - RSS Feed
||||Members
|Total Members: 200
|Newest Member: juppel
|Most Users Online: 144 Aug 22, 2013 23:04:29 GMT 1
|View today's birthdays
||||Users Online
|0 Staff, 0 Members, 3 Guests.
|
||||Users Online in the Last 24 Hours
|1 Staff, 2 Members , 96 Guests.
|vovchik Pjot bigbass
Click here to remove banner ads from this forum. This Forum Is Hosted For FREE By ProBoards Get Your Own Free Forum Terms of Service | Privacy | Cookies | FTC Disclosure | Report Abuse | Report Ad | Consent
Some bit from the bacon web site
BaCon - BASIC to C converter
Easy to learn
BaCon syntax is based on old-school BASIC.
Fast and powerfull
You can use the power and speed of C.
About
BaCon is a free BASIC to C translator for Unix-based systems, which runs on most Unix/Linux/BSD platforms, including MacOSX.It intends to be a programming aid in creating tools which can be compiled on different platforms (including 64bit environments), while trying to revive the days ofthe good old BASIC
BaCon can be described as a translator, a converter, a source-to-source compiler, a transcompiler or a transpiler. It also can be described as a very elaborate preprocessor to C.BaCon is implemented in generic shell script and in itself. Therefore, to start using Bacon, the target system must have either Korn Shell , or ZShell , or Bourne Again Shell (BASH) available.If none of these shells are available, then the free Public Domain Korn Shell can be installed, which can execute BaCon also.Furthermore, BaCon also works with a newer Kornshell implementation like the MirBSD Korn Shell
The shell script implementation can convert and compile the BaCon version of BaCon. This will deliver the binary version of BaCon which has an extremely high conversion performance. On newer systems, the average conversion rate usually lies above 10.000 lines per second.
Code converted by BaCon can be compiled by GCC , the Compaq C Compiler , TCC , the clang/LLVM compiler (and possibly by other C compilers),but also by C++ compilers like g++ or clang++
News
February 1, 2018: BaCon 3.7.1 released - see CHANGES . Documentation updated.
January 1, 2018: BaCon 3.7 released - see CHANGES. Documentation updated.
August 1, 2017: BaCon 3.6 released - see CHANGES. Documentation updated.
May 1, 2017: BaCon 3.5.4 released - see CHANGES. Documentation updated.
April 1, 2017: BaCon 3.5.3 released - see CHANGES. Documentation updated.
March 1, 2017: BaCon 3.5.2 released - see CHANGES. Documentation updated. Older news can be found here
More questions about various BASIC dialects can be asked here
Examples
Base64 encoder here
Base64 decoder here
The Zeller algorithm here
UTF8 encoder here
Simple calculator program here
CGI demonstration here
GTK-server demo here and a Glade file here
Is there any relation with this BACON Basic converter or the Bacon programming language? No.
Why are you maintaining this project? Who are you anyway? The Finnish programmer Kristian Virtanen held an interview with me, read it here
Are you the author of the GTK-server project? Yes, I am.
How to provide feedback on this project? There is a Message Board where all issues and problems can be logged.
Is there some other way I can help? |You might consider to provide a donation to keep BaCon free: |
Which platforms are supported? |||||||Last update: February 9, 2018 - © Peter van Eerten BaCon uses Fossil for its software versioning and revision control. is my current Euler rating using BaCon. || to help the ongoing development of BaCon.
|| tracks the site usage.
Copyright © 2017 by Peter van Eerten, template by BLACKTIE.CO , implementation by Tomaaz
BR Alex
|
|
|
Post by alexfish on Mar 31, 2019 14:24:11 GMT 1
Hi All
Doing a bacon version::
this can form the base of a Simple html2text parser
to convert the HTML text have saved the nodes$ and then passed the results through the system html2text
the html2text is normally in the usr/bin/
yes there are "|" artefacts , these are used in a final rendering
but if strip the leading "||||" then results look ok
BR Alex
can format the width like so
nodes$ = EXEC$("/usr/bin/html2text -width 120 mytext.html")
IF argc == 2 THEN
ELSE
PRINT "parser file.html" END END IF
DECLARE nodes$ TYPE STRING DECLARE html$ TYPE STRING DECLARE dimension TYPE int DECLARE ptr=0 TYPE int DECLARE cuts$ TYPE STRING DECLARE bod TYPE int DECLARE tst$ TYPE STRING html$ = LOAD$(argv[1])
IF (INSTR(html$,"<body") AND INSTR(html$,"<body") ) THEN
ELSE END END IF
SPLIT html$ BY "\n" TO array$ SIZE dimension cuts$="" WHILE ( ptr < dimension) DO tst$= array$[ptr] tst$=CHOP$(tst$)
IF INSTR(tst$,"</bod") THEN bod =0 END IF
IF INSTR (tst$,"<scrip") THEN bod =0 END IF
IF (bod) THEN cuts$ = cuts$ & tst$
END IF
IF INSTR(tst$,"<bod") THEN bod =1 END IF IF INSTR (tst$,"</script") THEN bod =1 END IF
INCR ptr WEND ptr=0
SPLIT cuts$ BY ">" TO array$ SIZE dimension
nodes$ ="<html>\n" WHILE ( ptr < dimension) DO bod = INSTR(array$[ptr],"<")
IF (INSTR(array$[ptr],"/tr")) THEN
nodes$ = nodes$ & "<br>" END IF IF (INSTR(array$[ptr],"</h")) THEN
nodes$ = nodes$ & "<br>" END IF
IF INSTR(array$[ptr],"/h") THEN
nodes$ = nodes$ & "<br>" END IF
IF INSTR(array$[ptr],"<p") THEN nodes$ = nodes$ & "<br>"
END IF IF INSTR(array$[ptr],"<li") THEN nodes$ = nodes$ & "<br>"
END IF IF INSTR(array$[ptr],"<th") THEN nodes$ = nodes$ & " | " END IF
IF INSTR(array$[ptr],"<td") THEN nodes$ = nodes$ & " | " END IF
IF (bod > 1) THEN
IF INSTR(array$[ptr],"var ")=1 THEN
' DO NOTHING ELSE nodes$ = nodes$ & MID$(array$[ptr],1,bod-1 ) & " "
END IF
END IF INCR ptr
WEND nodes$ = nodes$ & "\n</html>" SAVE nodes$ TO "mytext.html" nodes$ = EXEC$("/usr/bin/html2text mytext.html")
PRINT nodes$
if need links the use hxprintlinks
example of print-out
Is there some other way I can help? | You might consider to provide a donation to keep BaCon free: |
Which platforms are supported? | [348] | [349] | [350] | [351] | [352] | [353] | [354] Last update: February 9, 2018 - © [355]Peter van Eerten . [356] BaCon uses [357]Fossil for its software versioning and revision control. [358] is my current [359]Euler rating using BaCon. | | to help the ongoing development of BaCon. | [361] | tracks the site usage.
Copyright © 2017 by Peter van Eerten, template by [362]BLACKTIE.CO , implementation by Tomaaz
then the links look like this at the foot starting at '| [348] |'
http://www.unix.org http://www.linux.org http://www.tru64.org http://www.opensolaris.com http://www.freebsd.org http://www.openbsd.org http://www.apple.com/macosx/
|
|
|
Post by alexfish on Mar 31, 2019 16:34:22 GMT 1
Hi All
Updated to use hxprintlinks at default
This parser will work on html files and passes through hxprintlinks
and will index the links:
BR Alex
IF argc == 2 THEN
ELSE
PRINT "parser file.html" END END IF
DECLARE nodes$ TYPE STRING DECLARE html$ TYPE STRING DECLARE dimension TYPE int DECLARE ptr=0 TYPE int DECLARE cuts$ TYPE STRING DECLARE bod TYPE int DECLARE tst$ TYPE STRING html$ = LOAD$(argv[1])
IF (INSTR(html$,"<body") AND INSTR(html$,"<body") ) THEN
ELSE END END IF
SPLIT html$ BY "\n" TO array$ SIZE dimension cuts$="" WHILE ( ptr < dimension) DO tst$= array$[ptr] tst$=CHOP$(tst$)
IF INSTR(tst$,"</bod") THEN bod =0 cuts$ = cuts$ & "<br>BodyEnd<br>" END IF
IF INSTR (tst$,"<scrip") THEN bod =0 END IF
IF (bod) THEN cuts$ = cuts$ & tst$
END IF
IF INSTR(tst$,"<bod") THEN bod =1 END IF IF INSTR (tst$,"</script") THEN bod =1 END IF
INCR ptr WEND ptr=0
SAVE cuts$ TO "mytext.html" SYSTEM ("hxprintlinks mytext.html > links.html") cuts$ = LOAD$("links.html") SPLIT cuts$ BY ">" TO array$ SIZE dimension
DECLARE link_count TYPE int DECLARE countwatch TYPE int DECLARE lastcount TYPE int nodes$ ="<html>\n" WHILE ( ptr < dimension) DO bod = INSTR(array$[ptr],"<")
IF (INSTR(array$[ptr],"/tr")) THEN
nodes$ = nodes$ & "<br>" END IF IF (INSTR(array$[ptr],"</h")) THEN
nodes$ = nodes$ & "<br>" END IF
IF INSTR(array$[ptr],"<p") THEN nodes$ = nodes$ & "<br>"
END IF
IF INSTR(array$[ptr],"BodyEnd") THEN nodes$ = nodes$ & "<br><br> Links:" countwatch=1 END IF
IF INSTR(array$[ptr],"<li") THEN
IF (countwatch) THEN INCR link_count 'PRINT "Link " ,link_count nodes$ = nodes$ & "<br>" ELSE nodes$ = nodes$ & "<br>"
END IF END IF
IF INSTR(array$[ptr],"<th") THEN nodes$ = nodes$ & " | " END IF
IF INSTR(array$[ptr],"<td") THEN nodes$ = nodes$ & " | " END IF
IF (bod > 1) THEN
IF INSTR(array$[ptr],"var ")=1 THEN
' DO NOTHING ELSE
IF (link_count) THEN IF (link_count != lastcount) THEN ' PRINT "WATCH >" ,link_count , ":" , MID$(array$[ptr],1,bod-1 ) lastcount =link_count nodes$=nodes$ & STR$(link_count) & ". " END IF END IF
nodes$ = nodes$ & MID$(array$[ptr],1,bod-1 ) & " "
END IF
END IF INCR ptr
WEND nodes$ = nodes$ & "\n</html>" SAVE nodes$ TO "mytext.html" PRINT
nodes$ = EXEC$("/usr/bin/html2text mytext.html")
PRINT nodes$
|
|
|
Post by alexfish on Apr 3, 2019 13:57:36 GMT 1
Hi All
My Final Update :: on the ToolKit/Desktop
Web-View & Html parser Ready:
GTK widget plug ready::
Window Scroll implemented for both Web & Game play:: yes main object (game play) hence game-play and drawing to root & windows:: Ready
for gtk plug & game play have written some necessary rules.d
/etc/udev/rules.d/ngltkpi.rules:: Ready
the list of Dependencies is now Minimal and should be available in the Repo's
Now in process of a clean-up of the code base
Hope to see You All on another thread + BR Alex
|
|