Page 1 of 2

Viewing bills offline

Posted: Sat Jun 22, 2002 3:14 pm
by pinguino79
Hi! I realized three java classes which lets you save your bills locally.
The approach is a bit "raw", but it woks (and I couldn't find a more elegant way).
I load the "View my notes" page, I save it to my HD, and then I use the classes to parse the html file, getting a Vector of EuroBill objects, with which you can do whatever you want: save it to a text file or (what I did) register the bills to your favourite DB using JDBC.
I realized them in 2 hours, so they are far from being perfect, but they work good (need more error handling).
Before to make 'em public, I still have to do some other checks on the source code.
BTW, anyone can help :wink:

Re: Viewing bills offline

Posted: Sat Jun 22, 2002 5:55 pm
by EuroBillTracker
pinguino79 wrote:Hi! I realized three java classes which lets you save your bills locally.
The approach is a bit "raw", but it woks (and I couldn't find a more elegant way).
I load the "View my notes" page, I save it to my HD, and then I use the classes to parse the html file, getting a Vector of EuroBill objects, with which you can do whatever you want: save it to a text file or (what I did) register the bills to your favourite DB using JDBC.
I realized them in 2 hours, so they are far from being perfect, but they work good (need more error handling).
Before to make 'em public, I still have to do some other checks on the source code.
BTW, anyone can help :wink:
Do you mean it iterates through the various "my bills" pages ? If so, let's find a way for all the bills to be outputed in raw format ok ? That should be fairly easy and not as hard on the DB

Re: Viewing bills offline

Posted: Sat Jun 22, 2002 8:31 pm
by Guest
EuroBillTracker wrote:Do you mean it iterates through the various "my bills" pages ? If so, let's find a way for all the bills to be outputed in raw format ok ? That should be fairly easy and not as hard on the DB
Not really, I iterate through each entry in a single page (I have to save them separately, actually). I already saved all my bills to a DB (just to have some fun with stats) :)

Re: Viewing bills offline

Posted: Sun Jun 23, 2002 11:10 am
by EuroBillTracker
Anonymous wrote: Not really, I iterate through each entry in a single page (I have to save them separately, actually). I already saved all my bills to a DB (just to have some fun with stats) :)
I still don't get it : do you read and parse each bill report ?

Re: Viewing bills offline

Posted: Sun Jun 23, 2002 11:20 am
by pinguino79
EuroBillTracker wrote:I still don't get it : do you read and parse each bill report ?
No, not bill reports; just the list of my bills.

Re: Viewing bills offline

Posted: Sun Jun 23, 2002 3:57 pm
by EuroBillTracker
pinguino79 wrote:
EuroBillTracker wrote:I still don't get it : do you read and parse each bill report ?
No, not bill reports; just the list of my bills.
Dialogue de sourds :)

Ok, so your program logs in and parses the "view my bills" page right ?
but that page only displays the last 30 or 50 such bills. How do you get all the bills ?
If you simulate a click on "next" then let's find a way to just spit out all the bills at once, it will be less hard on the database accessing. I'm just afraid that if a lot of people use you classes, lots of people are going to run into the "no available connection" problem...
So I am "offering" the idea of adding an "export bills to csv file" option on the view my bills page.
What do you think ?

Re: Viewing bills offline

Posted: Sun Jun 23, 2002 4:13 pm
by pinguino79
EuroBillTracker wrote:Ok, so your program logs in and parses the "view my bills" page right ?
but that page only displays the last 30 or 50 such bills. How do you get all the bills ?
If you simulate a click on "next" then let's find a way to just spit out all the bills at once, it will be less hard on the database accessing. I'm just afraid that if a lot of people use you classes, lots of people are going to run into the "no available connection" problem...
So I am "offering" the idea of adding an "export bills to csv file" option on the view my bills page.
What do you think ?
Nope, but we are almost there. I log in the site normally (by browser) I save each page to a local file and then parse it. The db access I was talking about was on my DB on my computer (which is a Postgreql db). I did it primarily for me, anyway :wink:
The option of getting all bills in a more parseable text file would be just great. :)
P.S. average denomination of my bills : 12.95 € :wink:

Re: Viewing bills offline

Posted: Sun Jun 23, 2002 4:43 pm
by EuroBillTracker
pinguino79 wrote: Nope, but we are almost there. I log in the site normally (by browser) I save each page to a local file and then parse it. The db access I was talking about was on my DB on my computer (which is a Postgreql db). I did it primarily for me, anyway :wink:
The option of getting all bills in a more parseable text file would be just great. :)
P.S. average denomination of my bills : 12.95 € :wink:
You save everypage offline ???? Crazy :)

Ok, I'm going to add a little page to export all your bills... see you in 30 minutes

Re: Viewing bills offline

Posted: Sun Jun 23, 2002 4:50 pm
by pinguino79
EuroBillTracker wrote:You save everypage offline ???? Crazy :)
Yeah, crazy... but the craziness was just temporary (I have 2002 bills!)
I mean, with future additions, I should have saved only first pages :wink:

Anyway, waiting... (and thank you :) )

Posted: Sun Jun 23, 2002 5:03 pm
by EuroBillTracker
Ok, if you go to your bill reports, there is an additional link(in english for now). Click on it and then look at the "source" of the page, you'll have all your info in CSV form :)

On with the form now...

Posted: Sun Jun 23, 2002 10:52 pm
by micro
EuroBillTracker wrote:Ok, if you go to your bill reports, there is an additional link(in english for now). Click on it and then look at the "source" of the page, you'll have all your info in CSV form :)

On with the form now...
Cool new feature! 8)

Posted: Sun Jun 23, 2002 11:10 pm
by Tiger
indeed,
can be usefull :D

But not really for me....
When I get new notes, I always put them first into my local MySQL database, by a selfmade php script :D
Then I copy them into the EBT database.

Having a local 'backup' is sometimes usefull.
It's very easy to see how much notes you already have, average value, number by country, lowest serial, highest serial...
All kind of funny stuff :D

Posted: Mon Jun 24, 2002 11:09 pm
by emmem
EuroBillTracker wrote:Ok, if you go to your bill reports, there is an additional link(in english for now). Click on it and then look at the "source" of the page, you'll have all your info in CSV form :)

On with the form now...
Whew, it’s cool indeed. 8)

I have to admit I saved the info of my bills too whenever I entered newly obtained bills. I only saved the page(s) with the new data of course. But the drawback of this was that the remarks were not included. :(

Now I downloaded my bills and imported them in MS Access. :?

Amazing how many time I spent on making queries and looking at the results. :( :)

Posted: Mon Jun 24, 2002 11:50 pm
by smh
What program do you need to open a csv file?

I just opened the file in excel, makes life a lot easier :-)

Thnks

Posted: Tue Jun 25, 2002 12:08 am
by emmem
smh wrote:What program do you need to open a csv file?

I just opened the file in excel, makes life a lot easier :-)

Thnks
Well CSV means Comma Separated Value(s). There are many programs wich support this.

Loading it into MS Access (or some other database program), allows you to create and execute queries very fast. At this moment I have kept 15 of them.