|
def | __init__ (self, category, tags=[], formname='default', text='', preformatted=False, private=False, textile=False, related=None) |
|
def | setValue (self, name, value) |
|
def | setAuthor (self, name) |
|
def | addAttachment (self, name, filename, data=None) |
|
def | addImage (self, name, filename, image=None) |
|
def | addSubject (self, text) |
|
def | xshow (self) |
|
Definition at line 166 of file ECLAPI.py.
def ECLAPI.ECLEntry.__init__ |
( |
|
self, |
|
|
|
category, |
|
|
|
tags = [] , |
|
|
|
formname = 'default' , |
|
|
|
text = '' , |
|
|
|
preformatted = False , |
|
|
|
private = False , |
|
|
|
textile = False , |
|
|
|
related = None |
|
) |
| |
Definition at line 169 of file ECLAPI.py.
169 private=
False, textile=
False, related=
None):
175 self.
_entry = etree.Element(
'entry', category=category)
177 self._entry.attrib[
'formatted']=
'yes' 179 self._entry.attrib[
'html_safe']=
'no' 181 self._entry.attrib[
'private'] =
'yes' 183 self._entry.attrib[
'related'] =
'%s' % (related,)
188 textfield = etree.SubElement(self.
_form,
'field', name=
'text')
190 textfield.text = text
192 etree.SubElement(self.
_entry,
'tag', name=tag)
def ECLAPI.ECLEntry.addAttachment |
( |
|
self, |
|
|
|
name, |
|
|
|
filename, |
|
|
|
data = None |
|
) |
| |
Definition at line 203 of file ECLAPI.py.
205 field = etree.SubElement(self.
_entry,
'attachment', type=
'file', name=name, filename=os.path.basename(filename))
208 field.text = base64.b64encode(data)
210 f =
open(filename,
'r') 212 field.text = base64.b64encode(b) def addAttachment(self, name, filename, data=None)
int open(const char *, int)
Opens a file descriptor.
def ECLAPI.ECLEntry.addImage |
( |
|
self, |
|
|
|
name, |
|
|
|
filename, |
|
|
|
image = None |
|
) |
| |
Definition at line 215 of file ECLAPI.py.
217 field = etree.SubElement(self.
_entry,
'attachment', type=
'image', name=name, filename=os.path.basename(filename))
221 field.text = base64.b64encode(image)
223 f =
open(filename,
'r') 225 field.text = base64.b64encode(b) int open(const char *, int)
Opens a file descriptor.
def addImage(self, name, filename, image=None)
def ECLAPI.ECLEntry.addSubject |
( |
|
self, |
|
|
|
text |
|
) |
| |
Definition at line 228 of file ECLAPI.py.
229 self._entry.attrib[
'subject'] = text
def addSubject(self, text)
def ECLAPI.ECLEntry.setAuthor |
( |
|
self, |
|
|
|
name |
|
) |
| |
Definition at line 200 of file ECLAPI.py.
201 self._entry.attrib[
'author'] = name
def setAuthor(self, name)
def ECLAPI.ECLEntry.setValue |
( |
|
self, |
|
|
|
name, |
|
|
|
value |
|
) |
| |
Definition at line 194 of file ECLAPI.py.
196 field = etree.SubElement(self.
_form,
'field', name=name)
def setValue(self, name, value)
def ECLAPI.ECLEntry.xshow |
( |
|
self | ) |
|
ECLAPI.ECLEntry._category |
|
private |
ECLAPI.ECLEntry._formname |
|
private |
The documentation for this class was generated from the following file: