OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Would a batch document converter macro be useful?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  

Would a batch document converter macro be useful?
No
44%
 44%  [ 4 ]
Maybe
11%
 11%  [ 1 ]
Yes
44%
 44%  [ 4 ]
useful only to Cowboy Neal
0%
 0%  [ 0 ]
Total Votes : 9

Author Message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Sat Sep 20, 2003 6:43 am    Post subject: Would a batch document converter macro be useful? Reply with quote

I am considering writing a program to convert a batch of documents from one type to another.

Recently in the Macros and API section someone asked and I answered how to convert a batch of Excel files into OOo Calc. Another user wanted to convert between various combinations of RTF, SXW and TXT.

I am thinking that the program would work sort of like an AutoPilot. You fill out first page, click Next, fill out next page, click Next, etc. until the program has collected enough information to know what you want to do.

My thinking is that such a tool would be written in Basic. (Yuk!) The program would be delivered as a Draw document (my favorite!), much like Danny's Draw Power Tools. The reason behind both of the previous statements is that this makes the program extremely easy to access by ordinary OOo users. Open a document, click a button. No messing with making sure the Python UNO bridge is installed, or the scripting framework (for other languages). No setting up OOo to listen for a remote connection from a Java program (like for my Maze drawing generator). No having to install a component with pkgchk, etc. (Although I am working towards other tools that do require one of the foregoing options.)

Basic has the easy-access I mentioned above, but has one serious drawback. No recursion. (among other serious problems) Therefore such a tool could only process the top level files in a folder, but could not recursively process all files in subfolders.

Opinions?
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Gabor
Guest





PostPosted: Sat Sep 20, 2003 6:51 pm    Post subject: Very much so! Reply with quote

Would a batch document converter macro be useful?
Very much so!
The one downloadable from
http://kosh.datateamsys.com/~danny/OOo/Tools/
(Index of /~danny/OOo/Tools)
is definitely a major present and a very fine tool for anybody who needs to convert documents frequently and the source folder and the output folder varies.
I tried it and it is simple to use and the result is excellent and quick.
Thanks Danny!
Back to top
akohlsmith
General User
General User


Joined: 29 Apr 2003
Posts: 28

PostPosted: Sun Sep 21, 2003 10:10 am    Post subject: Reply with quote

The reason I voted 'maybe' was because the converters as they are now work most of the time. The batch converter would have to pass over those files it could not convert or that the convert process hung on (I have a large Excel graph that OO consistently hangs on opening) and then give that information to the user on completion of the batch conversion process.

Nothing is more irritating than batch converters that don't handle failures well.
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Sun Sep 21, 2003 12:48 pm    Post subject: Reply with quote

I put up a newer version.

http://kosh.datateamsys.com/~danny/OOo/Tools/

Changed since yesterday....

* Gives error messages if pathnames are of files, or otherwise no valid folders.
* Browse buttons by the folder pathnames. (I discovered the FolderPicker service.)
* More Calc export filters can be used
* Progress bar during conversion
* During conversion, documents are opened Hidden, so that they don't flash up on screen.

So far, about a ten hours of work in it. This was my first multi-page dialog in OOo.

Need to be done....
* Test that it works on Windows (I wrote it at home, therefore, only tested on Linux.)
* Make program capable of using every single supported OOo filter.
* Error handling during conversion, as suggested by akohlsmith

I've never really gotten into studying OOo's filters before. The list of filters supported by OOo is very impressive.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Gabor
Super User
Super User


Joined: 21 Sep 2003
Posts: 610
Location: Hungary (E-Europe)

PostPosted: Sun Sep 21, 2003 3:04 pm    Post subject: Strange Reply with quote

Until now the transformation of documents TO sxw was not within my scope of interest.
However, trying some of the numerous possibilities I observed that
the transformation of [b]txt[/b] to [b]sxw[/b] results in [b]rtf[/b], although the file extension will be [b]sxw[/b]
and
the transformation of [b]rtf[/b] to [b]sxw[/b] results in [b]rtf[/b], although the file extension will be [b]sxw[/b]
In the second case we may think that something simply did not happen. But in the first case something did happen - yet it was not we expected.
It is not quite important since OOo opens anything, but still strange, isn't it?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group