webOS Nation Forums >  webOS Developers >  webOS Development > webOS Intelligent News Reader - "wInNeR"
webOS Intelligent News Reader - "wInNeR"
  Reply
Like Tree35Likes

 
Thread Tools Display Modes
Old 01/08/2013, 08:59 AM   #1 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 475
Hi all,
just want to share my new project idea. I'm very disappointed that my carrier data quota is almost every month filled in the middle of the month. The main reason is my every day news reading while going to work and back to home. Standard webOS browser is good enough to read the news, but the cache management isn't sufficient, if I'm going to the previous page, some data are refreshed.
RSS or other technologies doesnīt meet my requirements, because my favorite discussions under each article are omitted or forwarded to standard browser.
I really miss something like Opera mini, where my needs are covered by only 15Mbytes per month.
Thus, I decided to write some very simple browser designed for mobile news.

Main objectives:
  • - to gain more Enyo skills (for future openWebOS apps) - in progress, switching to Enyo 2
  • - reduce data transfer as possible (mobile proxy, image compression) - done using google proxy
  • - ability to cache everything (stored in database, only manual refresh on again-visited pages) - partially
  • - should work on webOS phone - done
  • - user adjustable font size, same size for portrait and landscape - done

Issues:
The common Enyo issue is, that webview widget doesnīt work on phones at all... sadly, no way there for me.
No free online image compression tool

How to do it?

Proof of concept:

To set an simple Enyo kind with html content (as string) and show it. The html content is ajax response to GET from google mobile proxy (mobile optimized page with image compression). Then, I can parse the html string response, removed some strings, tags, connected the pages generated from google to one page again, etc... I had to write some functions to get the links to work and images to show... but well.

Results:

I have a first proof of concept application, where I can read the news with minimized data transfer and the same font size in both orientations! Able to read mobile or non-mobile optimized pages. Forget the horrible UI please ... it is in early stage, one day old app and I named it "wInNeR"

ToDo:

It is designed for my needs.... if someone like the app, the idea, I can share it for testing, whenit will be more stable.
Attached Images
File Type: png alpha.PNG (92.4 KB, 112 views) Email Attachment
File Type: png alpha2.PNG (107.6 KB, 68 views) Email Attachment
__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development

Last edited by 72ka; 01/09/2013 at 07:33 AM.
72ka is offline   Reply With Quote
Liked by GreenHex, Rnp, renater and 6 others like this.
Old 01/08/2013, 09:18 AM   #2 (permalink)
Member
 
geekpeter's Avatar
 
Posts: 3,677
nice, i wonder if you can mimick the Zite app, which i believe also strips news from multiple sources then reformats it to its own look/theme/feel, only their not worried about data useage.

It's a good idea tho. would be nice to have the next best thing to opera.

Considering how integrated our stock browser is, its a shame there cant be a toggle switch for the normal browsers/webkit to act normal or in your new method, theres the isis code out there to mess with as well for open webOS, maybe you could just abuse the normal browser to do as you wish and repackage it.
__________________
Touchpad Keyboard Themes - >> Click Me <<
geekpeter is offline   Reply With Quote
Old 01/08/2013, 09:37 AM   #3 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 475
Yes, I know Zite, but I have not a TouchPad... For pure webOS phone users doesn't exist similar app... Now I'm sitting in a bus and reading news in my new app for the first time, funny

-- Sent from my Palm Pre3 using Forums
__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development
72ka is offline   Reply With Quote
Old 01/08/2013, 10:32 AM   #4 (permalink)
Member
 
Posts: 88
I really like this concept. It would be good to achieve minimum data usage and anything you learn in the process is of value since a good browser is still missing for webos. If by any chance you can achieve an increase in performance/speed then it's even better. I'll keep my eye out for this one. It's good to have aboard 72ka.
kkalogia is offline   Reply With Quote
Old 01/08/2013, 10:49 AM   #5 (permalink)
Member
 
geekpeter's Avatar
 
Posts: 3,677
Quote:
Originally Posted by 72ka View Post
Yes, I know Zite, but I have not a TouchPad... For pure webOS phone users doesn't exist similar app... Now I'm sitting in a bus and reading news in my new app for the first time, funny

-- Sent from my Palm Pre3 using Forums
yeah i think the only reader i have for the pre3 is the bbc app, would be nice to have more like this.
__________________
Touchpad Keyboard Themes - >> Click Me <<
geekpeter is offline   Reply With Quote
Old 01/08/2013, 10:12 PM   #6 (permalink)
Member
 
