Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Static Private Attributes
PortalTransforms.transforms.lynx_dump.old_lynx_dump Class Reference
Inheritance diagram for PortalTransforms.transforms.lynx_dump.old_lynx_dump:
Inheritance graph
[legend]
Collaboration diagram for PortalTransforms.transforms.lynx_dump.old_lynx_dump:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def convert
def invokeCommand
def astext

Static Public Attributes

tuple inputs = ('text/html',)
string output = 'text/plain'
string binaryName = "lynx"
string binaryArgs = "-dump"

Static Private Attributes

 __implements__ = itransform
string __name__ = "lynx_dump"

Detailed Description

Definition at line 23 of file lynx_dump.py.


Constructor & Destructor Documentation

Definition at line 33 of file lynx_dump.py.

00033 
00034     def __init__(self):
00035         commandtransform.__init__(self, binary=self.binaryName)


Member Function Documentation

Definition at line 50 of file lynx_dump.py.

00050 
00051     def astext(self, outname):
00052         txtfile = open("%s" % (outname), 'r')
00053         txt = txtfile.read()
00054         txtfile.close()
00055         return txt

Here is the caller graph for this function:

def PortalTransforms.transforms.lynx_dump.old_lynx_dump.convert (   self,
  data,
  cache,
  kwargs 
)

Definition at line 36 of file lynx_dump.py.

00036 
00037     def convert(self, data, cache, **kwargs):
00038         kwargs['filename'] = 'unknown.html'
00039         tmpdir, fullname = self.initialize_tmpdir(data, **kwargs)
00040         outname = "%s/%s.txt" % (tmpdir, orig_name)
00041         self.invokeCommand(tmpdir, fullname, outname)
00042         text = self.astext(outname)
00043         self.cleanDir(tmpdir)
00044         cache.setData(text)
00045         return cache

Here is the call graph for this function:

def PortalTransforms.transforms.lynx_dump.old_lynx_dump.invokeCommand (   self,
  tmpdir,
  inputname,
  outname 
)

Definition at line 46 of file lynx_dump.py.

00046 
00047     def invokeCommand(self, tmpdir, inputname, outname):
00048         os.system('cd "%s" && %s %s "%s" 1>"%s" 2>/dev/null' % \
00049                (tmpdir, self.binary, self.binaryArgs, inputname, outname))

Here is the caller graph for this function:


Member Data Documentation

Definition at line 24 of file lynx_dump.py.

string PortalTransforms.transforms.lynx_dump.old_lynx_dump.__name__ = "lynx_dump" [static, private]

Definition at line 26 of file lynx_dump.py.

Definition at line 31 of file lynx_dump.py.

Definition at line 30 of file lynx_dump.py.

Definition at line 27 of file lynx_dump.py.

Definition at line 28 of file lynx_dump.py.


The documentation for this class was generated from the following file: