_bug0004_transforms >> General_To_Do_List_transforms 

TB Wiki

Login

Regression Test

Expected HTML for page "DocInternalAPI"


expected html
nothing
t1 t
2<table align="right"><tr><td><div class="toc">
3Contents:
4<ul>
5  <li><a href="#tbwiki_engine.py">tbwiki_engine.py</a></li>
6  <ul>
7    <li><a href="#Classes_overview">Classes&nbsp;overview</a></li>
8    <li><a href="#Functions">Functions</a></li>
9    <ul>
10      <li><a href="#main(req):_details">main(req):&nbsp;details</a></li>
11    </ul>
12    <li><a href="#Classes_details">Classes&nbsp;details</a></li>
13  </ul>
14  <li><a href="#table.py">table.py</a></li>
15  <ul>
16    <li><a href="#Classes_overview___2">Classes&nbsp;overview</a></li>
17    <li><a href="#Functions___2">Functions</a></li>
18    <li><a href="#Classes_details___2">Classes&nbsp;details</a></li>
19  </ul>
20  <li><a href="#data_scan.py">data_scan.py</a></li>
21  <li><a href="#vgchart.py">vgchart.py</a></li>
22</ul>
23</div></td></tr></table>
24<p>
25Here are some details about the operation of the code and the internal APIs
26available:
27<p>
28<h1><a name="tbwiki_engine.py">tbwiki_engine.py</a>
29<span align=right class="section_edit_link">[<a href="/tbwiki/DocInternalAPI?action=edit&section=tbwiki_engine.py">edit section</a>]</font></span>
30</h1>
31<p>
32<h2><a name="Classes_overview">Classes overview</a>
33<span align=right class="section_edit_link">[<a href="/tbwiki/DocInternalAPI?action=edit&section=Classes_overview">edit section</a>]</font></span>
34</h2>
35<ul><li><b>class stub_class</b> - formerly used as a flat-attribute class, like a struct, for the wiki config
36<li><b>class config_class</b> - used for the wiki config
37<li><b>class user_class</b> - used for user accounts
38<li><b>class req_class</b> - used for the main request data
39<li><b>class data_class</b> - used for data output into headers, footers, and pages
40<li><b>class parse_state</b> - holds the context for the current parse
41</ul>
42<p>
43<h2><a name="Functions">Functions</a>
44<span align=right class="section_edit_link">[<a href="/tbwiki/DocInternalAPI?action=edit&section=Functions">edit section</a>]</font></span>
45</h2>
46<pre>
47 * def html_error(msg):
48 * def html_escape(str):
49 * def make_link(href, cover):
50 * def add_to_log(req, action, timestamp, message):
51 * def scan_log(req, page_name):
52 * def get_env(key):
53 * def show_env(env, full=0):
54 * def authenticate_user(req, name, password):
55 * def create_user(req, name, password):
56 * def html_bullet(state, indent, rest):
57 * def show_close(state):
58 * def html_close(state):
59 * def do_search(req, patc):
60 * def do_diff(req, page1, page2):
61 * def get_section(data, section):
62 * def get_named_block(lines, block_name):
63 * def put_named_block(lines, block_name, new_content):
64 * def set_section(data, section, section_text):
65 * def block_to_html(req, data):
66 * def line_to_html(state, line, continuation=0):
67 * def save_uploaded_file(req, form_field, upload_dir):
68 * def main(req)
69</pre>
70<h3><a name="main(req):_details">main(req): details</a>
71<span align=right class="section_edit_link">[<a href="/tbwiki/DocInternalAPI?action=edit&section=main(req):_details">edit section</a>]</font></span>
72</h3>
73<p>
74def main(req):
75<p>
76Main steps:
77<ul><li>get the URL and POST query data
78<li>determine what action should be performed.  This defaults to "show"
79   and is specified in the URL with "action=&lt;foo&gt;"
80<li>parse the page name out of the URL or query
81<li>set the user
82<li>load plugins (macros and processors)
83<li>do main action loop, which is a "while not handled:"
84<ul><li>check permissions (actions that need read and actions that need write)
85<li>show
86<ul><li>show header
87<li>read page data
88<li>convert to html
89<li>print html
90<li>set handled and break!
91</ul><li>raw - show unconverted text (just html_escape it)
92<li>split - print raw and formatted content side-by-side, for each paragraph
93<li>edit - show an edit form
94<li>save - save the data from an edit form
95<li>links_here - show pages that link to this one (using do_search)
96<li>search - show pages that match search term
97<li>history - scan backups directory and show table of previous page versions
98<li>info - show information about a page (last edit time, size, etc.)
99<li>diff - show a diff of two revisions from the history page
100<li>user.loginform - show a login form
101<li>user.login - authenticate user, and set their cookie
102<ul><li>after authentication, loop to a 'show' action
103</ul><li>user.logout - clear the user account, and set the cookie
104<ul><li>after logging out, loop to a 'show' action
105</ul><li>user.createform - show a form for creating a user
106<li>user.create - create a new user file based on the form
107<li>user.editform - edit user data based on the form
108<li>user.edit - save edited user data (NOT CURRENTLY IMPLEMENTED)
109<li>upload - show form for uploading 3 files
110<li>do_upload - process form for uploading files
111<li>rename - show a rename form
112<li>do_rename - process form for renaming a page
113<li>delete - show a delete form
114<li>really_delete - process form for deleting a page
115<li>check for processor actions, of the form &lt;processor_name&gt;:&lt;action&gt;
116<ul><li>if found a match, call it
117<li>consider the request handled, on return
118</ul><li>if no action matches, show an error
119</ul><li>finally, show the footer
120</ul>
121<p>
122<h2><a name="Classes_details">Classes details</a>
123<span align=right class="section_edit_link">[<a href="/tbwiki/DocInternalAPI?action=edit&section=Classes_details">edit section</a>]</font></span>
124</h2>
125<pre>
126class stub_class:
127 
128class config_class:
129    def __init__(self):
130 
131class user_class:
132    def __init__(self, name = "not-logged-in"):
133 
134class req_class:
135    def __init__(self, config):
136    def set_page_name(self, page_name):
137    def page_filename(self):
138    def read_page(self, page_name=""):
139    def get_page_item(self, item_ref):
140    def put_page_item(self, item_ref, data):
141    def make_backup(self, content, page_name=""):
142    def make_backup_from_file(self, page_name=""):
143    def write_page(self, content, page_name=""):
144    def foo(self):
145    def make_url(self, page_name):
146    def html_escape(self, str):
147    def add_to_message(self, msg):
148    def add_msg_and_traceback(self, msg):
149    def show_header(self, title):
150    def show_footer(self):
151    def set_user(self):
152    def check_permission(self, wanted_access, page=None):
153    def parse_attrs(self, data):
154 
155class data_class:
156    def __init__(self, req, init_data = {} ):
157    def __getitem__(self, key):
158    def page_url(self, req):
159    def asctime(self, req):
160    def login_form(self, req):
161    def login_form_nobr(self, req):
162    def nav_box_sidebar(self, req):
163    def nav_bar(self, req):
164    def nav_bar_bar(self, req):
165    def search_form(self, req):
166    def search_form_nobr(self, req):
167    def toolbox(self, req):
168    def action_bar(self, req):
169    def message(self, req):
170 
171class parse_state:
172        def __init__(self, req):
173</pre>
174<p>
175<h1><a name="table.py">table.py</a>
176<span align=right class="section_edit_link">[<a href="/tbwiki/DocInternalAPI?action=edit&section=table.py">edit section</a>]</font></span>
177</h1>
178<p>
179<h2><a name="Classes_overview___2">Classes overview</a>
180<span align=right class="section_edit_link">[<a href="/tbwiki/DocInternalAPI?action=edit&section=Classes_overview___2">edit section</a>]</font></span>
181</h2>
182<ul><li>class form_fields_generator_class:
183<li>class range_class:
184<li>class io_handler_base:
185<ul><li>class io_handler_test(io_handler_base):
186<li>class io_handler_moin_file(io_handler_base):
187<li>class io_handler_moin_in_page(io_handler_base):
188<li>class io_handler_attr_files(io_handler_base):
189<li>class io_handler_parsed_files(io_handler_base):
190</ul><li>class table_conf_class:
191<li>class table_class:
192</ul>
193<p>
194<h2><a name="Functions___2">Functions</a>
195<span align=right class="section_edit_link">[<a href="/tbwiki/DocInternalAPI?action=edit&section=Functions___2">edit section</a>]</font></span>
196</h2>
197<pre>
198def print_error(msg):
199def generate_field_input(tb, col_name, field_type, value, record_id):
200def value_trans(tb, value):
201def parse_range(tb, cell_row, cell_col, formula):
202def do_sum(tb, range):
203def parse_formula(tb, cell_row, cell_col, formula):
204def value_eval(tb, cell_row, cell_col, value):
205def rec_sort(id1, id2):
206def cmp_rev(a,b):
207def cmp_int(a,b):
208def cmp_rev_int(a,b):
209def set_sort_col_list(tb, sort_col_spec_str):
210def gen_row_output_list(tb, sortby_spec):
211def setup_conf_and_db(req, block=""):
212def macro_get_table(req, args):
213def get_table(req, content):
214def add_record_form(req):
215def query_form(req):
216def edit_table(req):
217def edit_table_in_place(req):
218def parse_moin_table(tb, data, source_spec):
219def read_page_or_block(req, spec, data_dir=""):
220def write_block(req, spec, data_dir, data):
221def parse_attrdb_data(data, record_id_name):
222def read_attrdb_file(file_path, source_spec):
223def get_filelist(data_dir, source_spec):
224def db_from_attrdb_files(tb, data_dir, source_spec):
225def db_from_parsed_files(tb, data_dir, source_spec):
226def save_attrs_to_file(tb, record):
227def remove_attrdb_file(tb, record_id):
228def convert_table_to_dict(tb, convert_nums=0):
229def render_moin_table(tb):
230def get_table_type(conf, source_spec):
231def get_table_data(req, data_dir, source_spec, page_name, conf):
232def action(req):
233def test():
234</pre>
235<p>
236<h2><a name="Classes_details___2">Classes details</a>
237<span align=right class="section_edit_link">[<a href="/tbwiki/DocInternalAPI?action=edit&section=Classes_details___2">edit section</a>]</font></span>
238</h2>
239<pre>
240class form_fields_generator_class:
241        def __init__(self, tb, record, col_map, field_type_hints=None):
242        def __getitem__(self, key):
243 
244class range_class:
245        def __init__(self, start_row, start_col, end_row, end_col):
246        def get_direction(self):
247        def __repr__(self):
248 
249class io_handler_base:
250        def __init__(self, req, tb, source_spec):
251        def read(self):
252        def get_record(self, record_id):
253        def add_record(self, record_id):
254        def update_record(self, record_id):
255        def remove_record(self, record_id):
256        def write(self):
257 
258class table_conf_class:
259        def __init__(self):
260        def set_color_lists(self):
261        def get_conf(self, req, data=""):
262 
263class table_class:
264        def __init__(self, req, conf, source_spec, page_name="(no page name)"):
265        def lookup(self, cell_row, cell_col, ref_addr):
266        def set_value(self, row, col, value):
267        def get_value(self, row, col):
268        def add_or_edit_numbered_record(self, record, record_id=""):
269        def remove_numbered_record(self, record_id):
270        def set_col_output_list(self, order=None):
271        def set_row_output_list(self, order=None):
272        def set_row_filter(self, filter):
273        def filter_match(self, record):
274        def show(self):
275        def add_to_message(self, message):
276        def html_string(self):
277        def get_default_edit_form_spec(self):
278        def show_record_edit_form(self, form_spec=None, record_id=None):
279        def show_edit_table_form(self, form_spec=None):
280        def get_default_line_edit_form_spec(self):
281        def show_edit_table_in_place_form(self, form_spec=None):
282        def edit_links(self):
283        def show_query_form(self):
284</pre>
285<h1><a name="data_scan.py">data_scan.py</a>
286<span align=right class="section_edit_link">[<a href="/tbwiki/DocInternalAPI?action=edit&section=data_scan.py">edit section</a>]</font></span>
287</h1>
288<p>
289<h1><a name="vgchart.py">vgchart.py</a>
290<span align=right class="section_edit_link">[<a href="/tbwiki/DocInternalAPI?action=edit&section=vgchart.py">edit section</a>]</font></span>
291</h1>
292<p>
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

Differences for page "DocInternalAPI"


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