Comment utiliser le parser?

26 views
Skip to first unread message

Franz

unread,
Jun 7, 2011, 12:12:33 PM6/7/11
to Budgetroid
Bonjour,

Je sais qu'il existe un parseur et je serais bien intéressé de
l'utiliser. Quand je clique sur l'option dans budgetroid, je suis
renvoyé à la page web qui contient le code.

Quelqu'un peut m'expliquer la manipulation pour obtenir un résultat?

Merci!


François

Mathias Rav

unread,
Jun 7, 2011, 1:05:52 PM6/7/11
to budge...@googlegroups.com
Salut François,

(J'ai appris francais à l'école, et je comprends encore ca, mais je ne
sais plus l'écrire. Désolé !)

My parser works from the command-line, and although I made it with
Linux and Mac OS X in mind, you can get it to work using ActiveState
Perl on Windows. If you're already using Linux or Mac OS X, you can
skip step 1-3!

1. Download and install ActiveState Perl:
http://www.activestate.com/activeperl/downloads

After installing Perl, restart your computer. (This is to make sure
the "PATH" environment variable is updated by the Perl installer.)

2. Copy and paste the script from
http://svn.lolwh.at/wsvn.php/budgetroidparser/budgetroidparser.pl into
a text file, named budgetroid.pl or similar.

3. Export your Budgetroid data and copy the Budgetroid.save file from
your sdcard to the same folder as the budgetroid.pl file.

4. Open a command-line prompt and navigate to the directory with the
script and the data. (This is a little difficult to learn if you have
never tried it before. Let me know if you have problems.)

5. Enter the following command:

perl budgetroid.save < Budgetroid.save > Budgetroid.html

Voilà ! Now there is a file named Budgetroid.html in the in the same
folder as the other files.

I understand written French, but I can't write French anymore as I
have forgotten most of what I learned in high school. I hope you
understand my instructions.

Happy hacking,
Mathias Rav

2011/6/7 Franz <frh...@gmail.com>:

> --
> Vous recevez ce message, car vous êtes abonné au groupe Google Groupes Budgetroid.
> Pour envoyer un message à ce groupe, adressez un e-mail à budge...@googlegroups.com.
> Pour vous désabonner de ce groupe, envoyez un e-mail à l'adresse budgetroid+...@googlegroups.com.
> Pour plus d'options, consultez la page de ce groupe : http://groups.google.com/group/budgetroid?hl=fr
>
>

Mathias Rav

unread,
Jun 7, 2011, 1:07:36 PM6/7/11
to budge...@googlegroups.com
On 7 June 2011 19:05, Mathias Rav <r...@cs.au.dk> wrote:
> ...

>
> 5. Enter the following command:
>
> perl budgetroid.save < Budgetroid.save > Budgetroid.html

Oops, this should instead be

perl budgetroid.pl < Budgetroid.save > Budgetroid.html

as we're instructing Perl to execute the script budgetroid.pl, read
the file Budgetroid.save and write to the file Budgetroid.html.

Best regards
Mathias Rav

Franz

unread,
Jun 7, 2011, 4:27:33 PM6/7/11
to Budgetroid
Thanks for the quick guide :)

It works, even if some strange messages appear :

franz@franzinateur:~/Bureau$ perl budgetroid.pl < Budgetroid.save >
Budgetroid.html
Unsure whether entry 5 is a repeating entry or not: 1 1 1 at
budgetroid.pl line 40, <STDIN> line 6.
Unsure whether entry 36 is a repeating entry or not: 1 at
budgetroid.pl line 40, <STDIN> line 35.
Unsure whether entry 40 is a repeating entry or not: 1 at
budgetroid.pl line 40, <STDIN> line 39.
Unsure whether entry 103 is a repeating entry or not: 1 1 1 at
budgetroid.pl line 40, <STDIN> line 102.
Unsure whether entry 105 is a repeating entry or not: 1 1 1 at
budgetroid.pl line 40, <STDIN> line 104.
Unsure whether entry 107 is a repeating entry or not: 1 1 1 at
budgetroid.pl line 40, <STDIN> line 106.
Unsure whether entry 291 is a repeating entry or not: 1 at
budgetroid.pl line 40, <STDIN> line 287.

François

Mathias Rav

unread,
Jun 7, 2011, 4:36:01 PM6/7/11
to budge...@googlegroups.com
On 7 June 2011 22:27, Franz <frh...@gmail.com> wrote:
> Thanks for the quick guide :)
>
> It works, even if some strange messages appear :
>
> franz@franzinateur:~/Bureau$ perl budgetroid.pl < Budgetroid.save >
> Budgetroid.html
> Unsure whether entry 5 is a repeating entry or not: 1  1 1 at
> budgetroid.pl line 40, <STDIN> line 6.
> Unsure whether entry 36 is a repeating entry or not:    1 at
> budgetroid.pl line 40, <STDIN> line 35.
> Unsure whether entry 40 is a repeating entry or not:    1 at
> budgetroid.pl line 40, <STDIN> line 39.
> Unsure whether entry 103 is a repeating entry or not: 1  1 1 at
> budgetroid.pl line 40, <STDIN> line 102.
> Unsure whether entry 105 is a repeating entry or not: 1  1 1 at
> budgetroid.pl line 40, <STDIN> line 104.
> Unsure whether entry 107 is a repeating entry or not: 1  1 1 at
> budgetroid.pl line 40, <STDIN> line 106.
> Unsure whether entry 291 is a repeating entry or not:    1 at
> budgetroid.pl line 40, <STDIN> line 287.

It seems that a few things about monthly transactions have changed
since I made this script - however, when the script was written (Nov
2009-Jan 2010), Budgetroid was at version 1.4, and now I see it is at
version 2.5.

I'll look into fixing my script once I'm done with my exams and I have
some spare time for coding. I'll send you an email when I have made
some fixes, and I'll let this mailing list know when I have something
working again.

I hope the output from the script is still useful, and I'm glad to
hear that you're getting some use out of it.

All the best
Mathias Rav

Franz

unread,
Jun 8, 2011, 8:29:34 AM6/8/11
to Budgetroid
Thanks a lot,

If i had one suggestion, it would be to see more clearly the
categories of every line : the html output shows only the color of the
category and It does not speak to me as I don't use this method... Or
better, to sort the lines per category. Example :

September 2010
Category 1 : 525$
Item 1
Item 2
Item 3
Item 4

Category 2 : 312$
Item 1
Item 2

and so on...

But I go perhaps too far... Thanks anyway for your usefull tool :)


François
Reply all
Reply to author
Forward
0 new messages