FrontPage 

TB Wiki

Login

Regression Test

Expected HTML for page "ItemNotes"


expected html
nothing
t1Here are some notes on the new item refactoring:t
2<p>
3I'm writing some general-purpose routines to support managing content
4from multiple locations, in multiple formats.
5<p>
6<h2><a name="location">location</a>
7<span align=right class="section_edit_link">[<a href="/tbwiki/ItemNotes?action=edit&section=location">edit section</a>]</font></span>
8</h2>
9A tbwiki "item" is a logical unit of the wiki, and can be one of the
10following:
11<ul><li>page
12<li>block
13<li>section
14<li>row
15<li>field
16</ul>
17<p>
18A page is a whole file. A block is an item inside a file, defined by the
19triple-brace syntax.  A section is an item inside a file, defined by the
20header syntax.  A row is something that can be inside a page, block, or section.
21This is used to express moin table rows.  A field can be a single-line entry
22appearing on a page, and defined by the definition list syntax.
23<p>
24<h2><a name="content_format">content_format</a>
25<span align=right class="section_edit_link">[<a href="/tbwiki/ItemNotes?action=edit&section=content_format">edit section</a>]</font></span>
26</h2>
27Each item is expressed in the raw text in a format:
28<ul><li>tbmarkup - this is page data, and may hold sub-items, but does not itself express a record
29<li>moin_table - this is a set of rows of moin-formatted table lines (starting with ||)
30<li>tbattr - this is a single record in my 'config' format (supporting single and multi-line entries, and comments
31<li>tbwikidb - this represents data attributes with definition entries and sections (in tbmarkup)
32<li>json - usually whole-page, supports single, multi-line and list entries
33<li>yaml - usually whole-page, supports single, multi-line and list entries, as well as comments and ordering
34<li>moin_table_row - this defines a single record in a moin_table
35</ul>
36<p>
37<h2><a name="item_class">item_class</a>
38<span align=right class="section_edit_link">[<a href="/tbwiki/ItemNotes?action=edit&section=item_class">edit section</a>]</font></span>
39</h2>
40A new set of routines is supposed to replace all previous access and update
41routines for content, and allow different systems to access data items in
42the wiki in a uniform manner.  The different systems that need to access
43the items are:
44<ul><li>processors
45<li>tables
46<li>data handler (for tbclient)
47<li>other external engines (Fuego)
48</ul>
49<p>
50The idea is that items are addressable with a uniform resource string.
51<p>
52<h2><a name="item_class_routines">item_class routines</a>
53<span align=right class="section_edit_link">[<a href="/tbwiki/ItemNotes?action=edit&section=item_class_routines">edit section</a>]</font></span>
54</h2>
55Here are the functions supported by the new item_class:
56<ul><li>__init__(name, location, source_file, parent)
57<li>get_content() - load the content from it's source
58<li>evalute_content() - execute processor, if any, for the content
59<li>to_html() - convert item to html (for output)
60<li>content_to_data() - convert content into data (parse it)
61<li>data_to_content() - convert data into content (format it)
62<li>update() - update one element of the data with a new value
63<li>set_content() - push this content to parent (container item)
64<li>write_content() - put content back on disk
65</ul>
66<p>
67internal helper routines:
68<ul><li>data_to_html() - convert data representation to html
69</ul>
70<p>
71<h2><a name="example_uses">example uses</a>
72<span align=right class="section_edit_link">[<a href="/tbwiki/ItemNotes?action=edit&section=example_uses">edit section</a>]</font></span>
73</h2>
74<ul><li>in main page wiki:
75<ul><li>show:
76<ul><li>page = item_class(req.page_name, "page", req.page_filename)
77<li>html = page.to_html()
78</ul><li>in section edit_form:
79<ul><li>page = item_class(req.page_name, "page", req.page_filename)
80<li>section = item_class(section_name, "section", req.page_filename, page)
81<li>put section.content into edit form
82</ul><li>in section_edit action:
83<ul><li>page = item_class(req.page_name, "page", req.page_filename)
84<li>section = item_class(section_name, "section", req.page_filename, page)
85<li>section.update(value_from_form)
86<li>section.set_content()
87<li>page.write_content()
88</ul><li>in Processor:
89<ul><li>parse_conf(block)
90</ul><li>in data_handler:
91<ul><li>get_page_item
92<li>put_page_item
93</ul><li>in table:
94<ul><li>for source in source_list:
95<ul><li>get_record(source)
96<ul><li>page = item_class(req.page_name, "page", req.page_filename)
97<li>record = make_record(page)
98<ul><li>data = page.content_to_data()
99<li>add field stuff
100</ul></ul><li>format for table
101</ul>
102</ul>
103</ul>
104</ul>
105<p>
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

Differences for page "ItemNotes"


expected html
generated html
t No Differences Found t No Differences Found 
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

Update saved output

Back to diff page

Return to Regression_Test page
TBWiki engine 1.9.3 by Tim Bird