Sign up here and you can log into the forum!

ELinks text console based web browser UPDATED 3-25-2014

Here is the place to inquire about app.bins--Only currently available apps for sigma 8655 based wdtv's belong in this forum. requests go in 'Application Questions'

ELinks text console based web browser UPDATED 3-25-2014   

Postby petermg » Mon Mar 17, 2014 7:23 am

"ELinks - Full-Featured Text WWW Browser"
VERSION 0.13.GIT
Elinks homepage is here:
http://elinks.or.cz/

EXT3 VERSION!!! (writable!) :D
https://app.box.com/s/jzaqzz90njeygu32cg4v
This ext3 app.bin version is probably the BETTER route to go as it saves it's config to /apps/elinks/conf instead of /conf. Also it contains the README file which I forgot to create for the one below. I'll leave it to you mad_ady or whomever else might upload this to the svn as to which one you think should be on there. This app.bin is over 3 times larger than the cramfs version, I'm suspecting cramfs must be a compressed file system (noob comment :oops: )?? Here is a list of some of the files ELinks writes to it's conf dir after just some brief browsing I did:
Code: Select all
-rw-------    1 root     root            0 Mar 25 21:01 bookmarks
-rw-------    1 root     root         2145 Mar 25 21:35 cookies
-rw-------    1 root     root         2920 Mar 25 21:31 elinks.conf
-rw-------    1 root     root         2832 Mar 25 21:37 globhist
-rw-------    1 root     root           75 Mar 25 21:32 gotohist
-rw-------    1 root     root           18 Mar 25 21:37 searchhist
srw-------    1 root     root            0 Mar 25 21:22 socket0

So I would venture to say it may be a _VERY_ bad thing for this to keep writing to the /conf file of the WDLXTV. I'm using the EXT3 version.

Download app.bin here:
https://app.box.com/s/wqksci5plhms7mm6ekjf

if you want this app to save any bookmarks you make or any configurations run the "runme" script I created in /apps/elinks/bin instead of running the "elinks" binary directly. It will run elinks pointing it's config directory to /conf. I was unsuccessful in figuring out how to hardcode it's config directory directly into the binary to point to /conf. But alas there is a simple switch for doing this which is all that the "runme" script is ;)

UPDATED 3-25-2014
Ok, compiled with javascript support via Spidermonkey, which afaik is the only option for js. To enable it, go to Setup, Options manager, +ECMAScript, select ENABLE, then Edit and change 0 to 1. Then save and close the Options manager. Not sure if restarting ELinks is required or not. Please note that even though this has javascript support, it's limited. According to their site http://elinks.or.cz/documentation/manual.html regarding javascript support
"There isn't anything we could call complete, but some bits could help with the most common ECMAScript usage cases"
Here is a feature.log, check it :)
I updated the download link. Took me quite some time but I think I learned a few things ;)

Code: Select all
Feature summary:
Documentation Tools ............. AsciiDoc, Pod2HTML
Manual Formats .................. HTML (one file)
Man Page Formats ................ HTML
API Documentation ............... no
gpm ............................. yes
zlib ............................ yes
bzlib ........................... yes
idn ............................. yes
lzma ............................ yes
Bookmarks ....................... yes
XBEL bookmarks .................. yes
ECMAScript (JavaScript) ......... SpiderMonkey document scripting
Browser scripting ............... Perl, Ruby, SpiderMonkey
SSL ............................. OpenSSL
Native Language Support ......... yes
Cookies ......................... yes
Form history .................... yes
Global history .................. yes
Mailcap ......................... yes
Mimetypes files ................. yes
IPv6 ............................ yes
BitTorrent protocol ............. no
Data protocol ................... yes
URI rewriting ................... yes
Local CGI ....................... yes
Finger protocol ................. no
FSP protocol .................... yes
FTP protocol .................... yes
Gopher protocol ................. no
NNTP protocol ................... yes
Samba protocol .................. yes
Mouse handling .................. yes
BSD sysmouse .................... no
88 colors ....................... yes
256 colors ...................... yes
true color ...................... no
Exmode interface ................ no
LEDs ............................ yes
Marks ........................... yes
Cascading Style Sheets .......... yes
HTML highlighting ............... yes
DOM engine ...................... HTML highlighting
Backtrace ....................... no
No root exec .................... no
Debug mode ...................... no
Fast mode ....................... no
Own libc stubs .................. no
Small binary .................... no
UTF-8 ........................... yes
Combining characters ............ no
Regexp searching ................ TRE
System configuration directory .. /home/APPS/ELINKS/etc/elinks
Locale catalogs directory ....... /home/APPS/ELINKS/share/locale
Compiler flags (CFLAGS) .........  -g -O2 -Wall -fno-strict-aliasing -Wno-pointer-sign -Wno-address -fno-strict-overflow
Preprocessor flags (CPPFLAGS) ...
Linker flags (LDFLAGS) .......... -rdynamic
Library flags (LIBS) ............ -ltre   -lssl -lcrypto -Wl,-E  -L/usr/local/lib  -L/usr/lib/perl/5.10/CORE -lperl -ldl -lm -lpthread -lc -lcrypt -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -ldl  -lgpm -lz -lbz2 -lidn -llzma -lexpat -L/usr/local/lib -lmozjs185 -lplds4 -lplc4 -lnspr4   -lruby1.8 -lpthread -lrt -ldl -lcrypt -lm    -lfsplib -lsmbclient


