Programming a graphical universal markup non-bloated browser (HTML?)
GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Programming a graphical universal markup non-bloated browser (HTML?)
Hello,
There is no doubt about it: "web is bloated".
Everyone, all, talk that the web browsers take a vast amount of resource and memory. Internet browsers make computers run slow. There is an important increase of CPU cycles. Many people complain that their browser is slow, so, they need to buy a newer PC. New Windows, but the system takes more more Endless story, right? Users most often need to read news, simple documents, and maybe POST few things. These many operations are most often simple. For simple Markup document, simple format, you may make use of your simple low resource/hardware perfs Kindle ebook for instance. HTML5? -Too heavy. Mobile html? Or, original 18-20 functions of HTML 1-2 ? Asciidoc? (forget Markdown due to ---- ==== much too complex to programme). Actually ASCIIDOC has a much better Markup syntax, since it is less complex than HTML and with few fopen/fgets/... string analysis, a document can be rendered. Wanna read your news on your Ebook Kindle, mobile, Raspberry without important resource dependency? Your Kindle is pretty slow, right? Shall it be slow? - No, since Markup is just few lines of C code to render a markup document. Instead of keep using Firefox, could you benefit of programming a graphical universal markup non-bloated browser (HTML?)? Dillo is a good idea, but it won't be compiled on a Kindle?
Sorry for the very very bad grammar of the prev paragraph. Don't bash, this thread is for positive mind and for plain C programmers only.
You are gently, kindle'ly, invited you to discuss within this thread on small resource markup syntax, markup document renderers, and portable plain C compiling/programming.
Programming a graphical universal markup non-bloated browser (HTML?)
Hello,
I prefer ASCIIDOC to anything else since it is easy to convert using plain C language to html. Sections of ASCIIDOC are easy to handle with C (one on the line with '=' char(s)). Very probably someone is directly uploading Asciidoc page and lets do PHP the magic to render (simply convert) it directly on the website. I can convert my C source code to php, if you'd like. Let me know.
Maybe, would you likely know an already existing PHP code to render ASCIIDOC on website?
In 1983 I worked with ZOG which was a hypertext system that was used for interactive documents made up of formatted text, pictures and links. It ran fine on a 6 MIPS computer without any of the bloat and frills taken for granted today.
95% of websites run fine with Javascript disabled. It is a feature I play a lot in the reasonably old Opera 11 and 12 versions (the last versions before Opera changed to Chromium code base and I stopped using its current version). These versions (11 and 12) are reasonably light in RAM, and fairly compatible with most websites I use (although I force the use of mobile versions of Twitter and Facebook, which are, IMO and needs, better).
If I would build a website for anything with mostly text and images, I would use HTML 3.2. HTML 4.01 with a few simple CSS styles are also practical and light resource needs (and compatible with many many many different platforms and browsers, old and new). HTML5, like you said... "thank you, I pass it".
"links" is a textmode browser I eventually use. Its compatibility with some websites is surprising (in a very good way) to me! (:
I don't understand the need for a PHP code on the server side as the asciidoc application's purpose is to convert a text file in Asciidoc format to a static (x)html page, that will be rendered as any the web page by the browser.
asciidoc -b xhtml11 -a icons -f $CONF_FILE -o $ll/${page}.html ${page}.${ll}.txt
where CONF_FILE is the config file for asciidoc, ll=fr for French and page=tools
You can see the source file tools.fr.txt clicking on "Texte source" on the bottom of the menu on the left of the web page.
PPS Did you rewrote the Python application asciidoc.py in C? Is your version complete then?
I guess you did that as an exercise, as the python app is fast enough (a few seconds to build the whole website whose root is http://slint.fr/old/ here). Or you could use asciidoctor if you prefer Ruby.
Last edited by Didier Spaier; 05-26-2017 at 11:26 AM.
I don't understand the need for a PHP code on the server side as the asciidoc application's purpose is to convert a text file in Asciidoc format to a static (x)html page, that will be rendered as any the web page by the browser.
asciidoc -b xhtml11 -a icons -f $CONF_FILE -o $ll/${page}.html ${page}.${ll}.txt
where CONF_FILE is the config file for asciidoc, ll=fr for French and page=tools
You can see the source file tools.fr.txt clicking on "Texte source" on the bottom of the menu on the left of the web page.
PPS Did you rewrote the Python application asciidoc.py in C? Is your version complete then?
I guess you did that as an exercise, as the python app is fast enough (a few seconds to build the whole website whose root is http://slint.fr/old/ here). Or you could use asciidoctor if you prefer Ruby.
I would think to upload via ftp the Asciidoc only documents (txt) on my website. And I can do even edit it with my phone or anything. No need of conversion at all, since Php does the rest to make the html. What ddo you think about this idea?
In 1983 I worked with ZOG which was a hypertext system that was used for interactive documents made up of formatted text, pictures and links. It ran fine on a 6 MIPS computer without any of the bloat and frills taken for granted today.
ZOG is no longer much documented. In 1983, computer were running on nothing (few bytes)
I would think to upload via ftp the Asciidoc only documents (txt) on my website. And I can do even edit it with my phone or anything. No need of conversion at all, since Php does the rest to make the html. What do you think about this idea?
Nothing good:
You will need to write a program in PHP , somehow reinventing the wheel as it will do the same things as asciidoc.py (in python) or asciidoctor (in Ruby). It will take you months to provide the same features (if you don't give up), for no benefit that I can think of. Do I miss something?
Also your statement "no conversion at all" is wrong as the conversion would be done by the PHP script, but it would still be a conversion.
If you goal is to build the html files on the fly from the txt files it would be way easier and faster to execute a command similar to the one in my last post as a CGI script on your web server. But what for? I don't see any advantage over providing already converted html pages.
Tiny PHP code to render ASCIIDOC on your website?
Programming a graphical universal markup non-bloated browser (HTML?)
Although not duplicates, these two threads by the same OP share the theme of tiny vs bloat, and ASCIIDOC rendering on the web.
Neither asks a programming question but seem intended to promote a general discussion of their subject. As such, they have been combined and moved from the Programming forum to the General forum where they will have better exposure for that purpose.
You will need to write a program in PHP , somehow reinventing the wheel as it will do the same things as asciidoc.py (in python) or asciidoctor (in Ruby). It will take you months to provide the same features (if you don't give up), for no benefit that I can think of. Do I miss something?
In few hours, it is easy to make run a PHP code that does several syntax functions of ASCIIDOC.
I still wonder why you wouldn't find it comfortable to make a website directly without cumbersome converting. PHP does the job and it can save you a bunch of time.
But the best would be a tiny browser that understand asciidoc, which is easy in C language.
In few hours, it is easy to make run a PHP code that does several syntax functions of ASCIIDOC.
I still wonder why you wouldn't find it comfortable to make a website directly without cumbersome converting. PHP does the job and it can save you a bunch of time.
But the best would be a tiny browser that understand asciidoc, which is easy in C language.
These statements make me think that you have no idea how much work is needed to to do what you suggest, assuming that you really know what you are talking about, of which I am not sure.
I doubt that you be able to write a small program in C or PHP implementing a significant subset of ASCIIDOC's syntax. Take it as a challenge
Last edited by Didier Spaier; 05-26-2017 at 08:15 PM.
These statements make me think that you have no idea how much work is needed to to do what you suggest, assuming that you really know what you are talking about, of which I am not sure.
I doubt that you be able to write a small program in C or PHP implementing a significant subset of ASCIIDOC's syntax. Take it as a challenge
WIKI:
Quote:
Lightweight markup languages can be categorized by their tag types. Like HTML (<b>bold</b>), some languages use named elements that share a common format for start and end tags (e.g. BBCode bold), whereas proper lightweight markup languages are restricted to ASCII-only punctuation marks and other non-letter symbols for tags, but some also mix both styles (e.g. Textile bq. ) or allow embedded HTML (e.g. Markdown), possibly extended with custom elements (e.g. MediaWiki <ref>source</ref>).
Presentation oriented languages include AsciiDoc, atx, BBCode, Creole, Crossmark, Epytext, Haml, JsonML, MakeDoc, Markdown, Org-mode, POD, reST, RD, Setext, SiSU, SPIP, Xupl, Texy!, Textile, txt2tags, UDO and Wikitext.
It is not complicated to convert basic syntax (**only basics**) of asciidoc using PHP to html. Tu sais probablement aussi le faire, Didier... herewith what can do PHP asciidoc to html on the site. Let me know if you need something like this, or directly you can give me syntax input and html output so that I code it. I can do it.
Code:
= My Article
*J. Smith*
http://wikipedia.org[Wikipedia] is an
on-line encyclopaedia, available in
English and many other languages.
== Software
You can install 'package-name' using
the +gem+ command:
gem install package-name
== Hardware
Metals commonly used include:
* copper
* tin
* lead
It shall look after conversion: https://pastebin.com/raw/W4tCvnHe
Here I used libreoffice to make it to html.
Afterwards, I clean up a bit the html code, and I introduce functions into the PHP code. It is fairly possible. I see no difficulty at all. Actually, when you look well, isn't HTML very ugly? ASCIIDOC has a nicer look and is much nicer for eyes. Wanna continue with html5,6,7...10? I am curious about the real meaning since programmers will become dependent to their system due to lack of clarity of HTML source code. Definitely basic ASCIIDOC (or other minimalist markup's) should be first available on a browser.
or directly you can give me syntax input and html output so that I code it.
This is what I used as specification to write convtags. See also this article I wrote to know most syntactic constructs. If you can read Python, you can also directly look how Stuart Rackham did it in asciidoc.py, attached as asciidoc.py.txt
I don't need that, as I already stated. This is what I used as specification to write convtags. See also this article I wrote to know most syntactic constructs. If you can read Python, you can also directly look how Stuart Rackham did it in asciidoc.py, attached as asciidoc.py.txtI will believe you when will have done it.
For headers (section), bold,... items, and tables, might be a first step, leet's say.
= gives html title
== gives html header h1
=== gives html header h2
...
right?
I found the syntax : http://powerman.name/doc/asciidoc#_document_header
Asciidoc or maybe there might be better choice? markdoc? bbcode?
For headers (section), bold,... items, and tables, might be a first step, leet's say.
= gives html title
== gives html header h1
=== gives html header h2
...
right?
I found the syntax : http://powerman.name/doc/asciidoc#_document_header
You would have find that in the documents I linked to, had you read it. And that just 1% of the syntax or so...
Quote:
Asciidoc or maybe there might be better choice? markdoc? bbcode?
As long as your aim is just to feed a discussion but you not do not intend to do anything beyond that (like coding something), every markup is fine
Last edited by Didier Spaier; 05-27-2017 at 04:15 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.