Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: mdr1 on October 30, 2012, 11:43:12 am

Title: A viewer of html for Nspire
Post by: mdr1 on October 30, 2012, 11:43:12 am
Message en français (version originale) :

Salut tout le monde !
Je ne vais pas disserter pendant des heures, le projet serait simplement de visualiser du html (avec css) sur TI-Nspire grâce à un programme fait en C. Bien entendu, les pages html seraient stockées sur la calculatrice (pas d'internet :P), mais ça permettrait de profiter des pages html sans les modifier simplement en les sauvant et les envoyant sur la caltos. De plus, cela prendrait ainsi moins de place mémoire que mViewer.

Seulement voilà : certes, je sais programmer en C sur Nspire (mais si j'ai encore rien fait de concret, mais faut bien un début à tout), mais en revanche, je ne vois pas du tout comment implémenter une bibliothèque qui à partir du code html, génère de l'image à directement afficher à l'écran. J'ai bien trouvé 2-3 trucs sur internet, mais je n'ai absolument rien compris à comment les utiliser.

Donc si des gens pouvaient me venir en aide en trouvant ce que je désire, je ferais peut-être un programme capable de vous lire des pages html sur Nspire ! ;D(http://www.omnimaga.org/Themes/default/images/gpbp_arrow_up.gif)

Message in english (also an original version because I didn't traduce literally) :

Hi there !
I'm not gonna speak for hours, my project would simply be a reador of html (with css) on TI-Nspire thanks to a C program. Of course, the hyper text makup language pages (html :P) would be stored on the calculator (no wifi ;) ). The reador would enable us to read html's pages just by saving them from computer to the calculator. Moreover, the place in memory used would be less than mViewer.

But I need help ! I can program with C on Nspire (even though I haven't already coded anything on Nspire with C), but I don't know how implement a library which would do all the work by creating the image to show on the screen. I found some things on the net, but I didn't understand anything at all, too complicated.

So, if you can help me by finding a simple library doing that, I would probably create a Ndless program reading html for Nspire using the library. :angel:
Title: Re: A reador of html for Nspire
Post by: Adriweb on October 30, 2012, 12:29:15 pm
recompile webkit?
/me runs (?)
Title: Re: A reador of html for Nspire
Post by: ExtendeD on October 30, 2012, 04:16:09 pm
What about Lynx (http://en.wikipedia.org/wiki/Lynx_(web_browser)) or Links (http://en.wikipedia.org/wiki/Links_(web_browser))?
Title: Re: A reador of html for Nspire
Post by: Eeems on October 30, 2012, 04:18:22 pm
There are a lot of different command line based browsers. Most are based off of lynx or links/links2 though. They would probably work better.
Title: Re: A viewer of html for Nspire
Post by: mdr1 on October 30, 2012, 05:10:24 pm
Lynx and Links seem to work only on Windows, Mac, Linux and OS/2.
Title: Re: A viewer of html for Nspire
Post by: DJ Omnimaga on October 30, 2012, 05:16:57 pm
Aren't Linx/Links text-only? It would actually be nice to have some sort of HTML reader that supports tables or some other minor stuff that the calc can render and without taking too much space. Seems like a nice project regardless, though.
Title: Re: A viewer of html for Nspire
Post by: ExtendeD on October 30, 2012, 05:26:33 pm
Lynx and Links seem to work only on Windows, Mac, Linux and OS/2.

You probably won't find any library directly compatible with the TI-Nspire except if it is compatible with SDL, since today SDL is the only standard UI interface supported by the TI-Nspire.
But hopefully this doesn't mean adapting these libraries or text-based browser is impossible.
Title: Re: A viewer of html for Nspire
Post by: mdr1 on October 30, 2012, 05:55:55 pm
You probably won't find any library directly compatible with the TI-Nspire except if it is compatible with SDL, since today SDL is the only standard UI interface supported by the TI-Nspire.
But hopefully this doesn't mean adapting these libraries or text-based browser is impossible.
But all I demande to the library is to return an image of 320*240 pixels which I display on the screen.
Why would it need any interface ?
Title: Re: A viewer of html for Nspire
Post by: Adriweb on October 30, 2012, 08:17:25 pm
Why would you make an image out of the parsed data ??
Render directly the pase thigns would be *the* way to go, if any...



(the only good use of having an image is to actually grab a screenshot of the website you'hve wanted that got parsed by some computer :P)
Title: Re: A viewer of html for Nspire
Post by: Eeems on October 30, 2012, 08:30:35 pm
Aren't Linx/Links text-only? It would actually be nice to have some sort of HTML reader that supports tables or some other minor stuff that the calc can render and without taking too much space. Seems like a nice project regardless, though.
Links2 can work on a graphics buffer. It's core is text only though.
Title: Re: A viewer of html for Nspire
Post by: DJ Omnimaga on October 30, 2012, 08:46:24 pm
Ah that's good at least. However I meant it would be nice if it supported more than that, like the attachment below (well... maybe not THAT much lol)
Title: Re: A viewer of html for Nspire
Post by: mdr1 on October 31, 2012, 09:35:58 am
All I see for links2 is that : http://links.twibright.com/download/
Where's the source code ?  ???
(and how to use it)
Title: Re: A viewer of html for Nspire
Post by: Eeems on October 31, 2012, 11:26:57 am
Take a look on this page: http://links.twibright.com/download.php the source tarball is there
Title: Re: A viewer of html for Nspire
Post by: DJ Omnimaga on October 31, 2012, 01:39:35 pm
Is that an exe file he can instantly download without having to complile anything? I think that's what he wanted
Title: Re: A viewer of html for Nspire
Post by: Eeems on October 31, 2012, 01:49:13 pm
A source tarball is a tar file containing all the source code. This is the most basic way of delivering software on linux. People will download the source tarball, extract it, compile it and then install the compiled software. This way when it is compiled it is compiled specifically for your system.
Title: Re: A viewer of html for Nspire
Post by: DJ Omnimaga on October 31, 2012, 01:56:15 pm
Oh ok I see now, although I noticed certain Windows programs requires users to compile them prior installing/running too. Is that the same reason why or is it just due to programmers wanting to save time for releases?
Title: Re: A viewer of html for Nspire
Post by: Eeems on October 31, 2012, 02:03:36 pm
For linux, it's because no developer wants to attempt to compile their product for every single distro out there, so they release in source code tarballs and then other people maintain the repo's package by building from these sourcefiles and then packaging it up correctly for it's install system.
I don't entirely know why people release via the source on windows though, it seems kinda counter intuitive.
Title: Re: A viewer of html for Nspire
Post by: DJ Omnimaga on October 31, 2012, 02:51:57 pm
Yeah I think that's the case with TiLP. I complained a bunch of times before about it but I forgot the reason why we have to do it for Windows. It could probably be that the software is updated way too often and takes a long while to compile (remember how TASM took 5 seconds on a Pentium II to compile Hello World to 8xp format? O.O) so to save time they only compile one update out of ten or something, but beforehand I did see Windows softwares (all of which were ports of Linux ones) which absolutely had no exe download  regardless of the version. It seems Linux developers or hardcore Linux fans who make softwares for both platforms decided that since Linux users have to compile everything, then there shouldn't be special treatments for Windows users. <_<
Title: Re: A viewer of html for Nspire
Post by: ExtendeD on October 31, 2012, 04:30:39 pm
You probably won't find any library directly compatible with the TI-Nspire except if it is compatible with SDL, since today SDL is the only standard UI interface supported by the TI-Nspire.
But hopefully this doesn't mean adapting these libraries or text-based browser is impossible.
But all I demande to the library is to return an image of 320*240 pixels which I display on the screen.
Why would it need any interface ?

Then why not simply convert the page on the computer side, and view it with mViewer?
Title: Re: A viewer of html for Nspire
Post by: mdr1 on November 01, 2012, 12:23:26 pm
Take a look on this page: http://links.twibright.com/download.php the source tarball is there
Thank's, I'm trying to use the tarball. But what's the difference between gzip links-2.7.tar.gz and  bzip2 links-2.7.tar.bz2 ?

Then why not simply convert the page on the computer side, and view it with mViewer?
For several reasons :
- we could save much more text with html format than mViewer with the same place of memory
- there is the problem of scrolling with mViewer which is not comfortable at all
- we could directly html pages without having to convert them
- we could edit/create html pages/notes directly on calc
- ...
Title: Re: A viewer of html for Nspire
Post by: Eeems on November 01, 2012, 02:13:10 pm
The only difference between the gzip and the bzip is the compression they used on the source tarball. There should be no difference on the code inside it.
Title: Re: A viewer of html for Nspire
Post by: alberthrocks on November 01, 2012, 10:57:59 pm
Yeah I think that's the case with TiLP. I complained a bunch of times before about it but I forgot the reason why we have to do it for Windows. It could probably be that the software is updated way too often and takes a long while to compile (remember how TASM took 5 seconds on a Pentium II to compile Hello World to 8xp format? O.O) so to save time they only compile one update out of ten or something, but beforehand I did see Windows softwares (all of which were ports of Linux ones) which absolutely had no exe download  regardless of the version. It seems Linux developers or hardcore Linux fans who make softwares for both platforms decided that since Linux users have to compile everything, then there shouldn't be special treatments for Windows users. <_<
I'm pretty sure TiLP has binaries nowadays...

mdr1: If you want to become insane try porting GUI web browsers, take a peek at the source of Origyn Web Browser (http://www.sand-labs.org/owb.html) and NetSurf (http://www.netsurf-browser.org/about/). Both have SDL backends that, if you successfully port the guts of these browsers, can use to display the output.

Also, you're looking for a renderer. That's the "image" thing I suppose you're trying to mention. Text browsers usually are really "text-only" - you'd be using NspireIO instead of some kind of image based output. If you decide to port a real browser, you don't want an "image" - trying to get an image and then blit that on the screen is very slow, and the experience of using said browser becomes pretty terrible. Instead, the renderer will have settings for render size, zoom, etc. and you can simply give it a place to draw pixels on (the screen buffer). Or, with the above web browsers, you can just hook on the SDL backend, which Nspire has (nSDL). nSDL handles drawing and such automatically, and is probably much more preferred to "grabbing an image" (since most browsers depend on system or library drawing functions - rewriting them takes too much effort!).
Title: Re: A viewer of html for Nspire
Post by: mdr1 on November 08, 2012, 03:46:42 pm
Well, I think it's too hard for me, I don't use to do adaptations of programs.
So I'm creating my own viewer of text whose syntax will look like html's syntax.
When I'll have a first version of my program, I'll probably create a new subject. :)
Title: Re: A viewer of html for Nspire
Post by: DJ Omnimaga on November 08, 2012, 11:24:43 pm
Yeah I think that's the case with TiLP. I complained a bunch of times before about it but I forgot the reason why we have to do it for Windows. It could probably be that the software is updated way too often and takes a long while to compile (remember how TASM took 5 seconds on a Pentium II to compile Hello World to 8xp format? O.O) so to save time they only compile one update out of ten or something, but beforehand I did see Windows softwares (all of which were ports of Linux ones) which absolutely had no exe download  regardless of the version. It seems Linux developers or hardcore Linux fans who make softwares for both platforms decided that since Linux users have to compile everything, then there shouldn't be special treatments for Windows users. <_<
I'm pretty sure TiLP has binaries nowadays...

mdr1: If you want to become insane try porting GUI web browsers, take a peek at the source of Origyn Web Browser (http://www.sand-labs.org/owb.html) and NetSurf (http://www.netsurf-browser.org/about/). Both have SDL backends that, if you successfully port the guts of these browsers, can use to display the output.

Also, you're looking for a renderer. That's the "image" thing I suppose you're trying to mention. Text browsers usually are really "text-only" - you'd be using NspireIO instead of some kind of image based output. If you decide to port a real browser, you don't want an "image" - trying to get an image and then blit that on the screen is very slow, and the experience of using said browser becomes pretty terrible. Instead, the renderer will have settings for render size, zoom, etc. and you can simply give it a place to draw pixels on (the screen buffer). Or, with the above web browsers, you can just hook on the SDL backend, which Nspire has (nSDL). nSDL handles drawing and such automatically, and is probably much more preferred to "grabbing an image" (since most browsers depend on system or library drawing functions - rewriting them takes too much effort!).

Yeah I meant back when TiLP got revived. It used to have no binary.

Well, I think it's too hard for me, I don't use to do adaptations of programs.
So I'm creating my own viewer of text whose syntax will look like html's syntax.
When I'll have a first version of my program, I'll probably create a new subject. :)
Sorry to hear, but I understand. Good luck!
Title: Re: A viewer of html for Nspire
Post by: Lionel Debroux on November 09, 2012, 01:49:51 am
Before I started providing beta-testing Windows builds of TILP, there were Windows builds of TILP for each release :)

mdr1: if you, or anyone else, is aiming at a formatted text viewer for the Nspire platform, I think you want to study the format defined by txtrider, slightly expanded by on-calc Hib-View, uView and computer-based WordRider. It represents the de-facto standard for formatted texts on the TI-68k series, thousands of publicly available documents use that format. It's a markup language inspired by HTML, but even much more compact.