Re: Remote Control of Abiword

From: Martin Sevior <msevior_at_gmail.com>
Date: Thu Dec 30 2010 - 11:29:42 CET

Hi Hal,

On Thu, Dec 30, 2010 at 6:20 PM, Hal Vaughan <hal@halblog.com> wrote:
>
> The system I'm redesigning used to use OpenOffice, but that uses way too much memory now that I'm going to move it to embedded systems (probably on something like a Soekris 5501 box).  Originally, when this system (in the first iteration, version 1.0) was all in Perl, I used Abiword.  Essentially I have to do a mailmerge with data my clients have and print out letters and reports.  I used to have a Perl script read the original source file, use regexes to do a search and replace of all the fields for mailmerge (which included on reports), then save a new version of the file.  When I had all the files prepared, I used the command line (through Perl) to print out all the files.  I can't remember the exact method I used, but this was back in 2002 or so.  At the time there was no way to control Abiword, other than running it from the command line with a command specified.
>
> These embedded systems will be running Debian Linux and I'm doing my development on an iMac with OS X 10.6.5 and using Parallels for virtual systems.
>
> I've got other questions on other subjects I'll ask in other emails, but here's what I'm trying to learn about now:
>
> 1) I see that Abiword uses a stunning 16 MB of RAM, possibly as little as 8 MB on embedded systems.  Can you please confirm I'm reading that properly? (Considering that OpenOffice uses 512 MB, and that 16 MB is tiny now days, I want to be sure.)  Also, is the reason for 8 MB on embedded systems because there's no display?
>

An empty, just loaded document on Linux uses 4.8 MG of memory and 18
Mbytes of shared memory. It is pssois the initial load on a system
that uses gtk shared libraries. Starting abiword with AbiCommand (ie
no display) starts with 2.8 MB plus 13 MB of shared memory. This is
AbiWord-2.8.6 as distributed with Fedora 14.

> 2) Do I need to do anything special to start Abiword without the display?
>

abiword --plugin=AbiCommand

Will open a command line interface to AbiCommand. You can feed
commands on the command line this way. We use this to power our
http://abicollab.net website which amongst other things does document
conversions from one format to another.

> 3) I can't find the plugin AbiCommand.  Granted, right now I'm using the OS X version of Abiword, which is a few versions behind, but I can't find it as a plugin from within the program when I look at the plugin lists and I don't see where, on the file server, the plugins are stored.  There was also no chance to select plugins during the install.
>

AbiCommand only works on Linux versions of abiword. We have good
support from Debian for Abiword.

> 4) If I want to control Abiword from Perl, is it similar to PHP, where I would run it, telling it to accept input from a file handle, then print my commands to that file handle?
>

Yes. See above with the AbiCommand example.

> 5) Is there any way to communicate with Abiword while it is running through any kind of network socket, or is the best way to communicate with it while it's in memory to use AbiCommand?
>

We don't have a network socket interface though uwog has implemented
several powerful websites via AbiCommand.

>
> I've got more questions, but I feel like I'm throwing a lot at everyone as it is.  My main goal is to be able to control Abiword from Perl (or maybe Java) so I can load it, then either have it do a mailmerge, or do one controlled by my program (manually doing search and replace), then either printing out the files or saving them as PDFs for printing later.  If the questions I'm asking aren't leading to a good way to do this, I'm open to suggestions.
>

You can do search and replace with the AbiCommand interface if you
like. Otherwise manipulating the *.abw files works fine. uwog has
implemented a few websites that do XSLT manipulations of *.abw files.

One other point is that our *.doc import filters from 2.8.0 up to
2.8.6 uses wv that has a bug that prevents from importing tables. This
is fixed in wv in svn trunk. Sometime soon we will release a new
version of wv abd abiword with this bug fixed.

> Any help is appreciated!
>

Good Luck!

Martin

>
> Thank you.
>
>
>
> Hal-----------------------------------------------
> To unsubscribe from this list, send a message to
> abiword-user-request@abisource.com with the word
> unsubscribe in the message body.
>
-----------------------------------------------
To unsubscribe from this list, send a message to
abiword-user-request@abisource.com with the word
unsubscribe in the message body.
Received on Thu Dec 30 11:30:32 2010

This archive was generated by hypermail 2.1.8 : Thu Dec 30 2010 - 11:30:32 CET