Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Dublin Bus Timetable on Series 60 Phone Browser...

Options
  • 10-07-2005 10:59pm
    #1
    Registered Users Posts: 1,399 ✭✭✭


    Hi everyone.

    Has anyone ever considered figuring out a way to store bus / rail times on their phones? I began on a noble expedition to write a JAVA ME app for my Sagem My-v55, but I got fed up with all the screwing around...

    I've tried saving the pages from www.dublinbus.ie, stripping the Monday to Friday, Saturday and Sunday columns using Excel, pasting them to Dreamweaver one after the other (thus narrowing the columns for the phones resolution) and copying them across, but they don't retain the formatting in any readable level.

    Essentially, what I'd like is some way to convert HTML pages to either (a) PRC format (eBooks, eNews, etc.) or else, (b) to an alternate form of HTML which is readable on my Nokia 6680's display (176 x 86 or something, can't remember!).

    Very arduous and complicated, I know. Has anyone else done something similar? I'd just rather not pay 30c for Bus Text all the time. And yes, I *know* I could just carry around a timetable with me. But it'd be interesting to get it on the phone! :-)

    Cheers,
    Seán


Comments

  • Registered Users Posts: 2,243 ✭✭✭zoro


    doesnt sound like an all that complicated problem

    get a simple j2me app that downloads web pages or throw one together yourself (20/30 mins if you have experience) - then have a look at the source on a pc and determine exactly what needs to be kept and what need to be stripped.

    At a glance, the header, footer, sidebars, and all images are unneccessary.
    All you need is the bulk of the text in the center of that large table which contains the actual times.

    Once you can figure out how to strip that out (write a simple java app on a pc to test it until you have the write output given an input) you can port it to j2me in a few minutes.

    In theory it sounds relatively simple, but I can imagine that it could be tricky to strip that info from the site. That said, I know someone who did something similar related to cinema times, so it's not THAT difficult.


  • Registered Users Posts: 6,173 ✭✭✭1huge1


    ok im gonna go with something way easier with what you guys are going on about

    just copy the text from dublinbus.ie and send it to your series 60 phone via bluetooth and there ya go


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Screenscrape the basic timetable data from an available source and then output it as WML (WAP).


  • Registered Users Posts: 2,243 ✭✭✭zoro


    i thought that the whole point of this was the challenge faced :)


  • Closed Accounts Posts: 1,502 ✭✭✭MrPinK


    zoro wrote:
    In theory it sounds relatively simple, but I can imagine that it could be tricky to strip that info from the site. That said, I know someone who did something similar related to cinema times, so it's not THAT difficult.
    A parser would be would a whole lot easier to write if they stuck with the same format for the different routes. Opening up 3 different pages at random I managed to get 3 different formats. Manually extracting the info might be quicker.

    It's a nice idea tho. An app would be nicer than just saving the pages, as you could search the whole timetable by locations. I would have chipped in with some code had the website format been more standardised.


  • Advertisement
  • Registered Users Posts: 1,399 ✭✭✭WetDaddy


    Thanks for all the replies, guys.

    Someone mentioned just grabbing the HTML and WML-ising it: It's not really that simple! The tables are so wide that they wouldn't fit in readable columns (i.e. Mon-Fri and Saturday's times are all messed up).

    That's really the most hassle, as MrPink mentioned: The whole site ain't really standardised. And an app is really what I'm aiming for. It'd be nice to enter a time and a route (I'd probably just start with 1 or 2 routes) and have it pull back the nearest details ala Bus Text.

    So, what's the best way to approach programming an app for a Series 60 phone? I'm kinda out of the loop: Is Java2ME still decent enough way to go about doing something this simple? Anyone have any experience in it? Is there a database-ish-y type standard?


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    deathfunk wrote:
    Someone mentioned just grabbing the HTML and WML-ising it: It's not really that simple! The tables are so wide that they wouldn't fit in readable columns (i.e. Mon-Fri and Saturday's times are all messed up).
    You wouldn’t really try to recreate the tables per say, most likely present the user with a (pre-filled) form that would allow them to select a subset of the data (e.g. 46A on Sundays from 1800 to 1930).
    That's really the most hassle, as MrPink mentioned: The whole site ain't really standardised.
    Looking at it now, it would be a nightmare (but not impossible) to screen scrape. Easier to scrape, clean up and then mirror the data in a standardized format.
    And an app is really what I'm aiming for. It'd be nice to enter a time and a route (I'd probably just start with 1 or 2 routes) and have it pull back the nearest details ala Bus Text.
    As I suggested you can do that with WML. You’ve actually more flexibility in your interface in WML than you have in J2ME.
    So, what's the best way to approach programming an app for a Series 60 phone? I'm kinda out of the loop: Is Java2ME still decent enough way to go about doing something this simple? Anyone have any experience in it? Is there a database-ish-y type standard?
    J2ME with the data held as persistently (text file) perhaps. You could also give the option for updates over HTTP (which you would most likely have to host/update yourself). A native Series 60 app in C++ is another option.


  • Registered Users Posts: 6,511 ✭✭✭daymobrew


    MrPinK wrote:
    A parser would be would a whole lot easier to write if they stuck with the same format for the different routes. Opening up 3 different pages at random I managed to get 3 different formats. Manually extracting the info might be quicker.

    It's a nice idea tho. An app would be nicer than just saving the pages, as you could search the whole timetable by locations. I would have chipped in with some code had the website format been more standardised.
    I've tried many times to write a parser but I keep giving up because they have no standard format.

    I have written an app for Palm, PocketPC and Windows to display Dublin Bus timetables (see my sig).
    I am trying to find time to port it to Java (and then to Java ME) but not having much luck. Most of the core of the Java version is written (reading, parsing, displaying data) but having a few issues with the GUI layout.

    At the website for the app you can generate a custom timetable (Palm PRC format or a basic text file) with only the routes you need.
    I have 88 routes available. If you need one I don't have just let me know.


  • Registered Users Posts: 1,399 ✭✭✭WetDaddy


    Daymo, that's one of the coolest things I've ever seen... :-)

    Just browsing through the site now. It's about bloody time somebody did this (hence me starting thread about it!). Good work!

    Any idea if the PRC's will be as usable on a series 60 phone? I've a Nokia 6680 with MobiPocket. I've no problem using it for eBooks and eNews so far, but the only interactivity they have is hyperlinks (i.e. no space for input).

    Good work again!


  • Registered Users Posts: 17,958 ✭✭✭✭RuggieBear


    i just used a low tech solution of copying the various bus times i wanted saved them to text/word file and saved that to my 6680. and then using quickword to open it.

    Pretty similar to the text file output in your application damobrew.

    I'd love it to be able to display bus timetables similar to the the pilot...now that's useful. :D


  • Advertisement
  • Registered Users Posts: 3,317 ✭✭✭Chalk




  • Registered Users Posts: 6,511 ✭✭✭daymobrew


    deathfunk wrote:
    Daymo, that's one of the coolest things I've ever seen... :-)

    Just browsing through the site now. It's about bloody time somebody did this (hence me starting thread about it!). Good work!

    Any idea if the PRC's will be as usable on a series 60 phone? I've a Nokia 6680 with MobiPocket. I've no problem using it for eBooks and eNews so far, but the only interactivity they have is hyperlinks (i.e. no space for input).

    Good work again!
    Thanks.
    I highly doubt that the PDB files I generate will work on the phone. They are "Palm DataBases". (My mistake earlier calling them "Palm PRC format", that's the application filename extension)

    Having said that, I could easily add another option to the form to generate a database for a Sagem phone. I couldn't find any info about programming for a Sagem on their site. Maybe it could include hyperlinks to within the document (anchors) so to be interactive with MobiPocket.

    If it has Java then my planned Java ME version might work. Hopefully storing databases on a phone will be possible - I'd hate to force people to download via the web.


  • Registered Users Posts: 17,958 ✭✭✭✭RuggieBear


    Chalk wrote:

    useful except that vodafone charge a poxy minimum connection fee :eek: :(


Advertisement