Oh and mad_ady I LITERALLY took your suggestion about the wrapper. In the bin folder is "elinks" which contains:
Code: Select all
#!/bin/sh
./elinks.real -config-dir /conf $@

now the ext3 version contains:
Code: Select all
#!/bin/sh
./elinks.real -config-dir /apps/elinks/conf $@

then "elinks.real" ;) Thanks for that!
Oh and I don't know how big the config file will get.... hopefully no hard resets (since the script saves the config in /conf) heh ;) Maybe if it's a possible issue the script can be replaced with one that saves the config file to a local usb drive or network share? NOTE: This is not an issue using the ext3 app.bin version.

Also the download directory is configurable. Just go to +Document +Downloading from the Options manager in the Setup menu. By default it tries to download files to "./" which of course isn't writable in this case.

mad_ady wrote:Bonus points: Create a special variable in /conf/config (ELINKS_CONFIG) that can point to an arbitrary location. It can default to /conf if not set. The point is for the user to be able to point configuration to where it's convenient, in case they want to save a lot of data there.

I don't know how to do this.... yet ;)
I did not enable bittorrent support because the documentation says it's experimental but it also said that it can pass it along to another app, maybe that would be useful for the bittorrent daemon? Maybe I'll mess around with that and see if it's something I should enable and release an update...

One feature I think is cool with this text browser is that you can use your mouse to click on links and select text boxes, at least I can on Putty.
Last edited by petermg on Tue Mar 25, 2014 8:41 pm, edited 15 times in total.
petermg
WDTVer
 
Posts: 41
Joined: Sat Jun 04, 2011 6:17 pm

Re: ELinks text console based web browser   

Postby mad_ady » Tue Mar 18, 2014 1:07 am

Before I submit this to svn, here's an idea: Instead of naming your script runme (which will get pulled into the default path), why don't you make a thin wrapper for elinks? What I mean is - name your script elinks and inside it call elinks.real (rename the elinks binary) and pass it all arguments ($@ I think). Something like this:
Code: Select all
#!/bin/sh
elinks.real --switch-for-config-path $@

This way, you can still call elinks as normal, pass whatever parameters you want, and have the config path set.

Bonus points: Create a special variable in /conf/config (ELINKS_CONFIG) that can point to an arbitrary location. It can default to /conf if not set. The point is for the user to be able to point configuration to where it's convenient, in case they want to save a lot of data there.

Bonus Bonus points: Can you try to add javascript support to it? http://elinks.or.cz/documentation/manual.html#ecmascript
It might help with scraping some files from sites which use javascript (unlikely, but worth a shot if you can compile it).

Question - where does it try to save any downloads to? The current directory? The configuration directory? It may be useful to know to prevent clobbering /conf.
User avatar
mad_ady
Developer
 
Posts: 4525
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: ELinks text console based web browser   

Postby KAD » Tue Mar 18, 2014 8:10 am

yeah downloading to /conf would be bad

once space limit is reached, device hard resets EVERYTHING

I foget the size of /conf but it's pretty small, something like 80MB or maybe it was 90MB
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: ELinks text console based web browser   

Postby petermg » Tue Mar 18, 2014 8:52 am

mad_ady wrote:Before I submit this to svn, here's an idea: Instead of naming your script runme (which will get pulled into the default path), why don't you make a thin wrapper for elinks? What I mean is - name your script elinks and inside it call elinks.real (rename the elinks binary) and pass it all arguments ($@ I think). Something like this:
Code: Select all
#!/bin/sh
elinks.real --switch-for-config-path $@

