Overview
-Number of entries: {{=total['entries']}} - {{if total['entries'] > 0:}} -
+{{=T("Overview")}}
+{{=T.M("Number of entries: **%s**", total['entries'])}}
+ {{if total['entries'] > 0:}} +{{=T.M("Hit Ratio: **%(ratio)s%%** (**%(hits)s** %%{hit(hits)} and **%(misses)s** %%{miss(misses})", + dict(ratio=total['ratio'], hits=total['hits'], misses=total['misses']))}} +
- Hit Ratio: - {{=total['ratio']}}% - ({{=total['hits']}} hits - and {{=total['misses']}} misses) -
-- Size of cache: + {{=T("Size of cache:")}} {{if object_stats:}} - {{=total['objects']}} items, - {{=total['bytes']}} bytes - {{if total['bytes'] > 524287:}} - ({{="%.0d" % (total['bytes'] / 1048576)}} MB) - {{pass}} - {{else:}} not available (requires the Python guppy library) + {{=T.M("**%(items)s** %%{item(items)}, **%(bytes)s** %%{byte(bytes)}", dict(items=total['objects'], bytes=total['bytes']))}} + {{if total['bytes'] > 524287:}} + {{=T.M("(**%.0d MB**)", total['bytes'] / 1048576)}} + {{pass}} + {{else:}} + {{=T.M("**not available** (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}} {{pass}}
- Cache contains items up to - {{="%02d" % total['oldest'][0]}} hours - {{="%02d" % total['oldest'][1]}} minutes - {{="%02d" % total['oldest'][2]}} seconds old. + {{=T.M("Cache contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", + dict(hours=total['oldest'][0], min=total['oldest'][1], sec=total['oldest'][2]))}}
{{=BUTTON(T('Cache Keys'), _onclick='jQuery("#all_keys").toggle();')}}{{pass}} -
RAM
-Number of entries: {{=ram['entries']}} - {{if ram['entries'] > 0:}}
-- Hit Ratio: - {{=ram['ratio']}}% - ({{=ram['hits']}} hits - and {{=ram['misses']}} misses) +
{{=T("RAM")}}
+{{=T.M("Number of entries: **%s**", ram['entries'])}}
+ {{if ram['entries'] > 0:}} +{{=T.M("Hit Ratio: **%(ratio)s%%** (**%(hits)s** %{hit(hits)} and **%(misses)s** %%{miss(misses)})", + dict( ratio=ram['ratio'], hits=ram['hits'], misses=ram['misses']))}}
- Size of cache: + {{=T("Size of cache:")}} {{if object_stats:}} - {{=ram['objects']}} items, - {{=ram['bytes']}} bytes - {{if ram['bytes'] > 524287:}} - ({{=ram['bytes'] / 1048576}} MB) - {{pass}} - {{else:}} not available (requires the Python guppy library) + {{=T.M("**%(items)s** items, **%(bytes)s** %%{byte(bytes)}", dict(items=ram['objects'], bytes=ram['bytes']))}} + {{if ram['bytes'] > 524287:}} + {{=T.M("(**%.0d MB**)", ram['bytes'] / 10485576)}} + {{pass}} + {{else:}} + {{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}} {{pass}}
- RAM contains items up to - {{="%02d" % ram['oldest'][0]}} hours - {{="%02d" % ram['oldest'][1]}} minutes - {{="%02d" % ram['oldest'][2]}} seconds old. + {{=T.M("RAM contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", + dict(hours=ram['oldest'][0], min=ram['oldest'][1], sec=ram['oldest'][2]))}}
{{=BUTTON(T('RAM Cache Keys'), _onclick='jQuery("#ram_keys").toggle();')}}{{pass}} -
DISK
-Number of entries: {{=disk['entries']}} - {{if disk['entries'] > 0:}} -
-- Hit Ratio: - {{=disk['ratio']}}% - ({{=disk['hits']}} hits - and {{=disk['misses']}} misses) -
-- Size of cache: +
{{=T("DISK")}}
+{{=T.M("Number of entries: **%s**", disk['entries'])}}
+ {{if disk['entries'] > 0:}} ++ {{=T.M("Hit Ratio: **%(ratio)s%%** (**%(hits)s** %%{hit(hits)} and **%(misses)s** %%{miss(misses)})", + dict(ratio=disk['ratio'], hits=disk['hits'], misses=disk['misses']))}} +
++ {{=T("Size of cache:")}} {{if object_stats:}} - {{=disk['objects']}} items, - {{=disk['bytes']}} bytes - {{if disk['bytes'] > 524287:}} - ({{=disk['bytes'] / 1048576}} MB) + {{=T.M("**%(items)s** %%{item(items)}, **%(bytes)s** %%{byte(bytes)}", dict( items=disk['objects'], bytes=disk['bytes']))}} + {{if disk['bytes'] > 524287:}} + {{=T.M("(**%.0d MB**)", disk['bytes'] / 1048576)}} + {{pass}} + {{else:}} + {{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}} {{pass}} - {{else:}} not available (requires the Python guppy library) - {{pass}} -
-- DISK contains items up to - {{="%02d" % disk['oldest'][0]}} hours - {{="%02d" % disk['oldest'][1]}} minutes - {{="%02d" % disk['oldest'][2]}} seconds old. -
- {{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}} -+ {{=T.M("DISK contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", + dict(hours=disk['oldest'][0], min=disk['oldest'][1], sec=disk['oldest'][2]))}} +
+ {{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}} ++
{{pass}}
Manage Cache
+{{=T("Manage Cache")}}
- {{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}} + {{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
[ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]@@ -50,7 +50,7 @@ {{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}
-
{{=nrows}} {{=T("selected")}}
+{{=T("%s selected", nrows)}}
{{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}} {{if stop{{T("Cache")}}
Statistics
+{{T("Statistics")}}
Overview
-Number of entries: {{=total['entries']}} - {{if total['entries'] > 0:}} -
+{{=T("Overview")}}
+{{=T.M("Number of entries: **%s**", total['entries'])}}
+ {{if total['entries'] > 0:}} +{{=T.M("Hit Ratio: **%(ratio)s%%** (**%(hits)s** %%{hit(hits)} and **%(misses)s** %%{miss(misses})", + dict(ratio=total['ratio'], hits=total['hits'], misses=total['misses']))}} +
- Hit Ratio: - {{=total['ratio']}}% - ({{=total['hits']}} hits - and {{=total['misses']}} misses) -
-- Size of cache: + {{=T("Size of cache:")}} {{if object_stats:}} - {{=total['objects']}} items, - {{=total['bytes']}} bytes - {{if total['bytes'] > 524287:}} - ({{="%.0d" % (total['bytes'] / 1048576)}} MB) - {{pass}} - {{else:}} not available (requires the Python guppy library) + {{=T.M("**%(items)s** %%{item(items)}, **%(bytes)s** %%{byte(bytes)}", dict(items=total['objects'], bytes=total['bytes']))}} + {{if total['bytes'] > 524287:}} + {{=T.M("(**%.0d MB**)", total['bytes'] / 1048576)}} + {{pass}} + {{else:}} + {{=T.M("**not available** (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}} {{pass}}
- Cache contains items up to - {{="%02d" % total['oldest'][0]}} hours - {{="%02d" % total['oldest'][1]}} minutes - {{="%02d" % total['oldest'][2]}} seconds old. + {{=T.M("Cache contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", + dict(hours=total['oldest'][0], min=total['oldest'][1], sec=total['oldest'][2]))}}
{{=BUTTON(T('Cache Keys'), _onclick='jQuery("#all_keys").toggle();')}}{{pass}} -
RAM
-Number of entries: {{=ram['entries']}} - {{if ram['entries'] > 0:}}
-- Hit Ratio: - {{=ram['ratio']}}% - ({{=ram['hits']}} hits - and {{=ram['misses']}} misses) +
{{=T("RAM")}}
+{{=T.M("Number of entries: **%s**", ram['entries'])}}
+ {{if ram['entries'] > 0:}} +{{=T.M("Hit Ratio: **%(ratio)s%%** (**%(hits)s** %{hit(hits)} and **%(misses)s** %%{miss(misses)})", + dict( ratio=ram['ratio'], hits=ram['hits'], misses=ram['misses']))}}
- Size of cache: + {{=T("Size of cache:")}} {{if object_stats:}} - {{=ram['objects']}} items, - {{=ram['bytes']}} bytes - {{if ram['bytes'] > 524287:}} - ({{=ram['bytes'] / 1048576}} MB) - {{pass}} - {{else:}} not available (requires the Python guppy library) + {{=T.M("**%(items)s** items, **%(bytes)s** %%{byte(bytes)}", dict(items=ram['objects'], bytes=ram['bytes']))}} + {{if ram['bytes'] > 524287:}} + {{=T.M("(**%.0d MB**)", ram['bytes'] / 10485576)}} + {{pass}} + {{else:}} + {{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}} {{pass}}
- RAM contains items up to - {{="%02d" % ram['oldest'][0]}} hours - {{="%02d" % ram['oldest'][1]}} minutes - {{="%02d" % ram['oldest'][2]}} seconds old. + {{=T.M("RAM contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", + dict(hours=ram['oldest'][0], min=ram['oldest'][1], sec=ram['oldest'][2]))}}
{{=BUTTON(T('RAM Cache Keys'), _onclick='jQuery("#ram_keys").toggle();')}}{{pass}} -
DISK
-Number of entries: {{=disk['entries']}} - {{if disk['entries'] > 0:}} -
-- Hit Ratio: - {{=disk['ratio']}}% - ({{=disk['hits']}} hits - and {{=disk['misses']}} misses) -
-- Size of cache: +
{{=T("DISK")}}
+{{=T.M("Number of entries: **%s**", disk['entries'])}}
+ {{if disk['entries'] > 0:}} ++ {{=T.M("Hit Ratio: **%(ratio)s%%** (**%(hits)s** %%{hit(hits)} and **%(misses)s** %%{miss(misses)})", + dict(ratio=disk['ratio'], hits=disk['hits'], misses=disk['misses']))}} +
++ {{=T("Size of cache:")}} {{if object_stats:}} - {{=disk['objects']}} items, - {{=disk['bytes']}} bytes - {{if disk['bytes'] > 524287:}} - ({{=disk['bytes'] / 1048576}} MB) + {{=T.M("**%(items)s** %%{item(items)}, **%(bytes)s** %%{byte(bytes)}", dict( items=disk['objects'], bytes=disk['bytes']))}} + {{if disk['bytes'] > 524287:}} + {{=T.M("(**%.0d MB**)", disk['bytes'] / 1048576)}} + {{pass}} + {{else:}} + {{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}} {{pass}} - {{else:}} not available (requires the Python guppy library) - {{pass}} -
-- DISK contains items up to - {{="%02d" % disk['oldest'][0]}} hours - {{="%02d" % disk['oldest'][1]}} minutes - {{="%02d" % disk['oldest'][2]}} seconds old. -
- {{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}} -+ {{=T.M("DISK contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", + dict(hours=disk['oldest'][0], min=disk['oldest'][1], sec=disk['oldest'][2]))}} +
+ {{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}} ++
{{pass}}
Manage Cache
+{{=T("Manage Cache")}}
- {{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}} + {{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
[ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]@@ -50,7 +50,7 @@ {{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}
-
{{=nrows}} {{=T("selected")}}
+{{=T("%s selected", nrows)}}
{{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}} {{if stop{{T("Cache")}}
Statistics
+{{T("Statistics")}}
Overview
-Number of entries: {{=total['entries']}} - {{if total['entries'] > 0:}} -
+{{=T("Overview")}}
+{{=T.M("Number of entries: **%s**", total['entries'])}}
+ {{if total['entries'] > 0:}} +{{=T.M("Hit Ratio: **%(ratio)s%%** (**%(hits)s** %%{hit(hits)} and **%(misses)s** %%{miss(misses})", + dict(ratio=total['ratio'], hits=total['hits'], misses=total['misses']))}} +
- Hit Ratio: - {{=total['ratio']}}% - ({{=total['hits']}} hits - and {{=total['misses']}} misses) -
-- Size of cache: + {{=T("Size of cache:")}} {{if object_stats:}} - {{=total['objects']}} items, - {{=total['bytes']}} bytes - {{if total['bytes'] > 524287:}} - ({{="%.0d" % (total['bytes'] / 1048576)}} MB) - {{pass}} - {{else:}} not available (requires the Python guppy library) + {{=T.M("**%(items)s** %%{item(items)}, **%(bytes)s** %%{byte(bytes)}", dict(items=total['objects'], bytes=total['bytes']))}} + {{if total['bytes'] > 524287:}} + {{=T.M("(**%.0d MB**)", total['bytes'] / 1048576)}} + {{pass}} + {{else:}} + {{=T.M("**not available** (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}} {{pass}}
- Cache contains items up to - {{="%02d" % total['oldest'][0]}} hours - {{="%02d" % total['oldest'][1]}} minutes - {{="%02d" % total['oldest'][2]}} seconds old. + {{=T.M("Cache contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", + dict(hours=total['oldest'][0], min=total['oldest'][1], sec=total['oldest'][2]))}}
{{=BUTTON(T('Cache Keys'), _onclick='jQuery("#all_keys").toggle();')}}{{pass}} -
RAM
-Number of entries: {{=ram['entries']}} - {{if ram['entries'] > 0:}}
-- Hit Ratio: - {{=ram['ratio']}}% - ({{=ram['hits']}} hits - and {{=ram['misses']}} misses) +
{{=T("RAM")}}
+{{=T.M("Number of entries: **%s**", ram['entries'])}}
+ {{if ram['entries'] > 0:}} +{{=T.M("Hit Ratio: **%(ratio)s%%** (**%(hits)s** %{hit(hits)} and **%(misses)s** %%{miss(misses)})", + dict( ratio=ram['ratio'], hits=ram['hits'], misses=ram['misses']))}}
- Size of cache: + {{=T("Size of cache:")}} {{if object_stats:}} - {{=ram['objects']}} items, - {{=ram['bytes']}} bytes - {{if ram['bytes'] > 524287:}} - ({{=ram['bytes'] / 1048576}} MB) - {{pass}} - {{else:}} not available (requires the Python guppy library) + {{=T.M("**%(items)s** items, **%(bytes)s** %%{byte(bytes)}", dict(items=ram['objects'], bytes=ram['bytes']))}} + {{if ram['bytes'] > 524287:}} + {{=T.M("(**%.0d MB**)", ram['bytes'] / 10485576)}} + {{pass}} + {{else:}} + {{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}} {{pass}}
- RAM contains items up to - {{="%02d" % ram['oldest'][0]}} hours - {{="%02d" % ram['oldest'][1]}} minutes - {{="%02d" % ram['oldest'][2]}} seconds old. + {{=T.M("RAM contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", + dict(hours=ram['oldest'][0], min=ram['oldest'][1], sec=ram['oldest'][2]))}}
{{=BUTTON(T('RAM Cache Keys'), _onclick='jQuery("#ram_keys").toggle();')}}{{pass}} -
DISK
-Number of entries: {{=disk['entries']}} - {{if disk['entries'] > 0:}} -
-- Hit Ratio: - {{=disk['ratio']}}% - ({{=disk['hits']}} hits - and {{=disk['misses']}} misses) -
-- Size of cache: +
{{=T("DISK")}}
+{{=T.M("Number of entries: **%s**", disk['entries'])}}
+ {{if disk['entries'] > 0:}} ++ {{=T.M("Hit Ratio: **%(ratio)s%%** (**%(hits)s** %%{hit(hits)} and **%(misses)s** %%{miss(misses)})", + dict(ratio=disk['ratio'], hits=disk['hits'], misses=disk['misses']))}} +
++ {{=T("Size of cache:")}} {{if object_stats:}} - {{=disk['objects']}} items, - {{=disk['bytes']}} bytes - {{if disk['bytes'] > 524287:}} - ({{=disk['bytes'] / 1048576}} MB) + {{=T.M("**%(items)s** %%{item(items)}, **%(bytes)s** %%{byte(bytes)}", dict( items=disk['objects'], bytes=disk['bytes']))}} + {{if disk['bytes'] > 524287:}} + {{=T.M("(**%.0d MB**)", disk['bytes'] / 1048576)}} + {{pass}} + {{else:}} + {{=T.M("``**not available**``:red (requires the Python [[guppy http://pypi.python.org/pypi/guppy/ popup]] library)")}} {{pass}} - {{else:}} not available (requires the Python guppy library) - {{pass}} -
-- DISK contains items up to - {{="%02d" % disk['oldest'][0]}} hours - {{="%02d" % disk['oldest'][1]}} minutes - {{="%02d" % disk['oldest'][2]}} seconds old. -
- {{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}} -+ {{=T.M("DISK contains items up to **%(hours)02d** %%{hour(hours)} **%(min)02d** %%{minute(min)} **%(sec)02d** %%{second(sec)} old.", + dict(hours=disk['oldest'][0], min=disk['oldest'][1], sec=disk['oldest'][2]))}} +
+ {{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}} ++
{{pass}}
Manage Cache
+{{=T("Manage Cache")}}
This is a test block with new features:
This is a blockquote with a list with tables in it:
This is a paragraph before list. You can continue paragraph on the next lines.
This is an ordered list with tables:
- Item 1
- Item 2
aa bb cc 11 22 33 - Item 4
T1 T2 t3 aaa bbb ccc ddd fff ggg 123 0 5.0
This this a new paragraph with a table. Table has header and footer:
| Title 1 | Title 2 | Title 3 |
| data 1 | data 2 | 2.00 |
| data 4 | data5(long) | 23.00 |
| data 8 | 33.50 | |
| Total: | 3 items | 58.50 |
Multilevel lists
Now lists can be multilevel:
- Ordered item 1 on level 1. You can continue item text on next strings
Ordered item 1 of sublevel 2 with a paragraph (paragraph can start with point after plus or minus characters, e.g. ++. or --.)
This is another item. But with 3 paragraphs, blockquote and sublists:
This is the second paragraph in the item. You can add paragraphs to an item, using point notation, where first characters in the string are sequence of points with space between them and another string. For example, this paragraph (in sublevel 2) starts with two points:
.. This is the second paragraph...this is a blockquote in a list
You can use blockquote with headers, paragraphs, tables and lists in it:
Tables can have or have not header and footer. This table is defined without any header and footer in it:red fox 0 blue dolphin 1000 green leaf 10000 This is yet another paragraph in the item.
- This is an item of unordered list (sublevel 3)
- This is the second item of the unordered list (sublevel 3)
- This is a single item of ordered list in sublevel 6
and this is a paragraph in sublevel 4
This is a new item with paragraph in sublevel 3.
- Start ordered list in sublevel 4 with code block:
====================line 1 +print markmin2pdf(m)This is a test block with new features:
This is a blockquote with a list with tables in it:
This is a paragraph before list. You can continue paragraph on the next lines.
This is an ordered list with tables:- Item 1
- Item 2
aa bb cc 11 22 33 - Item 4
T1 T2 t3 aaa bbb ccc ddd fff ggg 123 0 5.0
This this a new paragraph with a table. Table has header, footer, sections, odd and even rows:
Title 1 Title 2 Title 3 data 1 data 2 2.00 data 3 data4(long) 23.00 data 5 33.50 New section New data 5.00 data 1 data2(long) 100.45 data 3 12.50 data 4 data 5 .33 data 6 data7(long) 8.01 data 8 514 Total: 9 items 698,79 Multilevel lists
Now lists can be multilevel:
- Ordered item 1 on level 1. You can continue item text on next strings
Ordered item 1 of sublevel 2 with a paragraph (paragraph can start with point after plus or minus characters, e.g. ++. or --.)
This is another item. But with 3 paragraphs, blockquote and sublists:
This is the second paragraph in the item. You can add paragraphs to an item, using point notation, where first characters in the string are sequence of points with space between them and another string. For example, this paragraph (in sublevel 2) starts with two points:
.. This is the second paragraph...this is a blockquote in a list
You can use blockquote with headers, paragraphs, tables and lists in it:
Tables can have or have not header and footer. This table is defined without any header and footer in it:red fox 0 blue dolphin 1000 green leaf 10000 This is yet another paragraph in the item.
- This is an item of unordered list (sublevel 3)
- This is the second item of the unordered list (sublevel 3)
- This is a single item of ordered list in sublevel 6
and this is a paragraph in sublevel 4
This is a new item with paragraph in sublevel 3.
- Start ordered list in sublevel 4 with code block:
line 1 line 2 line 3 Yet another item with code block:
This item finishes with this paragraph.line 1 line 2 line 3
Item in sublevel 3 can be continued with paragraphs.
this is another code block in the - sublevel 3 item- Start ordered list in sublevel 4 with code block:
- The last item in sublevel 3
This is a continuous paragraph for item 2 in sublevel 2. You can use such structure to create difficult structured documents.
- item 3 in sublevel 2
- item 1 in sublevel 2 (new unordered list)
- item 2 in sublevel 2
- item 3 in sublevel 2
- item 1 in sublevel 2 (new ordered list)
- item 2 in sublevel 2
- item 3 in sublevle 2
- Start ordered list in sublevel 4 with code block:
- item 2 in level 1
- item 3 in level 1
- new unordered list (item 1 in level 1)
- level 2 in level 1
- level 3 in level 1
- level 4 in level 1
This is the last section of the test
Single paragraph with '----' in it will be turned into separator:
And this is the last paragraph in the test. Be happy!
====================
Why?
We wanted a markup language with the following requirements:
- less than 300 lines of functional code
- easy to read
- secure
- support table, ul, ol, code
- support html5 video and audio elements (html serialization only)
- can align images and resize them
- can specify class for tables and code elements
- can add anchors
- does not use _ for markup (since it creates odd behavior)
- automatically links urls
- fast
- easy to extend
- supports latex and pdf including references
- allows to describe the markup in the markup (this document is generated from markmin syntax)
(results depend on text but in average for text ~100K markmin is 30% faster than markdown, for text ~10K it is 10x faster)
The web2py book published by lulu, for example, was entirely generated with markmin2pdf from the online web2py wiki
Download
- http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2html.py
- http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2latex.py
- http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2pdf.py
markmin2html.py and markmin2latex.py are single files and have no web2py dependence. Their license is BSD.
Examples
Bold, italic, code and links
SOURCE OUTPUT # titletitle ## sectionsection ### subsectionsubsection **bold**bold ''italic''italic ~~strikeout~~strikeout``verbatim``verbatim``color with **bold**``:redcolor with bold ``many colors``:color[blue:#ffff00]many colors http://google.comhttp://google.com [[**click** me #myanchor]]click me [[click me [extra info] #myanchor popup]]click me More on links
The format is always
[[title link]]or[[title [extra] link]]. Notice you can nest bold, italic, strikeout and code inside the linktitle.Anchors
You can place an anchor anywhere in the text using the syntax
[[name]]where name is the name of the anchor. You can then link the anchor with link, i.e.[[link #myanchor]]or link with an extra info, i.e.[[link with an extra info [extra info] #myanchor]].Images
This paragraph has an image aligned to the right with a width of 200px. Its is placed using the code[[alt-string for the image [the image title] http://www.web2py.com/examples/static/web2py_logo.png right 200px]].Unordered Lists
- Dog + sublevel 3 item - The last item in sublevel 3
- item 3 in sublevel 2
This is a continuous paragraph for item 2 in sublevel 2. You can use such structure to create difficult structured documents.
- item 1 in sublevel 2 (new unordered list)
- item 2 in sublevel 2
- item 3 in sublevel 2
- item 1 in sublevel 2 (new ordered list)
- item 2 in sublevel 2
- item 3 in sublevle 2
- new unordered list (item 1 in level 1)
- level 2 in level 1
- level 3 in level 1
- level 4 in level 1
This is the last section of the test
Single paragraph with '----' in it will be turned into separator:
And this is the last paragraph in the test. Be happy!
====================
Why?
We wanted a markup language with the following requirements:
- less than 300 lines of functional code
- easy to read
- secure
- support table, ul, ol, code
- support html5 video and audio elements (html serialization only)
- can align images and resize them
- can specify class for tables and code elements
- can add anchors
- does not use _ for markup (since it creates odd behavior)
- automatically links urls
- fast
- easy to extend
- supports latex and pdf including references
- allows to describe the markup in the markup (this document is generated from markmin syntax)
(results depend on text but in average for text ~100K markmin is 30% faster than markdown, for text ~10K it is 10x faster)
The web2py book published by lulu, for example, was entirely generated with markmin2pdf from the online web2py wiki
Download
- http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2html.py
- http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2latex.py
- http://web2py.googlecode.com/hg/gluon/contrib/markmin/markmin2pdf.py
markmin2html.py and markmin2latex.py are single files and have no web2py dependence. Their license is BSD.
Examples
Bold, italic, code and links
| SOURCE | OUTPUT |
# title | title |
## section | section |
### subsection | subsection |
**bold** | bold |
''italic'' | italic |
~~strikeout~~ | |
``verbatim`` | verbatim |
``color with **bold**``:red | color with bold |
``many colors``:color[blue:#ffff00] | many colors |
http://google.com | http://google.com |
[[**click** me #myanchor]] | click me |
[[click me [extra info] #myanchor popup]] | click me |
More on links
The format is always [[title link]] or [[title [extra] link]]. Notice you can nest bold, italic, strikeout and code inside the link title.
Anchors
You can place an anchor anywhere in the text using the syntax [[name]] where name is the name of the anchor. You can then link the anchor with link, i.e. [[link #myanchor]] or link with an extra info, i.e. [[link with an extra info [extra info] #myanchor]].
Images
This paragraph has an image aligned to the right with a width of 200px. Its is placed using the code
[[alt-string for the image [the image title] http://www.web2py.com/examples/static/web2py_logo.png right 200px]].
Unordered Lists
- Dog
- Cat
- Mouseis rendered as
- Dog
- Cat
- Mouse
Two new lines between items break the list in two lists.
Ordered Lists
+ Dog
+ Cat
@@ -52,7 +55,7 @@ code block
X | 0 | 0
=================
**D**|**F**|**G**
------------------:abc[id] is a table and is rendered as| A | B | C |
| 0 | 0 | X |
| 0 | X | 0 |
| X | 0 | 0 |
| D | F | G |
:abc, :id[abc_1] or :abc[abc_1] at the end sets the class and/or id for the table and it is optional.Blockquote
A table with a single cell is rendered as a blockquote:
Hello world
Blockquote can contain headers, paragraphs, lists and tables:
-----
+-----------------:abc[id] is a table and is rendered as| A | B | C |
| 0 | 0 | X |
| 0 | X | 0 |
| X | 0 | 0 |
| D | F | G |
:abc, :id[abc_1] or :abc[abc_1] at the end sets the class and/or id for the table and it is optional.Blockquote
A table with a single cell is rendered as a blockquote:
Hello world
Blockquote can contain headers, paragraphs, lists and tables:
-----
This is a paragraph in a blockquote
+ item 1
@@ -66,7 +69,7 @@ code block
0 | X | 0
X | 0 | 0
---------:tableclass1
------is rendered as:
This is a paragraph in a blockquote
- item 1
- item 2
- item 2.1
- item 2.2
- item 3
0 0 X 0 X 0 X 0 0
Code, <code>, escaping and extra stuff
def test():
+-----is rendered as:
This is a paragraph in a blockquote
- item 1
- item 2
- item 2.1
- item 2.2
- item 3
0 0 X 0 X 0 X 0 0
Code, <code>, escaping and extra stuff
def test():
return "this is Python code"Optionally a ` inside a ``...`` block can be inserted escaped with !`!.
NOTE: You can escape markmin constructions ('',``,**,~~,[,{,]},$,@) with '\' character: so \`\` can replace !`!`! escape string
The :python after the markup is also optional. If present, by default, it is used to set the class of the <code> block. The behavior can be overridden by passing an argument extra to the render function. For example:
markmin2html("``aaa``:custom",
extra=dict(custom=lambda text: 'x'+text+'x'))generates
'xaaax'(the ``...``:custom block is rendered by the custom=lambda function passed to render).
Html5 support
Markmin also supports the <video> and <audio> html5 tags using the notation:
[[message link video]]
[[message link audio]]