Posts: 30
haha nice job...I just started a similar project too - but instead I'm consuming news feeds from newsblur. Its 100% catered to my requirements, and I use it for pretty much all of my news these days

I like the idea of focusing on feed comments - this in itself is a great problem to solve. Scraping google mobile is a clever idea too. Thankfully for me newsblur feeds are mostly pre-scrubbed html.

best of luck on the app!
PrplHaz4 is offline   Reply With Quote
Old 01/09/2013, 07:00 AM   #7 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 475
Hi, I added more inteligence to the app - forward and backward button - pages are in cache, super fast switching, the every page store the scroller position, and finally, the easy accesible buttons for text size change on the fly.

Try it... but be careful, it is very early and contains many dirty code

At this time... I stopped it in Enyo 1 and trying to port to Enyo 2, partially is done, but it is very limited on webOS phone, but I hope it could be usable and then possible to run in openWebOS.

Just download here: http://www.volny.cz/hp2/webos/winner..._0.0.1_all.ipk
__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development

Last edited by 72ka; 01/09/2013 at 07:18 AM.
72ka is offline   Reply With Quote
Liked by Rnp and Proximity like this.
Thanked by Proximity, Rnp
Old 01/09/2013, 08:07 AM   #8 (permalink)
Member
 
jcmarcos's Avatar
 
Posts: 877
Very, very clever! It's amazing that these kind of "compression" services, such as Google's, still exist freely - They are not easy to make or maintain! I'll find time to check your new app soon!

Quote:
Originally Posted by 72ka
I have not a TouchPad
Sure, that's why you are building your own webOS tablet, we know...
__________________
Pre 3 on GSM Jazztel: UberKernel, Muffle logging & friends, Mode Switcher, Advanced System Menus & Prefs, and then some more.

Proudly choosing the loser side since 1982: Commodore VIC-20, C-64, Amiga 1000 & 3000, bPlan Pegasos & MorphOS, Psion Revo, Palm Pre...

Last edited by jcmarcos; 01/09/2013 at 08:13 AM.
jcmarcos is offline   Reply With Quote
Liked by Rnp and geekpeter like this.
Old 01/09/2013, 08:28 AM   #9 (permalink)
Member
 
Posts: 24
So far I like the app, it's clean and works very fast.
It works on all the major italian news sites but not La Repubblica.it - Homepage, it doesn't load anything at all.
bigdoby is offline   Reply With Quote
Old 01/09/2013, 02:30 PM   #10 (permalink)
Member
 
Posts: 88
Just downloaded and played around with it a bit. It works really great and is very fast. Clean and simple. I also loved the fact that it automatically rearranges the pages according to the zoom level. Great reader. Adding gestures and more functionality such as read it later or such will make it even better.

So my understanding is that it just strips away all the unnnecessary stuff such as pictures, banners etc and keeps the text of the article so that it consumes less data. Would you mind explaining a bit in more detail how the whole procees works, preferably in layman's (and why not in developers') terms.

Great job, will definitely keep an eye out for this one.
kkalogia is offline   Reply With Quote
Old 01/10/2013, 01:14 AM   #11 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 475
Quote:
Originally Posted by kkalogia View Post
Would you mind explaining a bit in more detail how the whole procees works, preferably in layman's (and why not in developers') terms.
OK, need to say, it is not a webview widget. Because webOS is about web, the base of the app is simple space inside scroller, where is rendered HTML as string. The big advantage of this solution is that I can set the font size, etc.., what webview or browser canīt. The disadvantage is that I have to parse the HTML code manually and manually handle the click events.

OK, how it works in steps:

1) using enyo webservice (AJAX request), I just send something like http://www.google.com/gwt/x?u=myurl, where myurl is url from textfield
2) received response as pure HTML code, without scripts etc...
3) using regular expression removed blue google banners from HTML code
4) check if it is multi-page, then load every page, process it and join at the end of previous HTML
5) now i have whole page as HTML string without banners and multiple page navigation
6) render it to scroller and store the scroller position, save the html to an variable

If Iīm browsing back or forward, it is just displayed previous HTML code from variable, OFFLINE, images are stored in browser cache for this time. I plan to store them to database for later use. The most complicated are point 3 and 4, because I have only HTML as string, no DOM elements...