This way, you can still call elinks as normal, pass whatever parameters you want, and have the config path set.

Bonus points: Create a special variable in /conf/config (ELINKS_CONFIG) that can point to an arbitrary location. It can default to /conf if not set. The point is for the user to be able to point configuration to where it's convenient, in case they want to save a lot of data there.

Bonus Bonus points: Can you try to add javascript support to it? http://elinks.or.cz/documentation/manual.html#ecmascript
It might help with scraping some files from sites which use javascript (unlikely, but worth a shot if you can compile it).

Question - where does it try to save any downloads to? The current directory? The configuration directory? It may be useful to know to prevent clobbering /conf.


I'll see if I can compile with js support and also see what dir it saves to and also try your script suggestion and then I'll post back with my results :)
petermg
WDTVer
 
Posts: 41
Joined: Sat Jun 04, 2011 6:17 pm

Re: ELinks text console based web browser   

Postby mad_ady » Wed Mar 19, 2014 2:00 am

KAD wrote:yeah downloading to /conf would be bad

once space limit is reached, device hard resets EVERYTHING

I foget the size of /conf but it's pretty small, something like 80MB or maybe it was 90MB



No, no no... you're three order of magnitude off. It occupies 2 NAND blocks - so 128KB, but some of the space is the minix overhead, so I figured depending on how many files you have you realistically have less than 100KB usable.
So, you shouldn't be storing volatile information there - like cookies, downloads, etc. I recommend storing stuff under /tmp/. It has about 90MB of ramdrive. Or, better yet, a user-configurable path (ELINKS_DIR?).
User avatar
mad_ady
Developer
 
Posts: 4525
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: ELinks text console based web browser   

Postby petermg » Wed Mar 19, 2014 6:06 am

mad_ady wrote:
KAD wrote:yeah downloading to /conf would be bad

once space limit is reached, device hard resets EVERYTHING

I foget the size of /conf but it's pretty small, something like 80MB or maybe it was 90MB



No, no no... you're three order of magnitude off. It occupies 2 NAND blocks - so 128KB, but some of the space is the minix overhead, so I figured depending on how many files you have you realistically have less than 100KB usable.
So, you shouldn't be storing volatile information there - like cookies, downloads, etc. I recommend storing stuff under /tmp/. It has about 90MB of ramdrive. Or, better yet, a user-configurable path (ELINKS_DIR?).


As it turns out the download path is user configurable. By default it wants to download to your home dir, which of course isn't writable in this case. However I'm trying to get it to compile with js support and I'm running into a few issues one of which is I'm running out of space again on my squeeze image file so I'll have to enlarge it yet again but I'll not have time until tonight to do that and continue my efforts. Looking forward to it though! :)
petermg
WDTVer
 
Posts: 41
Joined: Sat Jun 04, 2011 6:17 pm

Re: ELinks text console based web browser   

Postby mad_ady » Wed Mar 19, 2014 6:11 am

It's a great learning experience! Out of curiosity, how large is your squeeze image?
User avatar
mad_ady
Developer
 
Posts: 4525
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: ELinks text console based web browser   

Postby petermg » Wed Mar 19, 2014 6:56 am

mad_ady wrote:It's a great learning experience! Out of curiosity, how large is your squeeze image?


As of right now it's 1.3GB. I have around 80-90 megs free. I sure used up that extra 500 megs I gave it rather quickly! ;)
petermg
WDTVer
 
Posts: 41
Joined: Sat Jun 04, 2011 6:17 pm

Re: ELinks text console based web browser   

Postby mad_ady » Wed Mar 19, 2014 7:01 am

I moved my image on a NFS share and made it 4G... :)
User avatar
mad_ady
Developer
 
Posts: 4525
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: ELinks text console based web browser   

Postby petermg » Wed Mar 19, 2014 7:33 am

mad_ady wrote:I moved my image on a NFS share and made it 4G... :)


Nice. Wonder if I can do that with an smb share on my Windows 7 machine.... Maybe I'll give that a try.
petermg
WDTVer
 
Posts: 41
Joined: Sat Jun 04, 2011 6:17 pm

Next

Return to WDLXTV-G2 & WDLXTV-Live/Plus app.bins

Who is online

Users browsing this forum: No registered users and 3 guests