[ILUG] Getting DART timetable onto the computer
Jag Gunawardana
jag at triathlonireland.com
Wed Oct 8 11:25:23 IST 2008
pdftotext -raw
gives something more usable, a simple script could then parse this output into
something more usable.
On Sunday 05 October 2008 12:55:23 Brendan Kehoe wrote:
> Timothy Murphy wrote:
> > Does anyone know how to download the DART timetable in usable form?
> >
> > Maybe as an Excel file, or whatever?
>
> I don't know of anything already existing, though I'm sure people have
> done it.
>
> If you get the PDF from
> http://www.irishrail.ie/your_journey/printed_timetables.asp
> and convert it into text (via 'pdftotext') each page appears as a single
> long line:
>
> Days Run Mon-Fri Mon-Sat Mon-Fri Mon-Sat Mon-Fri Mon-Fri Sat Only
> Mon-Sat Mon-Fri Sat Only Mon-Fri Mon-Sat Sat Only Mon-Fri Sat Only
> Mon-Fri Mon-Sat Mon-Sat Mon-Sat Mon-Fri Mon-Fri Mon-Fri Sat Only Sat
> Only Mon-Fri Mon-Fri Mon-Sat Mon-Fri Mon-Fri Sat Only Mon-Sat Time 05.55
> 06.30 06.45 06.55 06.56 07.10 07.13 07.17 07.20 07.25 07.36 07.37 07.45
> 07.46 07.51 07.52 07.55 08.03 08.05 08.12 08.15 08.25 08.25 08.27 08.30
> 08.34 08.35 08.38 08.40 08.47 08.48 Destination All Stations To Howth.
> All Stations To Howth. All Stations To Clontarf Road, Howth Jct. &
> Donaghmede, Portmarnock, Malahide All Stations To Howth. All Stations To
> Bray. All Stations To Howth. All Stations To Malahide. All Stations To
> Bray. All Stations To Malahide. All Stations To Howth. All Stations To
> Howth. All Stations To Bray. All Stations To Howth. All Stations To
> Bray. All Stations To Greystones. All Stations To Bray. All Stations To
> Malahide. All Stations To Bray. All Stations To Howth. All Stations To
> Bray. All Stations To Howth. All Stations To Malahide. All Stations To
> Howth. All Stations To Bray. All Stations To Howth. All Stations To
> Bray. All Stations To Malahide. All Stations To Bray. All Stations To
> Connolly. All Stations To Bray. All Stations To Howth. Days Run Mon-Fri
> Mon-Sat Sat Only Mon-Fri Sat Only Mon-Sat Mon-Fri Mon-Fri Mon-Sat
> Mon-Fri Mon-Sat Sat Only Mon-Sat Mon-Sat Mon-Sat Sat Only Mon-Fri
> Mon-Sat Sat Only Mon-Fri Sat Only Mon-Sat Mon-Sat Mon-Sat Mon-Sat
> Mon-Sat Mon-Sat Mon-Sat Mon-Sat Mon-Sat Time 08.55 08.55 09.03 09.12
> 09.15 09.16 09.20 09.22 09.28 09.38 09.40 09.43 09.55 09.55 10.00 10.06
> 10.11 10.23 10.26 10.31 10.35 10.44 10.45 11.00 11.06 11.14 11.21 11.23
> 11.28 11.36 Destination All Stations To Bray. All Stations To Howth. All
> Stations To Bray. Dun Laoghaire, Lansdowne Road, Grand Canal Dock,
> Pearse, Tara Street, Connolly, Portmarnock, Malahide, Donabate (10.01),
> Rush & Lusk (10.05), Skerries (10.11), Balbriggan (10.17) All Stations
> To Howth. All Stations To Bray. All Stations To Bray. All Stations To
> Howth. All Stations To Malahide. All Stations To Bray. All Stations To
> Howth. All Stations To Bray. All Stations To Greystones. All Stations To
> Howth. All Stations To Howth. All Stations To Bray. All Stations To
> Bray. All Stations To Howth. All Stations To Bray. All Stations To Bray.
> All Stations To Bray. All Stations To Greystones. All Stations To Howth.
> All Stations To Malahide. All Stations To Bray. All Stations To Howth.
> All Stations To Bray. All Stations To Howth. All Stations To Greystones.
> All Stations To Bray. Days Run Mon-Sat Mon-Sat Mon-Sat Mon-Sat Mon-Sat
> Mon-Sat Mon-Sat Mon-Sat Mon-Sat Mon-Sat Mon-Sat Mon-Sat Mon-Sat Mon-Sat
> Mon-Sat Mon-Sat Mon-Sat Mon-Fri Sat Only Sat Only Mon-Fri Mon-Sat
> Mon-Sat Mon-Sat Mon-Sat Mon-Sat Sat Only Mon-Fri Mon-Sat Mon-Sat Mon-Sat
> Mon-Sat Mon-Sat Time 11.45 11.53 11.53 12.06 12.14 12.16 12.29 12.35
> 12.36 12.50 13.00 13.08 13.09 13.16 13.30 13.36 13.43 13.45 13.45 13.57
> 14.00 14.06 14.14 14.21 14.28 14.35 14.40 14.45 14.53 14.58 15.07 15.10
> 15.23 Destination All Stations To Howth. All Stations To Bray. All
> Stations To Malahide. All Stations To Greystones. All Stations To Howth.
> All Stations To Bray. All Stations To Howth. All Stations To Malahide.
> All Stations To Greystones. All Stations To Bray. All Stations To Howth.
> All Stations To Greystones. All Stations To Howth. All Stations To Bray.
> All Stations To Howth. All Stations To Bray. All Stations To Malahide.
> All Stations To Greystones. All Stations To Bray. All Stations To Howth.
> All Stations To Howth. All Stations To Bray. All Stations To Howth. All
> Stations To Greystones. All Stations To Malahide. All Stations To Bray.
> All Stations To Howth. All Stations To Howth. All Stations To Bray. All
> Stations To Howth. All Stations To Greystones. All Stations To Malahide.
> All Stations To Bray.
>
> Each column is separated by 'Days Run'; e.g., the left-hand column off
> the first sandycove page has:
>
> Days Run Mon-Fri Mon-Sat Mon-Fri Mon-Sat Mon-Fri Mon-Fri Sat Only
> Mon-Sat Mon-Fri Sat Only Mon-Fri Mon-Sat Sat Only Mon-Fri Sat Only
> Mon-Fri Mon-Sat Mon-Sat Mon-Sat Mon-Fri Mon-Fri Mon-Fri Sat Only Sat
> Only Mon-Fri Mon-Fri Mon-Sat Mon-Fri Mon-Fri Sat Only Mon-Sat Time 05.55
> 06.30 06.45 06.55 06.56 07.10 07.13 07.17 07.20 07.25 07.36 07.37 07.45
> 07.46 07.51 07.52 07.55 08.03 08.05 08.12 08.15 08.25 08.25 08.27 08.30
> 08.34 08.35 08.38 08.40 08.47 08.48 Destination All Stations To Howth.
> All Stations To Howth. All Stations To Clontarf Road, Howth Jct. &
> Donaghmede, Portmarnock, Malahide All Stations To Howth. All Stations To
> Bray. All Stations To Howth. All Stations To Malahide. All Stations To
> Bray. All Stations To Malahide. All Stations To Howth. All Stations To
> Howth. All Stations To Bray. All Stations To Howth. All Stations To
> Bray. All Stations To Greystones. All Stations To Bray. All Stations To
> Malahide. All Stations To Bray. All Stations To Howth. All Stations To
> Bray. All Stations To Howth. All Stations To Malahide. All Stations To
> Howth. All Stations To Bray. All Stations To Howth. All Stations To
> Bray. All Stations To Malahide. All Stations To Bray. All Stations To
> Connolly. All Stations To Bray. All Stations To Howth.
>
> A bit of perl or awk or whatever and you could convert that into
> comma-separated entries (or whatever) which could be imported into a
> spreadsheet.
>
> B
More information about the ILUG
mailing list