|
Post by alexfish on Feb 25, 2019 17:11:42 GMT 1
Hi All
Back to the browser bits and some of the progress
the hard bit with text/image browser is in part problems with tables & + where images should be
+ paragraphing
Here is a sample of the decoder at work - the links: these bits Tell where everything should be
The start of the page
BaCon About News Downloads Documentation Examples Extensions Links FAQ Forum BaCon - BASIC to C converter Easy to learn BaCon syntax is based on old-school BASIC. [IMG]
[IMG] 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 of the 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)
and the foot of the page
How about a Win32 Version? That will never be. This project started just because there was no decent BASIC to C converter for Unix. However, BaCon works in a Cygwin
environment. For Windows, a native Basic to C converter can be found here .
Where can I find more free BASIC interpreters and compilers? Check out the website of The_Free_Country , they have a lot of programming tools for all kinds of languages!
Is there any relation with this BACON Basic converter or the Bacon programming language? No.
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: [Submit ][IMG] Which platforms are supported?
[IMG] [IMG] [IMG] [IMG] [IMG] [IMG] [IMG]
Last update: January 6, 2019 - © Peter_van_Eerten
.
[IMG] BaCon uses Fossil for its software versioning and revision control.
[Submit ][IMG] to help the ongoing development of BaCon. counter_for_wordpress tracks the site usage. Copyright © 2019 by Peter van Eerten, template by BLACKTIE.CO , implementation by Tomaaz
|
|
|
Post by alexfish on Feb 25, 2019 20:38:45 GMT 1
Hi All
want to try these methods and in short
if any one thinks this is not official
can test methods on your DeskTop with html2wml,hxprintlinks <the bits needed to follow links & menus> same style as Lynx and wApua to view the results
wget blagh generaly give result of site as index.html.*
html2wml index.html -o index.wml
hxprintlinks index.wml > index2.wml
wApua index2.wml
further to:: in with this as mentioned CSS + ability to get 'images and resize to fit within the schema' Then render the whole shebang to the gpu
Have fun + BR Alex
Added
is there an off the shelf parser that can do this look in the repos for htmlcxx can get this by installing the libs the exec can parse the file and read css files as well
htmlcxx < index.wml > <main.css>
example file test.wml but no css
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">
<wml>
<card title="Text Formatting"> <p> <b>bold text</b><br/> <big>big text</big><br/> <em>emphasized text</em><br/> <i>italic text</i><br/> <small>small text</small><br/> <strong>strong text</strong><br/> <u>underlined text</u>
</p>
<select name="b"> <option value="value1">Option 1</option> <option value="value2">Option 2</option> </select> </card>
</wml>
htmlcxx test.wml
=
----- 0@[0;493) 1@[0;21) <?xml version="1.0"?> 2@[21;22)
3@[22;114) <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> 4@[114;116)
5@[116;493) wml 6@[121;123)
7@[123;485) card 8@[153;154)
9@[154;366) p 10@[157;160) 11@[160;176) b 12@[163;172) bold text 13@[176;181) br 14@[181;184) 15@[184;203) big 16@[189;197) big text 17@[203;208) br 18@[208;211) 19@[211;235) em 20@[215;230) emphasized text 21@[235;240) br 22@[240;243) 23@[243;261) i 24@[246;257) italic text 25@[261;266) br 26@[266;269) 27@[269;294) small 28@[276;286) small text 29@[294;299) br 30@[299;302) 31@[302;330) strong 32@[310;321) strong text 33@[330;335) br 34@[335;338) 35@[338;360) u 36@[341;356) underlined text 37@[360;362)
38@[366;368)
39@[368;477) select 40@[385;386)
41@[386;426) option 42@[409;417) Option 1 43@[426;427)
44@[427;467) option 45@[450;458) Option 2 46@[467;468)
47@[477;478)
48@[485;487)
-----
CSS attributes:
@[0:493)
WML@[116:493)
|
|
|
Post by alexfish on Feb 26, 2019 0:57:06 GMT 1
With reference to what it does to tables <?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">
<wml>
<card title="WML Tables"> <p> <table columns="3" align="LCR"> <tr> <td>Col 1</td> <td>Col 2</td> <td>Col 3</td> </tr>
<tr> <td>A</td> <td>B</td> <td>C</td> </tr>
<tr> <td>D</td> <td>E</td> <td>F</td> </tr> </table> </p> </card>
</wml> then a direct pass with html2text = <?xml version="1.0"?>
Col 1 Col 2 Col 3 A B C D E F
now the html2wml can parse htpp & https . IE html2wml http://www.basic-converter.org/ -o basic.wml Also thinking out allowed here with reference to 'Turbo Vision' BR Alex Further reading can be found HEREPS:: downloads .you may find Cookies You may eat in leasure
|
|
|
Post by alexfish on Feb 26, 2019 1:35:53 GMT 1
|
|
|
Post by alexfish on Feb 26, 2019 8:39:03 GMT 1
Hi All as a final wrap on the bits above :: a direct call on the is notably long in time here is how to speed the process with available tools download the site and in walks htmldoc htmldoc will split the single file to multiple html files , much the same as html2wml does when one has achieved the splits.. read the htmldoc man page or can look HERElook at the results , then start the html2wml at the toc.html , but read them all. as quick guide one can get up and running with the bacon website in about 5 to 6 seconds bare in mind the why .. wml format here we pass the wml by the html2text now from where I sit , using the cairo rendering as previously mentioned The render layout is tit for tat to the wml format, Have Fun + BR Alex PS if wanting to make the bits iterative IE: follow links don't for get to use
|
|
|
Post by Pjot on Feb 26, 2019 18:41:59 GMT 1
Interestingly Just found this Thanks Alex, Turbo Vision as HTML Style sheet, interesting BR Peter
|
|
|
Post by alexfish on Feb 27, 2019 12:37:43 GMT 1
Your welcome @ All as regards getting the browser working (RE text mode / graphics) can replicate this in Chromium since the be no way of getting screen shots from the PI interface A picky of youtube search Added :: in this interface the link to the watch code is in the title and if done in the browser the url entry will show file:///watch?v=N-yyAL20UBU so we parse this bit , passit through youtube-dl and then to the omxplayer & Viola; BR Alex Attachments:
|
|
|
Post by alexfish on Feb 27, 2019 13:14:23 GMT 1
Here have link the bit in Chromium if wondering how to get CSS or the STYLE sheet here is a section () in html < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <HTML> <HEAD> <TITLE>e mega mix 2019 - YouTube</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1"> <LINK REL="Start" HREF="index.html"> <LINK REL="Contents" HREF="toc.html"> <LINK REL="Prev" HREF="BestofYouTube.html"> <LINK REL="Next" HREF="Queue.html"> <STYLE TYPE="text/css"><!-- BODY { font-family: serif } H1 { font-family: sans-serif } H2 { font-family: sans-serif } H3 { font-family: sans-serif } H4 { font-family: sans-serif } H5 { font-family: sans-serif } H6 { font-family: sans-serif } SUB { font-size: smaller } SUP { font-size: smaller } PRE { font-family: monospace } --></STYLE> </HEAD> <BODY> <A HREF="toc.html">Contents</A> <A HREF="BestofYouTube.html">Previous</A> <A HREF="Queue.html">Next</A> <HR NOSHADE>
<H3 class="watch-queue-title"><A NAME="0_1_1">Watch Queue</A></H3> <HR NOSHADE> <A HREF="toc.html">Contents</A> <A HREF="BestofYouTube.html">Previous</A> <A HREF="Queue.html">Next</A> </BODY> </HTML> and a picky Attachments:
|
|
|
Post by alexfish on Feb 27, 2019 20:02:16 GMT 1
@ Peter
I could not work out why the app image on the web site did not show in the links
IE test the web site with
lynx -dump http://www.basic-converter.org/
now the bits
<img class="img-responsive" src="assets/img/app-bg.png" alt="">
and take out 'alt="" ' and possible test
<img class="img-responsive" src="assets/img/app-bg.png" >
BR Alex
|
|
|
Post by Pjot on Feb 28, 2019 18:48:52 GMT 1
Hi Alex,
I am not sure what you mean? The lynx dump doesn't provide any HTML for me.
BR Peter
|
|
|
Post by alexfish on Feb 28, 2019 19:12:42 GMT 1
Hi Peter there should be 3 images at the head in lynx if you click on the image text then it shows the picture in a separate window BR Alex A Picky of lynx terminal Attachments:
|
|
|
Post by bigbass on Mar 2, 2019 17:19:59 GMT 1
Hello guys *I know you both know how to do this but wanted a simple index using the bacon website as an example the old way to make a clean simple index to see exactly what's there and the the direct links P.S we could use that in fltk or another GUI to open those links index2.html.tar.gz (2.63 KB) Joe
|
|
|
Post by alexfish on Mar 2, 2019 23:20:14 GMT 1
Hi Joe
as in the above bits can explain what happens when using the standard cli commands (system tools)
curl wget : to get the page can use wget -p option to download all including images
hxprintlinks to find the links , the links point to 'where is' the url
here we go
pi@raspberrypi:~ $ cd /home/pi/www.basic-converter.org pi@raspberrypi:~/www.basic-converter.org $ hxprintlinks index.html > links.html pi@raspberrypi:~/www.basic-converter.org $ html2text links.html [1]BaCon * [2]About * [3]News * [4]Downloads * [5]Documentation * [6]Examples * [7]Extensions * [8]Links * [9]FAQ * [10]Forum **** BaCon - BASIC to C converter ****
** Easy to learn ** BaCon syntax is based on old-school BASIC. [assets/img/arrow1.png]
the missing bit
[assets/img/arrow2.png] ** Fast and powerfull **
in the html the bits like alt="" if the script is correct like so to = "something"
<div id="headerwrap"> <div class="container"> <div class="row centered"> <div class="col-lg-12"> <h3>BaCon - BASIC to C converter</h3> <br> </div> <div class="col-2"> <h5>Easy to learn</h5> <p>BaCon syntax is based on old-school BASIC.</p> <img class="hidden-xs hidden-sm hidden-md" src="assets/img/arrow1.png" alt="arrow1"> </div> <div class="col-8"> <img class="img-responsive" src="assets/img/app-bg.png" alt="app"> <br> </div> <div class="col-2"> <br> <img class="hidden-xs hidden-sm hidden-md" src="assets/img/arrow2.png" alt="arrow2"> <h5>Fast and powerfull</h5> <p>You can use the power and speed of C.</p> </div> </div> </div> <!--/ .container --> </div><!--/ #headerwrap -->
Viola
[1]BaCon * [2]About * [3]News * [4]Downloads * [5]Documentation * [6]Examples * [7]Extensions * [8]Links * [9]FAQ * [10]Forum **** BaCon - BASIC to C converter ****
** Easy to learn ** BaCon syntax is based on old-school BASIC. [arrow1] [app]
[arrow2] ** Fast and powerfull ** You can use the power and speed of C. ***** About *****
then in real life alt="something"
click on the link points to where the image is
Then if alt=""
then it points to nowhere
yet some browser's parsers willpick it out and sort the bits and some will not BR Alex
|
|
|
Post by alexfish on Mar 2, 2019 23:51:42 GMT 1
Hi All here have adapted the download to point to the image using lynx ADDED: though I would check with hxprintlinks and html2text these are the two important bits [11]App now can look up where it is in the output 11. http://www.basic-converter.org/assets/img/app-bg.png all in picky mode BR Alex Attachments:
|
|
|
Post by alexfish on Mar 3, 2019 0:46:15 GMT 1
another tool some times used to get websites 'html2markdown'
python html2markdown.py2 shows the images but can not find the location the location should be in the brackets [ ] and there is an explanation mark warning next to them hence internally one can rectify the bits at the parsing stage
html2markdown.py2 http://www.basic-converter.org/
##### Easy to learn
BaCon syntax is based on old-school BASIC.
![](assets/img/arrow1.png)
![](assets/img/app-bg.png)
![](assets/img/arrow2.png)
and
* Which platforms are supported? ![](unix-logo.png) ![](linux.png) ![](tru64.png) ![](opensolaris.png) ![](freebsd.png) ![](openbsd.png) ![](macosx.png)
* * *
Last update: January 6, 2019 - (C) [Peter van Eerten](mailto:peter@remove-no- spam.basic-converter.org). ![](Fossil_SCM_small.png) BaCon uses [Fossil](http://www.fossil-scm.org/) for its software versioning and revision control.
when all the bits fit then the bit looks like so
* Example [plasma](plasma.bac.html) program ([screenshot](plasma.jpg))
BR Alex
|
|