Flightplan: How to search a year of award inventory [no longer maintained]
#76
Suspended
Join Date: May 2006
Location: HKG
Programs: A3, TK *G; JL JGC; SPG,Hilton Gold
Posts: 9,952
it does read choice. (thats why i searched HKGSIN over 5 days the very first time, so i could see what the limits of what Flightplan can do heehe!
#77
Original Poster
Join Date: Jan 2010
Posts: 189
Use a command line tool to query the database, like "sqlite3" (which you seemed to figure out).
Yeah, maybe a parser issue, I still need to take a look.
Yep, CX choice is supported. If you're not seeing it, but it shows on AM website, then it's a parser bug.
Yep, CX choice is supported. If you're not seeing it, but it shows on AM website, then it's a parser bug.
#78
Ambassador, Hong Kong and Macau
Join Date: May 2009
Location: HKG
Programs: Non-top tier Asia Miles member
Posts: 19,770
Can I combine png and tar.gz files from two computers?
Hi jd20
Sorry for further query.
A search is running slow on my older computer, so once my faster computer's finished one set of routes on the faster compauter I had that computer run the search for part of the remainder dates of the slower computer.
I then moved the html.gz and png files from the faster to the slower and tried to consolidate them using flightplan parse
This resulted, and the results procured from the faster computer cannot be displayed on the slower computer
Is there anything I can do to consolidate results? Thanks in advance!
Sorry for further query.
A search is running slow on my older computer, so once my faster computer's finished one set of routes on the faster compauter I had that computer run the search for part of the remainder dates of the slower computer.
I then moved the html.gz and png files from the faster to the slower and tried to consolidate them using flightplan parse
This resulted, and the results procured from the faster computer cannot be displayed on the slower computer
Is there anything I can do to consolidate results? Thanks in advance!
#79
Original Poster
Join Date: Jan 2010
Posts: 189
I then moved the html.gz and png files from the faster to the slower and tried to consolidate them using flightplan parse
This resulted, and the results procured from the faster computer cannot be displayed on the slower computer
Is there anything I can do to consolidate results? Thanks in advance!
This resulted, and the results procured from the faster computer cannot be displayed on the slower computer
Is there anything I can do to consolidate results? Thanks in advance!
Do not just manually copy the *.html.gz files, this won't work (because there's additional data in the database that is needed). If you already manually copied them, no biggie. Copy the flightplan directory (the one that has "data" and "db" in it) from your slow computer to somewhere on your fast computer. Let's say you have: "c:\flightplan" and "c:\slow_computer". You'd run:
cd c:\flightplan
flightplan import -d "c:\slow_computer"
flightplan parse
#80
Ambassador, Hong Kong and Macau
Join Date: May 2009
Location: HKG
Programs: Non-top tier Asia Miles member
Posts: 19,770
#81
Original Poster
Join Date: Jan 2010
Posts: 189
You could try to recreate the needed database rows from the HTML files, but not sure how good your command line fu is It'd probably be faster just to re-run again (and this time remember to copy over both "data" and "db" directories from the other computer.
#82
Join Date: Jan 2018
Programs: JMB Sapphire, OneWorld Sapphire
Posts: 113
I would like to help in tinkering the codes but im not so sure where to start. :/
#83
Ambassador, Hong Kong and Macau
Join Date: May 2009
Location: HKG
Programs: Non-top tier Asia Miles member
Posts: 19,770
It's just only available for YVR https://www.flyertalk.com/forum/cath...l#post29977452
And not SYD https://www.flyertalk.com/forum/cath...l#post29977447 nor LHR https://www.flyertalk.com/forum/cath...l#post29977453 in J for a whole year...
And damn, I was pining my hopes on porking out on Choice awards, because I can drive my miles purchase costs down but need availability on peak or shoulder.
#84
Original Poster
Join Date: Jan 2010
Posts: 189
Thanks for reply. Yes I am getting Choice hits for YVR.
It's just only available for YVR https://www.flyertalk.com/forum/cath...l#post29977452
And not SYD https://www.flyertalk.com/forum/cath...l#post29977447 nor LHR https://www.flyertalk.com/forum/cath...l#post29977453 in J for a whole year...
And damn, I was pining my hopes on porking out on Choice awards, because I can drive my miles purchase costs down but need availability on peak or shoulder.
It's just only available for YVR https://www.flyertalk.com/forum/cath...l#post29977452
And not SYD https://www.flyertalk.com/forum/cath...l#post29977447 nor LHR https://www.flyertalk.com/forum/cath...l#post29977453 in J for a whole year...
And damn, I was pining my hopes on porking out on Choice awards, because I can drive my miles purchase costs down but need availability on peak or shoulder.
#85
Ambassador, Hong Kong and Macau
Join Date: May 2009
Location: HKG
Programs: Non-top tier Asia Miles member
Posts: 19,770
I have not found exceptions when I was checking by hand either.
#86
Suspended
Join Date: May 2006
Location: HKG
Programs: A3, TK *G; JL JGC; SPG,Hilton Gold
Posts: 9,952
How do i.... delete old data? (say i would like to re-run my KIX searches cuz 2 months have passed. if i do nothing it will see the old files and skip the dates (or all dates, hehe)
#87
Original Poster
Join Date: Jan 2010
Posts: 189
Run the cleanup command with a --maxage value, that tells flightplan how recent data should be to keep. Here's a few examples:
flightplan cleanup --maxage P1M # Deletes everything older than 1 month
flightplan cleanup --maxage PT30M # Deletes everything older than 30 minutes
flightplan cleanup --maxage PT0S # Deletes everything
Those funky looking time strings are a special format called ISO 8601 durations, you can read more about them here: https://en.wikipedia.org/wiki/ISO_8601#Durations
Note: Current behavior is cleanup command only removes the HTML files and corresponding entries in database. It doesn't touch the awards table, which is what the web UI is showing. When you run "flightplan parse" it'll blow away all those awards generated from old search requests, and re-compute them based on your new searches. So, a typical workflow would be like:
flightplan cleanup --maxage P1D # Get rid of old data
flightplan search <...> # Refresh with new search data
flightplan parse # Rebuild the awards table, from the new search data
And then what you see in the web UI would be the latest.
flightplan cleanup --maxage P1M # Deletes everything older than 1 month
flightplan cleanup --maxage PT30M # Deletes everything older than 30 minutes
flightplan cleanup --maxage PT0S # Deletes everything
Those funky looking time strings are a special format called ISO 8601 durations, you can read more about them here: https://en.wikipedia.org/wiki/ISO_8601#Durations
Note: Current behavior is cleanup command only removes the HTML files and corresponding entries in database. It doesn't touch the awards table, which is what the web UI is showing. When you run "flightplan parse" it'll blow away all those awards generated from old search requests, and re-compute them based on your new searches. So, a typical workflow would be like:
flightplan cleanup --maxage P1D # Get rid of old data
flightplan search <...> # Refresh with new search data
flightplan parse # Rebuild the awards table, from the new search data
And then what you see in the web UI would be the latest.
#88
Suspended
Join Date: May 2006
Location: HKG
Programs: A3, TK *G; JL JGC; SPG,Hilton Gold
Posts: 9,952
so when you run parse does it (only) rebuild with what you have in the DB entries?
so if you want the HKG<>FRA flights that u built over the last 4 days, HKG<>MXP last week and delete the old junk from last month,
you cleanup the junk before you start MXP search, but only run parse after building MXP and FRA (or running in between is ok too?)
then at the end of it you run server and client to tabulate them all?
sorry - key questions bolded :P
PS: Does the time required for parse depend on how much stuff there is? it seems like its taking longer and longer... does having more RAM help? (I'm now 2x2 on a 10 year old machine, but i could upgrade to 4x4GB (its wont be expensive now anyways))
so if you want the HKG<>FRA flights that u built over the last 4 days, HKG<>MXP last week and delete the old junk from last month,
you cleanup the junk before you start MXP search, but only run parse after building MXP and FRA (or running in between is ok too?)
then at the end of it you run server and client to tabulate them all?
sorry - key questions bolded :P
PS: Does the time required for parse depend on how much stuff there is? it seems like its taking longer and longer... does having more RAM help? (I'm now 2x2 on a 10 year old machine, but i could upgrade to 4x4GB (its wont be expensive now anyways))
Last edited by kaka; Jul 19, 2018 at 10:33 am
#90
Original Poster
Join Date: Jan 2010
Posts: 189
so if you want the HKG<>FRA flights that u built over the last 4 days, HKG<>MXP last week and delete the old junk from last month,
you cleanup the junk before you start MXP search, but only run parse after building MXP and FRA (or running in between is ok too?)
then at the end of it you run server and client to tabulate them all?
you cleanup the junk before you start MXP search, but only run parse after building MXP and FRA (or running in between is ok too?)
then at the end of it you run server and client to tabulate them all?
1) Add some form of caching: if a search request hasn't changed since last time we ran parse, no need to parse it again.
2) Parallelize parsing: Most CPU's have lots of cores, so we can parse multiple HTML files in parallel.
I'll get to both of these eventually (especially #1 ), it's on the TODO list.
This is coming soon! Currently, I ignore partner awards, working on adding support for it though. I only use credit card points, so my miles aren't really tied to specific airline, so for example, I'll check award availability with CX first (which is already kinda limited inventory), and then if I find dates I like, I'll manually check each OW partner to see which I can redeem it through (so I'll manually check BA, JAL, etc...). A little more work I realize, especially if you already know you have to use Avios, so I'm working to expand this area.