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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Bart - Bus and Rail times program

  • 04-05-2008 6:15pm
    #1
    Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭


    Following on from this thread:
    http://www.boards.ie/vbulletin/showthread.php?t=2055285511

    I've made a program that gets bus and rail times.

    It's called Bart (Bus And Rail Times).
    With Bart you can get train time tables nationwide as well as real time Dart information.
    Bart can also get the departure times for the next 5 buses in both directions for a given route number.

    Bart remembers the last information you entered so, for example if you always get the same dart, you can get the ETA for the next one with 3 clicks.

    Bart works on any J2ME (java mobile edition) compatible mobile phone. Getting a timetable with Bart costs between 0.25c and 2c depending on your network and configuration.
    If you have a data package it costs nothing.


    I haven't tested the scripts with every bus or train route so if you find any bugs, report them and i'll get to fixing them


    you can download it here:
    http://cabaal.org/cabbage/bart.php


«13

Comments

  • Registered Users, Registered Users 2 Posts: 26,584 ✭✭✭✭Creamy Goodness


    sweet all i have to do now is wait for sun to release java for the iphone :(


  • Closed Accounts Posts: 19,080 ✭✭✭✭Random


    Or wait for Vimes to release a webbased version ;)


  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,260 Mod ✭✭✭✭Jonathan


    Thanking you Vimes. Poor old Dal will be loosing lots of business now :p


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    random wrote: »
    Or wait for Vimes to release a webbased version ;)


    well whoever wants can do it. here are the urls it uses:

    example for standard train times:
    http://cabaal.org/cabbage/rail.php?to=Connolly&from=Maynooth&date=05-05-2008&fromtime=10-00&totime=23-59


    real time dart info:
    http://cabaal.org/cabbage/rail2.php?from=Connolly&dir=N

    buses
    http://cabaal.org/cabbage/bus.php?route=40&day=6&time=1600

    the day number is the day of the week. 6=saturday


  • Registered Users, Registered Users 2 Posts: 18,961 ✭✭✭✭Mimikyu


    This post has been deleted.


  • Advertisement
  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,260 Mod ✭✭✭✭Jonathan


    Found a bug.

    Routes such as the 102 have intermediate stops. This results in no times being returned.


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    jmccrohan wrote: »
    Found a bug.

    Routes such as the 102 have intermediate stops. This results in no times being returned.

    right so. will get to work on that. thanks for reporting it


  • Registered Users, Registered Users 2 Posts: 4,963 ✭✭✭long_b


    Unreal - this will come in so handy !! Thanks so much for another great app.You should seriously think about selling it to Iranreod Eireann.


  • Registered Users, Registered Users 2 Posts: 18,961 ✭✭✭✭Mimikyu


    This post has been deleted.


  • Registered Users, Registered Users 2 Posts: 1,488 ✭✭✭mathew


    Great app Vimes.. thanks a million.
    Quick suggestion: A day selection in the bus times part would be great so you can find out the buses for the next morning etc..


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    mathew wrote: »
    Great app Vimes.. thanks a million.
    Quick suggestion: A day selection in the bus times part would be great so you can find out the buses for the next morning etc..

    yeah you're right that would be good. the script is already set up to do that so it'd just be a matter of adding the option to the page. at the moment it defaults to the current day


  • Registered Users, Registered Users 2 Posts: 82 ✭✭Ziboo


    There appears to be an error in the data pulled from Dublin Bus. I checked for bus 48A and noted that I was getting different times to those on the Dublin bus website for today. I have since noticed that it was returning the times for Sunday and public holidays rather than Tuesday. (I have checked the date/time on my phone and they are correct, so I am guessing that the issue lies within the application?


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    Must be. I'll take a look this evening and see what the problem is


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    This post has been deleted.

    i've hopefully fixed this now. that was a lot more complicated than i thought it'd be :D
    Ziboo wrote: »
    There appears to be an error in the data pulled from Dublin Bus. I checked for bus 48A and noted that I was getting different times to those on the Dublin bus website for today. I have since noticed that it was returning the times for Sunday and public holidays rather than Tuesday. (I have checked the date/time on my phone and they are correct, so I am guessing that the issue lies within the application?

    that's quite odd because i just tried it there and it returned the proper info. try this and see what you get back:

    http://cabaal.org/cabbage/bus.php?route=48a&time=1200&day=6

    change around the time and the day (1-7=mon to sun). as far as i can see it's giving the right details :confused:


    edit:it appears the the phone itself isn't getting the right day. i'll work on it


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    found and fixed the problem. the day should be sent correctly if you download the program again


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    Nice program.


  • Registered Users, Registered Users 2 Posts: 82 ✭✭Ziboo


    Thanks for the fix. the day issue has been rectified


  • Registered Users, Registered Users 2 Posts: 1,191 ✭✭✭The_Hustler


    I have java on my phone but I just get a lot of code and stuff when I get the results. Does anyone know if the se k610i doesn't have the right java for this?


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    I have java on my phone but I just get a lot of code and stuff when I get the results. Does anyone know if the se k610i doesn't have the right java for this?

    i saw that happen on a k810i too. Must be something to do with how the phones handle web pages. Tell me, if you scroll down can you see the information that you're meant to see below all the code?

    by the way, anyone who downloaded it before i fixed that day issue should get the new one because otherwise you'll always get sundays bus results


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    Nice program.
    thank you very much :)


  • Advertisement
  • Closed Accounts Posts: 4,234 ✭✭✭Fresh Pots


    just to let you know sam all the X routes still aren't working, still coming back with no results as are the nitelinks.


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    just to let you know sam all the X routes still aren't working, still coming back with no results as are the nitelinks.

    right so. as you can tell, i didn't go through every bus route and find out how they're presented :)


  • Closed Accounts Posts: 1,010 ✭✭✭mkennedy


    Cool app, thanks.
    Can you save a jar file locally instead of it opening straight away after download BTW.

    What would be really cool would be if you could find dublin bus routes by inputting start/destination.

    Also these times are always up to date i take it?
    Thanks.


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    mkennedy wrote: »
    Cool app, thanks.
    Can you save a jar file locally instead of it opening straight away after download BTW.
    why do you want to do that? you can download it to your pc and copy it over to the phone

    mkennedy wrote: »
    What would be really cool would be if you could find dublin bus routes by inputting start/destination.
    now that would be an awful lot more tricky. i'll see what I can do
    mkennedy wrote: »
    Also these times are always up to date i take it?
    Thanks.

    they're taken directly off the various websites so they're as up to date as the websites are


  • Closed Accounts Posts: 1,010 ✭✭✭mkennedy


    Sam Vimes wrote: »
    why do you want to do that? you can download it to your pc and copy it over to the phone now that would be an awful lot more tricky. i'll see what I can do they're taken directly off the various websites so they're as up to date as the websites are

    OK Thanks.
    I just wanted to save it somewhere in case i did a hard reset.

    I must say though just from first impressions it seems slick for a homemade app.

    There aren't too many travel apps like it for the irish market so it should come in handy.
    I love the alphabetized list of train stations- didn't notice that at first.


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    if this information never really changes, would it be better to hardcode such information?

    it would increase the jar size but text compresses really well :)


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    if this information never really changes, would it be better to hardcode such information?

    it would increase the jar size but text compresses really well :)

    well there's two things there. firstly, the information does change sometimes and secondly, i don't want to go through the time table for every bus in the city and add them to the jar :D


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    just to let you know sam all the X routes still aren't working, still coming back with no results as are the nitelinks.

    can you tell me a few routes that have x varieties. i want to make sure i have them all right


  • Closed Accounts Posts: 4,234 ✭✭✭Fresh Pots


    here ya go, there all here

    Xpresso routes:

    15x - 25x - 27x - 32x - 33x - 37x - 39x - 41x - 46x - 49x - 50x - 51d - 51x - 58x - 65x - 66x - 67x - 68x - 69x - 70b - 70x - 77x - 79x - 84x


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    here ya go, there all here

    Xpresso routes:

    15x - 25x - 27x - 32x - 33x - 37x - 39x - 41x - 46x - 49x - 50x - 51d - 51x - 58x - 65x - 66x - 67x - 68x - 69x - 70b - 70x - 77x - 79x - 84x

    danke very much


  • Registered Users, Registered Users 2 Posts: 1,191 ✭✭✭The_Hustler


    Sam Vimes wrote: »
    i saw that happen on a k810i too. Must be something to do with how the phones handle web pages. Tell me, if you scroll down can you see the information that you're meant to see below all the code?

    I'm afraid not. I can see that it's html code and it mentions stuff about being redirected but obviously an application isn't going to redirect to some other page, and ends with "For assistance, contact your network support team", well, before ending the html code.

    I tried out the rail elements and I just get a message saying failed to get data.

    I'm with 3 and I don't have any issues with other applications, so maybe it is a phone thing.


    Actually, with AFT I always get a message saying there was a problem with sending your message even though it is sending so maybe that's along the same lines.


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    I'm afraid not. I can see that it's html code and it mentions stuff about being redirected but obviously an application isn't going to redirect to some other page, and ends with "For assistance, contact your network support team", well, before ending the html code.

    I tried out the rail elements and I just get a message saying failed to get data.

    I'm with 3 and I don't have any issues with other applications, so maybe it is a phone thing.


    Actually, with AFT I always get a message saying there was a problem with sending your message even though it is sending so maybe that's along the same lines.


    try my IRL Cinema Guide, you'll get the same! Some users on 3 get this. You dont by any change have a Sony Ericsson do you?


  • Registered Users, Registered Users 2 Posts: 1,191 ✭✭✭The_Hustler


    try my IRL Cinema Guide, you'll get the same! Some users on 3 get this. You dont by any change have a Sony Ericsson do you?

    Yeah, I just got a http 302 error, and yes I so have a SE.

    Damn, I thought since the likes of streaming finally started working for me I wouldn't have any more problems!

    The strange thing is though, previous versions of AFT didn't give me an error message.


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    Yeah, I just got a http 302 error, and yes I so have a SE.

    Damn, I thought since the likes of streaming finally started working for me I wouldn't have any more problems!

    The strange thing is though, previous versions of AFT didn't give me an error message.

    would you be able to try your sim in a different phone? 3 do some odd things and it could be a problem at their end


  • Registered Users, Registered Users 2 Posts: 1,201 ✭✭✭quintron


    Nice app Vimes!
    Question or request. Is it possible to have an option to define the access point automatically? I only ask because Psiloc came out with a great little app called connect recently and it defaults to home wifi if at home and 3G if not, saves a key press on S60 phones. Cheers,
    Q.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    quintron wrote: »
    Nice app Vimes!
    Question or request. Is it possible to have an option to define the access point automatically? I only ask because Psiloc came out with a great little app called connect recently and it defaults to home wifi if at home and 3G if not, saves a key press on S60 phones. Cheers,
    Q.

    i don't know tbh. i've been looking for an option to do it on my phone but can't find one. i think it might be a symbian specific thing and bart is written in java. do you know if Psiloc's app is symbian or java?


  • Registered Users, Registered Users 2 Posts: 1,201 ✭✭✭quintron


    Psilocs app is sisx Symbian. S60 phones used to have access point groups, and for some reason Nokia ditched them. So Psiloc stepped in to offer a very simple functionality.. By defining itself as an access point, it will hunt for wifi before opting for a network 3G, GRPS signal in an effort to speed up things and save data bills etc.
    It galls me a bit to have to pay 10euro for something that was in the OS before but it works and is faster than access point groups of old.
    Anyway bottom line, is there anywhere from within the java app that it can default to an access point name on startup?
    In my case I would put in there... 'Psiloc Connect' as the apn covering all bases. Otherwise one could put in '3' as default access point on 3 handsets, vodafone live! as apn on voda handsets etc.
    Is it possible to write it into the startup I wonder?
    Don't know much about java at all but I suspect while appearing simple its difficult as even Gmails java app does not offer an option to "store" a default access point for future running of the program, which is annoying... maybe my going with the common disclaimer "allow XXX application to access the internet" they are not culpible for end users who don't have data tariffs and unwittingly or unknowingly end up with extorionate data bills... and then try to blame the network or, the software provider..

    I suspect the latter, still it would be a great feature to have in a menu somewhere for those that wanted the option to permanently define the default apn for the program.

    PS: Is it something that can be added to the manifest?


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    i'll take a look and see what i can find but my first instinct is to say it can't be done because the java version of opera can't do it and the symbian version can. you'd think that if they could do it in both versions they would

    symbian apps can do a hell of a lot more than java apps


  • Registered Users, Registered Users 2 Posts: 1,201 ✭✭✭quintron


    I agree. It's a long shot, I'll have a look into it myself as well to see if there are any options.
    Cheers!


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    Yeah, I just got a http 302 error, and yes I so have a SE.

    Damn, I thought since the likes of streaming finally started working for me I wouldn't have any more problems!

    The strange thing is though, previous versions of AFT didn't give me an error message.


    its all about how the app handles the 302 responce that Sony Ericsson phones get on 3. I just show "Http: Responce 302" instead of the html code you see from 3 in Sam Vimes app.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    its all about how the app handles the 302 responce that Sony Ericsson phones get on 3. I just show "Http: Responce 302" instead of the html code you see from 3 in Sam Vimes app.

    but basically you haven't found a solution to the problem? it's a problem with the se firmwarwe is it?


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    Yeah, I just got a http 302 error, and yes I so have a SE.

    Damn, I thought since the likes of streaming finally started working for me I wouldn't have any more problems!

    The strange thing is though, previous versions of AFT didn't give me an error message.

    would you be able to do me a big favour and post the text you get back? if you can spot a link in the code, you should be able to ignore most of the code and just post a line or two above and below the link


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    Sam Vimes wrote: »
    but basically you haven't found a solution to the problem? it's a problem with the se firmwarwe is it?


    its a bit of 3 and Sony Ericsson, ideally we should be able to read the "location" in the http header to re-direct to the actual page, but some Sony Ericsson dont do this automatically. I have tried to redirect to this through the app manually and no joy, i have also formed a proxy url like you see in 3's redirect info page and i still get redirected to the the very same page.

    I used some http cookie code for j2me but it made no difference.


  • Registered Users, Registered Users 2 Posts: 1,191 ✭✭✭The_Hustler


    Sam Vimes wrote: »
    would you be able to do me a big favour and post the text you get back? if you can spot a link in the code, you should be able to ignore most of the code and just post a line or two above and below the link

    Yeah it's:
    <TR><TD>
    <FONT face+"Helvetica">
    Click <a href="http://notify.three.co.uk/notify-Interstitial?http/cabaal.org/aHR0cDovL2NhYmFhbC5vcmcvY2FiYmFnZS9idXMucGhwP3JvdXRlPTEyMyZkYXk9MSZ0aW1lPTIwNDc=">here</a&gt; if you are not automatically directed.
    </FONT>
    </TR></TD>

    (I hope I got that all right)

    I haven't been able to try on another phone yet but from the above conversation it looks like it will only happen in a SE.


  • Registered Users, Registered Users 2 Posts: 2,168 ✭✭✭leche solara


    When I download this to a O2 SE W200 it saves it to Saved Webpages and the only option available is View. If I try to view it nothing happens. It works fine on a SE K800.

    Any ideas?


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    When I download this to a O2 SE W200 it saves it to Saved Webpages and the only option available is View. If I try to view it nothing happens. It works fine on a SE K800.

    Any ideas?

    do you have a usb cable so you can transfer the file to the phone?
    Yeah it's:
    <TR><TD>
    <FONT face+"Helvetica">
    Click <a href="http://notify.three.co.uk/notify-Interstitial?http/cabaal.org/aHR0cDovL2NhYmFhbC5vcmcvY2FiYmFnZS9idXMucGhwP3JvdXRlPTEyMyZkYXk9MSZ0aW1lPTIwNDc=">here</a&gt; if you are not automatically directed.
    </FONT>
    </TR></TD>

    (I hope I got that all right)
    ah yes i remember that. it took me about 4 months of calls to get that problem fixed. it's something 3 did last september to mess up their network. i don't think there's anything i can do to fix it. opera mini wouldn't work either back then and this was on a nokia n70. all i can suggest is that you call 3 and try really hard to explain to the script monkeys what the problem is. try to get them to escalate it to the people who know stuff if you can


  • Closed Accounts Posts: 2,267 ✭✭✭h57xiucj2z946q


    its a weird problem. My friend put his sim card into my nokia phone and he can then use my app. I put my sim into his sony ericsson and i see the problem above that i didn't get on my nokia.

    i think maybe nokia possibly uses its standard internet browsers libraries for http connections in java micro at the virtual machine level which possibly has access to its sessions/cookies history. I don't know, just a thought.

    also some pages on the internet highlight issues with sony ericsson and 302 responses. Calling that proxy url manually from the app won't help as 3 assumes its the first time you open a page due to no session/cookie history.


  • Registered Users, Registered Users 2 Posts: 1,191 ✭✭✭The_Hustler


    Yes, I remember all that crap with 3 using a proxy so everything was messed up, and they had no idea what it was about. But opera mini, gmail etc. work so it a different variant, one which I would have a hard time explaining.

    Sam Vimes, even with your 4 months of calling, I wonder would you get the same issue if you tried your sim in an SE, as happened to damo2k above.

    At least being with 3 means it doesn't cost too much to go to the actual sites that the data is sourced from!


  • Registered Users, Registered Users 2 Posts: 2,168 ✭✭✭leche solara


    Sam Vimes wrote: »
    do you have a usb cable so you can transfer the file to the phone?


    Which folder would I copy the jar file into?
    I already have AFT in the phone and it doesn't show in any of the folders.

    Forget the above. Downloaded the jar file to the PC, emailed it to o2 email account, accessed o2 mail on the phone, then saved attachment into phone. All is well now


  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    bart should now work for X and N routes. no need to download a new client


  • Advertisement
Advertisement