TestTables >> Virtual_Exercise_Tour >> TestSlideShow >> To_do_chart >> BugList 

TB Wiki

Login

Snapshot Help

The Snapshot processor takes the value from an existing item, and appends it to another place. This is primarily intended for taking snapshots of dynamic or calculated data (like a stock quote, or the number of bugs), and placing them in a table block to be used to chart results over time.

The source can be any item reference in the wiki. For example: page = SomePageName section = SomePageName#section_name block = SomePageName:BlockName record = SomePageName:TableBlockName:record_id field = SomePageName:TableBlockName:record_id::field_name block_field = SomePageName:TableBlockName:::field_name

Data is stripped before saving it to the destination.

Processor arguments are:

  • source={source} - the location to get the data from
  • evaluate=True - indicates the content should be evaluated prior to inclusion
    • this means processing any table formulas, tbwiki processors and macros
  • destination={destination} - the place to append the data to
  • format = a format string for the data. It should have named format variables. You should always have a variable named 'content'. For example:
    • %(content)s = the content from the source
    • %(timestamp)s = the time when the snapshot was taken
    • %(user)s = the user name of the person referencing the page

Example usage:

{{{#!Snapshot
source=FinancePage:GoogleStockQuoteBlock
destination=FinancePage:GoogleData
format="""
||%(timestamp)s||%(content)s||"""
}} }


{{{#!Snapshot
source=Uptime-Page#Status_section
evaluate
destination=Uptime-Page:UptimeTable
format="""
||%(timestamp)s||%(content)s||"""
}} }

Back to page: SystemInfo

TBWiki engine 1.9.3 by Tim Bird