TEXT   14

wiki

Guest on 28th June 2022 09:48:15 AM

  1. Wiki
  2. ====
  3.  
  4. The Wiki module primarily exports the `WikiPage` class:
  5.  
  6.     class `WikiPage(object)`:
  7.         WikiPage is a class to represent one page in a WikiWikiWeb [#]_.
  8.         The page may or may not yet exist -- that is, it may not yet
  9.         have content.
  10.        
  11.         .. [#] http://c2.com/cgi-bin/wiki
  12.        
  13.         It has the following properties and methods:
  14.        
  15.             `html`:
  16.                 A read-only property giving the HTML for the page.
  17.                 If the page does not yet have content the text
  18.                 ``"This page has not yet been created"`` is returned.
  19.             `text`:
  20.                 The text for the page.  To save new text, simply
  21.                 assign to this property.
  22.             `title`:
  23.                 The title of the page.
  24.             `name`:
  25.                 The name of the page -- a canonical identifier.
  26.                 Related to the title, but not necessarily the
  27.                 same.
  28.             `exists()`:
  29.                 Does this page have content yet?
  30.             `modifiedDate()`:
  31.                 Date modified (integer timestamp)
  32.             `modifiedDateText()`:
  33.                 Text representation of modified date
  34.             `preview(text)`:
  35.                 Returns an HTML preview of the text
  36.  
  37. There are also several searching methods:
  38.  
  39.     `allPages()`:
  40.         All pages with content in the system
  41.     `recentPages()`:
  42.         All pages, sorted by date modified, most recent first
  43.     `search(text)`:
  44.         Search titles and bodies of pages for ``text``, returning list
  45.         of pages
  46.     `searchTitles(text)`:
  47.         Search page titles for ``text``, returning list of pages
  48.  
  49. There is one module global to be printed at the top of
  50. every Wiki page:
  51.  
  52.     `css`:
  53.         The HTML to put the proper CSS at the top of the page.  This
  54.         should be put in the ``<head>`` section of the page.

Raw Paste


Login or Register to edit or fork this paste. It's free.