Using this principle, the images are compressed online to around 50% and more, the code is in a few kB without scripts and styles, no need to read again while going back, the data requirements are so much lower, thus very fast on mobile connection.
__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development
72ka is offline   Reply With Quote
Liked by Rnp, Proximity, jcmarcos and 2 others like this.
Old 01/10/2013, 01:22 AM   #12 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 475
Hi, as I sad.. yesterday i tried to port it to Enyo 2. I was succesfull, sometimes made me angry, but it works, on my Pre3 too - is there any other app in Enyo 2 for webOS phones??

Enyo 2 port:

advantages: actual framework, multiplatform, modern, it have scrollbar in scroller
disadvantages: not designed for webOS, canīt handle webOS phone events (orientation change), etc....

The question is... which way??? Enyo 1 or Enyo 2?

I decided to continue in Enyo2, because of openWebOS and multiplatform availability. Iīll see the next issues... but is a challenge

And is very nice to see Enyo 2 app on my Pre3... some piece of the newest code is neat

You can see it in screenshot, forget UI... it is only working preview.
Attached Images
File Type: png enyo2.PNG (88.5 KB, 41 views) Email Attachment
__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development
72ka is offline   Reply With Quote
Liked by Rnp, jcmarcos and T-Pad like this.
Thanked by jcmarcos, Rnp, T-Pad
Old 01/10/2013, 01:24 AM   #13 (permalink)
Member
 
jcmarcos's Avatar
 
Posts: 877
Quote:
Originally Posted by 72ka View Post
The disadvantage is that I have to parse the HTML code manually and manually handle the click events.
Wow! Does webOS provide any helper functions for this nightmare?

Quote:
is there any other app in Enyo 2 for webOS phones?
I don't think so! Jan is here with yet another world premiere!

Quote:
not designed for webOS
Please ellaborate?

Quote:
canīt handle webOS phone events (orientation change), etc
So there's still a lot missing in Enyo 2. How can it be that it's been released to the public, while at the same time is missing things that the old Mojo has had for ages?
__________________
Pre 3 on GSM Jazztel: UberKernel, Muffle logging & friends, Mode Switcher, Advanced System Menus & Prefs, and then some more.

Proudly choosing the loser side since 1982: Commodore VIC-20, C-64, Amiga 1000 & 3000, bPlan Pegasos & MorphOS, Psion Revo, Palm Pre...
jcmarcos is offline   Reply With Quote
Old 01/10/2013, 04:15 AM   #14 (permalink)
Homebrew Developer

 
Posts: 2,234
Quote:
Originally Posted by 72ka View Post
Hi, as I sad.. yesterday i tried to port it to Enyo 2. I was succesfull, sometimes made me angry, but it works, on my Pre3 too - is there any other app in Enyo 2 for webOS phones??

Enyo 2 port:

advantages: actual framework, multiplatform, modern, it have scrollbar in scroller
disadvantages: not designed for webOS, canīt handle webOS phone events (orientation change), etc....

The question is... which way??? Enyo 1 or Enyo 2?

I decided to continue in Enyo2, because of openWebOS and multiplatform availability. Iīll see the next issues... but is a challenge

And is very nice to see Enyo 2 app on my Pre3... some piece of the newest code is neat

You can see it in screenshot, forget UI... it is only working preview.
Hi Jan,

Great work as always! Will you put this on Github again too?

For rotation and other API stuff you might want to look into using Enyo2 in combination with PhoneGap/Cordova. It should allow you to get the rotation etc working

See The Open webOS Project Blog for some guidance on this

Any chance you'll port your Google Maps to Enyo2 sometime too? I believe most of your code would be re-usable anyway, since Enyo2 is mainly the layout stuff
Herrie is offline   Reply With Quote
Liked by jcmarcos likes this.
Old 01/10/2013, 06:51 PM   #15 (permalink)
Member
 
Posts: 223
This is a great app, tried a few site, works well, like how it opens up new heading into article , and then press back arrow takes you back to the list at exact same spot.

It need to be able to bookmark your favourite sites, maybe show them on home page.
can you add half swip gesture for forward and back arrows.
Firepower is offline   Reply With Quote
Old 01/12/2013, 09:29 AM   #16 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 475
Quote:
Originally Posted by Herrie View Post
Hi Jan,

Great work as always! Will you put this on Github again too?

For rotation and other API stuff you might want to look into using Enyo2 in combination with PhoneGap/Cordova. It should allow you to get the rotation etc working

See The Open webOS Project Blog for some guidance on this

Any chance you'll port your Google Maps to Enyo2 sometime too? I believe most of your code would be re-usable anyway, since Enyo2 is mainly the layout stuff
Hi, thanks, it really helped me. At this time orientation change now works, backswipe too and other webos features using webos compatibility libs.

