Package Pyblio :: Package Cite :: Package WP :: Class IWordProcessor
[hide private]
[frames] | no frames]

Class IWordProcessor

source code

Interface a WordProcessor object should provide

Instance Methods [hide private]
 
connect(self)
Establish a connection to the word processor.
source code
 
disconnect(self)
Disconnect from the word processor.
source code
 
is_connected(self)
Check if the connection is still up.
source code
 
cite(self, keys)
Insert a list of references at the current position of the document.
source code
 
fetch(self)
Retrieve the list of (uid, key) tuples previously inserted in the current document with self.cite().
source code
 
update_keys(self, keymap)
Update the keys shown to the user.
source code
 
update_biblio(self)
Return a generate object ready to accept instructions to rebuild the current bibliography list.
source code
Method Details [hide private]

connect(self)

source code 

Establish a connection to the word processor.

This binds this object to a specific document in the word processor. No other operation except is_connected can take place before connection.

cite(self, keys)

source code 

Insert a list of references at the current position of the document.

keys is a list of tuples (uid, key) where uid is the identifier of the record in the database, and key is the key to be shown to the user.

fetch(self)

source code 

Retrieve the list of (uid, key) tuples previously inserted in the current document with self.cite().

The tuples are ordered according to the position of the references in the text.

If the WP does not support this operation, returns None (not []).

update_keys(self, keymap)

source code 
Update the keys shown to the user. keymap is a dictionary that provides, for each uid having changed, the new key to be displayed.

update_biblio(self)

source code 
Return a generate object ready to accept instructions to rebuild the current bibliography list. An example of such a generator is provided by Pyblio.Format.OpenOffice.Generator.