Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
MoinMoin.script.migration._conv160a.PageRev Class Reference

List of all members.

Public Member Functions

def __init__
def read
def write
def copy

Public Attributes

 request
 pagename
 rev_dir
 rev
 renames

Detailed Description

a single revision of a page 

Definition at line 205 of file _conv160a.py.


Constructor & Destructor Documentation

def MoinMoin.script.migration._conv160a.PageRev.__init__ (   self,
  request,
  pagename,
  rev_dir,
  rev 
)

Definition at line 207 of file _conv160a.py.

00207 
00208     def __init__(self, request, pagename, rev_dir, rev):
00209         self.request = request
00210         self.pagename = pagename
00211         self.rev_dir = rev_dir
00212         self.rev = rev


Member Function Documentation

def MoinMoin.script.migration._conv160a.PageRev.copy (   self,
  rev_dir,
  renames,
  convert = False,
  new_rev = None 
)

Definition at line 232 of file _conv160a.py.

00232 
00233     def copy(self, rev_dir, renames, convert=False, new_rev=None):
00234         self.renames = renames
00235         data = self.read()
00236         self.write(data, rev_dir, convert, new_rev)
00237 

Here is the caller graph for this function:

Definition at line 213 of file _conv160a.py.

00213 
00214     def read(self):
00215         fname = opj(self.rev_dir, '%08d' % self.rev)
00216         f = file(fname, "rb")
00217         data = f.read()
00218         f.close()
00219         data = data.decode(config.charset)
00220         return data

Here is the caller graph for this function:

def MoinMoin.script.migration._conv160a.PageRev.write (   self,
  data,
  rev_dir,
  convert,
  rev = None 
)

Definition at line 221 of file _conv160a.py.

00221 
00222     def write(self, data, rev_dir, convert, rev=None):
00223         if rev is None:
00224             rev = self.rev
00225         if convert:
00226             data = markup_converter(self.request, self.pagename, data, self.renames)
00227         fname = opj(rev_dir, '%08d' % rev)
00228         data = data.encode(config.charset)
00229         f = file(fname, "wb")
00230         f.write(data)
00231         f.close()

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 209 of file _conv160a.py.

Definition at line 233 of file _conv160a.py.

Definition at line 208 of file _conv160a.py.

Definition at line 211 of file _conv160a.py.

Definition at line 210 of file _conv160a.py.


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