PDA

View Full Version : [Under Construction] Ferry times!


Sin
11-16-2010, 04:46 PM
Hey guys. Had an idea since I bought my N95 8Gb 4 years ago.

I'm living in a city which is next to sea. Using ferries for public transportation time to time. Finding which ferry when leaves the dock kinda hard, so many ferries so many times so many destinations.

So, there can be an app to do this instead of me :)

here is what I thought :

App will read the time from N900's clock.

App will ask for where I am and where I want to go.

App will get data from a file, preferably from a txt file so if times change I can easily update times. ( have not any programming experience on linux yet.. not much on windows either :P so If I have to update them, compiling mustn't be pain... )

And it will show when is next 2 ferry, and when was the one I missed.

[optional] if it shows the remaining time in minutes : seconds format that would be awesome.

These can easily change to bus times too. Could be very helpful in real life transportation.

So, I need a programmer which can spend some time for this project :)

Any ideas also welcome.

[I searched but couldn't find any topic or app that does exactly what I need.. Sorry if I am missed.]

cfh11
11-16-2010, 04:49 PM
Most such public transportation services have a website with a router built in. Have you tried just using the browser for this? Alternatively, google maps has these routes in select cities.

Sin
11-16-2010, 04:52 PM
Well, I may check it from a paper too, instead of that I'm asking for an app which will do that instantly. It hasn't to be too much work to do such an app.

Sin
11-19-2010, 06:16 PM
up..... :(

Sin
11-23-2010, 05:24 AM
Hellooooooo..? Anybody home?

jedi
11-23-2010, 06:07 AM
As cfh11 said, why not use their website? The N900 has an excellent browser, and you'll probably find it almost as quick as the website.

If you really want the app, this would be a great way to learn coding - "It hasn't to be too much work to do such an app. " ;)

Sin
11-23-2010, 06:22 AM
Well, studying civic engineering atm, 3rd year at university, so have not time to learn it, although I want to do so. Everybody has something to do I know, but I'm running out of time these years..

Same thing using their website or looking for it on paper, that's why I want it :/

ejasmudar
11-23-2010, 06:30 AM
Hmm... i am thinking of doing something similar for buses in my area. I'm only a beginner, so don't expect anything soon or anything great. I think I will be able to make a command line based app that can input origin and destination and based on time and day, it will output the next available transport in that route.
The data can be stored in simple csv files.

Sin
11-23-2010, 04:29 PM
I will gladly help if I can :)

ejasmudar
11-25-2010, 06:20 AM
Hey this is a small thing that made up. jedi was right. It's a great way to learn programming.
The attached zip file includes a .py file and a .csv file. The Data.csv file has the details in the following order: Origin, Destination, Time. This file can be edited in any text editor or spreadsheet program like gnumeric, excel, etc. Data can be added in any order.

Both files should be in the same folder.

To run from n900, open terminal, cd to the directory where these files are stored, then use the command: python NextBus.py <origin> <destination>
where origin and destination is to be from the Data.csv file.
For eg, based on my data file, I can run python NextBus.py kochi aroor and get the next available bus.

NOTE: Currently, the destination and origin names are case sensitive.

One way we can use it is to make a queen beacon widget to display the next available bus between two points. But I haven't figured out how to do it...

EDIT: Figured out hoe to use Queen Desktop Widget with NextBus.py
Just use enter the following commands in the Advanced Section:

cd /home/user/where/ever/your/file/is/
python NextBus.py <origin> <destination>

Sin
11-28-2010, 05:02 AM
my N900 is on its way to me, will try this as soon as I get it :)

ejasmudar
11-29-2010, 02:41 AM
I am working on a GUI version. I set up Qt Designer and Eric4, and got the Ui ready. Now working on doing the appropriate connections.
Can anybody answer me if it is possible to directly call my previous script from the GUI script, passing user-inputs from text boxes as arguments and showing script output in a label field?

Sin
12-27-2010, 01:35 PM
No news for GUi yet? :)

Sin
12-27-2010, 03:46 PM
btw, I couldn't make it run. It says no buses :(

ejasmudar
12-28-2010, 12:13 AM
"no buses" means the program ran but couldnt find a good result. Check out the data file to see the timings of the buses. If you're running the app at a time BEFORE the time of the bus/ferry, it will show the next bus.

ie, If there are the following in the data file,

New York Chicago 1000
New York Chicago 1500

and you run the script at 1600, the result will be no buses
But if u run itat 1100, the result should be shown correctly.

GUI work was stopped temporarily. I am still figuring out how to make the GUI elements do something, instead of sitting there all pretty.

ejasmudar
12-28-2010, 12:34 AM
See the attached UI elements screenshot. Features wise, I am thinking of adding


a "select Data File" button, which will include details like ferry/bus/airplane/train/etc

a "time chooser" , So that we can see buses/ferry available in other timings also.


As i said, Its still not working. Haven't figured out actual UI programming.

Sin
12-30-2010, 06:50 AM
"no buses" means the program ran but couldnt find a good result. Check out the data file to see the timings of the buses. If you're running the app at a time BEFORE the time of the bus/ferry, it will show the next bus.

ie, If there are the following in the data file,

New York Chicago 1000
New York Chicago 1500

and you run the script at 1600, the result will be no buses
But if u run itat 1100, the result should be shown correctly.

GUI work was stopped temporarily. I am still figuring out how to make the GUI elements do something, instead of sitting there all pretty.

As you described it works :)

Keep up the good work :)