My wInNeR Enyo 2 port is almost done, fixed all the UI issues. I have troubles with ajax calls, where request are always doubled, with the same response handler as in Enyo 1 version...
As i said in google maps thread, wInNeR Enyo 2 works on all my accesible platforms - webOS 1.x, 2.x, 3.x, Debian Linux, Windows XP, Android 4.0 as well and this makes me happy!
Thus, I really consider to port my Google maps to Enyo 2, because if it can work on all webOS phones, it meets the main objectives (using webos compatibility libs I can acces the Mojo funbctions and magic). I can be active again in phoenix map apps where I was at begining or just start a new fork focused to webOS and openwebOS. I'll see, but the next checkpoint is still to release stable google maps Mojo release with the new smooth map moving...

Sent from ICOO D70GT tablet
__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development
72ka is offline   Reply With Quote
Liked by Rnp, jcmarcos and geekpeter like this.
Thanked by jcmarcos, Rnp
Old 01/12/2013, 10:45 AM   #17 (permalink)
pivotCE Developer
 
Posts: 2,090
As phones SYM-keys do not work in any ENYO apps and we have a simple hack solution for ENYO1, could you perhaps check the code for ENYO2? It is 90% working just the textfield filling fails:
symenyo.js is there and just needs to be linked in index.html


[2013-01-12 16:22:00] (LunaSysMgr) user.crit: org.webosports.app.memos: Uncaught ReferenceError: Mojo is not defined, :1

I'm sure Jan you can fix this

- [Patch request]enable SYM key in enyo on webOS <3.x

[Update] pcworld already made a version for enyo2 so now you can use it directly in your new enyo based apps

Last edited by gizmo21; 01/12/2013 at 02:01 PM.
gizmo21 is offline   Reply With Quote
Old 01/12/2013, 12:27 PM   #18 (permalink)
pivotCE Developer
 
Posts: 2,090
opps i just saw the download version 001 still in enyo1. So the SYM works with the symenyo.js
No need for sym in this app exactly but will be for maps...

gizmo21 is offline   Reply With Quote
Old 01/16/2013, 06:05 AM   #19 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 475
Hi, against all strange issues I finally completed the first Enyo 2 version of this app.

Just to write some findings about Enyo 2 on phones:
- the AJAX call was doubled, because the call is fired on onchange event. It tooks me two days to find, that the onchange event is fired too on lose or blur focus and If I press enter on field and it loses focus, the event was fired two times.... this behavior is not in Mojo or Enyo 1
- the layout is the same, but withou Flexbox in Enyo 1 is a quite hard/different to do the same

New features of this Enyo 2 port:
- just type to write and URL and Enter to Go
- the URL field contains and clicked link name - usually an article name
- if you focus the URL filed, you can select the URL of the site

AND the best feature, what I always wanted is, if I click the link (usually article name), then in the new page (article page) is looking for the same article name, and if it is found, the scroller automatically scroll to the article. Very usefull if you are browsing some very long page (long header) and each new page contains the same header...

Known issues:
- the scroller performance in Enyo 2 with enyo-unselecatble class is very poor, but with default enyo-selectable class is very annoying that the text is always selected when you touch the scroller


Just try it from here:
DOWNLOAD: http://www.volny.cz/hp2/webos/winner..._0.0.2_all.ipk

I think that the next version could be ready for submit to Preware

__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development

Last edited by 72ka; 01/16/2013 at 12:32 PM.
72ka is offline   Reply With Quote
Liked by Rnp likes this.
Thanked By: Rnp
Old 01/16/2013, 09:30 AM   #20 (permalink)
Member
 
kevets's Avatar
 
Posts: 570
Very nice! Tried it out on a couple of sites and it definitely does a fine job stripping the site down to the content. Keep up the good work! Being able to bookmark sites for quick access would be a nice plus. Heck, it'd be great to have a contextual link patched into the web browser so if I come across a link to a story I want to read in your app it can launch it straight into it. Just coming up with ideas.

Also want to thank you for the superb Google Maps app. I don't know how you do it, but on the Pre3 with GPS turned on, it's pretty darn accurate! I love it.
__________________
White Z10, Touchpad 16GB [Retired: Pre 3, Pre 2, Pixi Plus, Pre Plus]
Back on a BlackBerry after 2 1/2 years with WebOS.

One-step Picasa batch image upload: http://forums.webosnation.com/hp-tou...ecl-webos.html
kevets is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0