Lodahl's blog: Macroprogramming with Python

15 March 2011

Macroprogramming with Python

I've been doing some investigations on how to do macroprograming with Python. I was so lucky to find a instant word counter from https://bitbucket.org/yawaramin/oo.o-live-word-count/overview and started to hack on it. Hacking other peoples code is a very good way to get into new areas of coding.

I succeeded to improve the macro by adding a graphical progress bar.

The code will of cause be added to upstream ;-)

4 comments:

Anonymous said...

Very neat! Much less important than word count is character count, but maybe in a future version a word/character toggle will be added?

Yawar said...

Leif,

I just wanted to (belatedly!) thank you for your awesome work on the word count macro. I'm really happy with the progress bar and other improvements, and I think a lot of other people are too. Do you have any more ideas for making it better? `Anonymous' above has an interesting (and doable) idea--toggle between word and character counts. I've created an issue to keep track of it: https://bitbucket.org/yawaramin/oo.o-live-word-count/issue/7/implement-character-count

Best,

Yawar

Filip said...

Hey, guys! Great work! Any chance you would have the time to have a look at issue #9 over at bitbucket..? Thanks!

Anonymous said...

I too like to hack. I wanted a session word count so I took out the selection count and recorded the document word count when the macro is started. That starting word count is subtracted from the document word count. Every time the macro is run the word count shows zero.

Session Word Count Macro for LibreOffice Writer
http://pastebin.com/eSHFfhNX