The PEAK Developers' Center   HelpOnMacros UserPreferences
 
HelpContents Search Diffs Info Edit Subscribe XML Print View

  1. Macros
    1. Search macros
    2. Navigation
    3. System information
    4. Others
  2. Example Display

1 Macros

Macros allow the insertion of system features into normal wiki pages; the only thing that makes those pages special is that they contain macros. If you edit pages like RecentChanges or SystemInfo, you'll see what that means.

For more information on the possible markup, see HelpOnEditing.

1.1 Search macros

MacroDescriptionExample
[[TitleSearch]] search the page titles See the FindPage
[[FullSearch]] search the page contents See the FindPage
[[FullSearch()]] search for the current title in all pages (like clicking on the page title) See the CategoryCategory page
[[FullSearch('text')]] search for "text" in all pages Search for FullSearch:
  1. HelpOnMacros . . . . 6 matches
  2. HelpOnActions . . . . 3 matches
  3. SiteNavigation . . . . 1 match
  4. FindPage . . . . 1 match
  5. CategoryCategory . . . . 1 match
[[GoTo]] directly go to the page you enter See the FindPage
[[PageList(regex)]] list of pages whose title matches the regex See the HelpIndex

1.2 Navigation

MacroDescriptionExample
[[RecentChanges]] a list of recently edited pages See RecentChanges
[[TitleIndex]] an index of all page titles See TitleIndex
[[WordIndex]] an index of all words in page titles See WordIndex
[[WantedPages]] list links to non-existent pages See WantedPages
[[OrphanedPages]] list pages no other page links to See OrphanedPages
[[AbandonedPages]] list pages that were not edited for the longest time See AbandonedPages
[[RandomPage]] a link to a random page MiscNotes
[[RandomPage(#)]] links to a number of random pages Two random pages:
[[TableOfContents]] display a local table of contents See below
[[Anchor(anchorname)]] macro to insert anchors into a page #here

1.3 System information

MacroDescriptionExample
[[InterWiki]] a list of all known InterWiki names InterWiki
[[SystemInfo]] info on the wiki, the python interpreter and the host system SystemInfo
[[PageCount]] current page count 162 pages
[[PageSize]] list the sizes of all pages See PageSize
[[StatsChart(type)]] shows statistical charts (currently defined types: hitcounts, pagesize, useragents) See EventStats and subpages
[[SystemAdmin]] Web interface to wiki administration (not completed yet as of version 1.0) See SystemInfo

1.4 Others

MacroDescriptionExample
[[Icon(image)]] display system icons See HelpOnNavigation
[[UserPreferences]] display a user preferences dialog See UserPreferences
[[BR]] insert a line break 1st line
2nd line
[[Include(FrontPage[,"heading"[,level]])]] include contents of another page

NOTE: Due to rampant spammer edits, this wiki is no longer open to public editing. Email me your user name and login ID if you want to get access. (If your name isn't shown in the upper right corner of this page, you can click on "UserPreferences" to sign up (with a valid e-mail address) and log in. However, to actually edit anything, I'll need to grant permission to your login first.)

Introduction to PEAK

peak-at-a-glance.png

Getting Started

When beginning to learn PEAK, the best order in which to explore the modules is: binding, config, and naming. These core modules provide the component-oriented framework upon which most other PEAK modules are built, and they will be used extensively within any application built with PEAK.

The next layer to explore should probably be the runtime modules: ?running, commands, and logs. Combined with the previous core modules, the runtime modules provide most of the machinery needed for building PEAK applications.

The storage module provides numerous storage management features, including high level relational database connectivity, a general transaction framework with ACID assurance and two-phase commit, and a ?DataManager framework for high level object persistence to multiple storage media.

The model module provides a framework for implementing the ?DomainModel pattern, which is based on high level "business objects" isolated from storage concerns.

The events module provides an "event-driven" programming framework that supports ultralight "microthreads" implemented via generators. It can stand alone or can be used atop Twisted for a more intuitive approach to asynchronous programming.

Further modules to explore include the ?util, ?metamodels, and ?security modules. The ?web, ?net, and ?query modules are under development.

Additional notes in GettingStartedWithPeak.

Tutorials

The IntroToPeak tutorial is currently the best way to get started with PEAK. It demonstrates the use of many of PEAK's features by building a small application step-by-step.

Other tutorials include:

Concepts

Latest Project Docs from CVS

Miscellaneous

(To be categorized: AddingPsycopgSupport, DistributePeakApplications, MiscNotes, Glossary, CookBook, MailingListHighlights, IrcHighlights)

Using the Wiki

You can edit any page by pressing the link at the bottom of the page. Capitalized words joined together form a WikiName, which hyperlinks to another page. The highlighted title searches for all pages that link to the current page. Pages which do not yet exist are linked with a question mark: just follow the link and you can add a definition.

To learn more about what a WikiWikiWeb is, read about [MoinMoin]WhyWikiWorks and the [MoinMoin]WikiNature. Also, consult the [MoinMoin]WikiWikiWebFaq.


Interesting starting points:

 
[goto FrontPage]
[[FootNote(text)]] Add a footnote (the text cannot contain any wiki markup), or explicitely display collected footnotes when no args are given See HelpOnPageCreation for an example
[[Date(timestamp)]] display a timestamp according to system settings 2024-03-28
[[DateTime(timestamp)]] display a timestamp1 according to user settings 2024-03-28 15:45:49
[[GetText(text)]] loads I18N texts (mainly intended for use on Help pages) "EditText" is translated to "EditText"
[[TeudView]] useful for intranet developer wikis, a means to view pydoc documentation, formatted via a XSLT stylesheet, for details see [EfnetPythonWiki]TeudProject See [EfnetPythonWiki]TeudViewer?module=MoinMoin.macro.TeudView

____
   1 "timestamp" can be empty (current time), a number of seconds since 1970 (unix timestamp), or a W3C time specification ("2002-01-23T12:34:56").

2 Example Display

We don't show examples for all macros here, because that would make this page quite long. Here is is the replacement text for the [[SystemInfo]] macro:
PythonPowered
EditText of this page (last modified 2007-01-13 17:08:12)
FindPage by browsing, title search , text search or an index
Or try one of these actions: AttachFile, DeletePage, LikePages, LocalSiteMap, SpellCheck