![]() | Sony: No PlayStation Vita ShortagesSony has increased production of the Vita to make
2 | sure that there are plenty of systems to go around. |
├── plim ├── adapters │ ├── __init__.py │ ├── babelplugin.py │ └── pyramid_renderer.py ├── unportable.py ├── util.py ├── errors.py ├── extensions.py ├── __init__.py ├── console.py └── syntax.py ├── tests ├── adapters │ ├── __init__.py │ └── test_babelplugin.py ├── fixtures │ ├── early_return_test.plim │ ├── coffee_test.plim │ ├── early_return_result.mako │ ├── no_filtering_result.mako │ ├── until_test.plim │ ├── no_filtering_test.plim │ ├── unicode_attributes_test.plim │ ├── unicode_attributes_result.mako │ ├── until_result.mako │ ├── scss_result.mako │ ├── with_test.plim │ ├── with_result.mako │ ├── unless_result.mako │ ├── coffee_result.mako │ ├── unless_test.plim │ ├── handlebars_test.plim │ ├── linebreak_result.mako │ ├── linebreak_test.plim │ ├── comment_result.mako │ ├── dynamic_attributes_test.plim │ ├── try_test.plim │ ├── multiline_variable_result.mako │ ├── stylus_result.mako │ ├── handlebars_result.mako │ ├── scss_test.plim │ ├── try_result.mako │ ├── explicit_space_result.mako │ ├── style_script_result.mako │ ├── call_test.plim │ ├── style_script_test.plim │ ├── stylus_test.plim │ ├── explicit_space_test.plim │ ├── call_result.mako │ ├── pipe_result.mako │ ├── inline_conditions_test.plim │ ├── comment_test.plim │ ├── multiline_variable_test.plim │ ├── mako_text_test.plim │ ├── while_result.mako │ ├── for_result.mako │ ├── while_test.plim │ ├── for_test.plim │ ├── mako_text_result.mako │ ├── inline_conditions_result.mako │ ├── for_result.dtl │ ├── pipe_test.plim │ ├── inline_loop_test.plim │ ├── embedded_result.mako │ ├── one_liners_result.mako │ ├── one_liners_test.plim │ ├── if_result.mako │ ├── embedded_test.plim │ ├── plim_multiline_tag_result.mako │ ├── if_test.plim │ ├── dynamic_attributes_result.mako │ ├── if_result.dtl │ ├── inline_loop_result.mako │ ├── def_block_result.mako │ ├── def_block_test.plim │ ├── plim_multiline_tag_test.plim │ ├── plim_line_result.mako │ ├── python_result.mako │ ├── plim_line_test.plim │ ├── babelplugin_test.plim │ ├── literal_one_liners_result.mako │ ├── python_test.plim │ ├── literal_one_liners_test.plim │ ├── reST_test.plim │ └── reST_result.mako ├── cli_fixtures │ ├── custom_parser_template.plim │ └── custom_parser_module.py ├── django_test │ ├── fixtures │ │ └── if_test.plim │ └── __init__.py ├── test_cli.py └── __init__.py ├── MANIFEST.in ├── shell.nix ├── docs ├── changes.rst ├── authors.rst ├── license.rst ├── related.rst ├── locale │ ├── zh_CN │ │ └── LC_MESSAGES │ │ │ ├── cli.po │ │ │ ├── license.po │ │ │ ├── authors.po │ │ │ ├── related.po │ │ │ ├── index.po │ │ │ ├── frameworks.po │ │ │ ├── differences.po │ │ │ ├── extensions.po │ │ │ └── changes.po │ ├── cli.pot │ ├── license.pot │ ├── authors.pot │ ├── related.pot │ ├── index.pot │ ├── frameworks.pot │ ├── differences.pot │ ├── extensions.pot │ └── changes.pot ├── cli.rst ├── frameworks.rst ├── differences.rst ├── index.rst ├── make.bat ├── Makefile ├── conf.py └── extensions.rst ├── package.json ├── .github ├── FUNDING.yml └── workflows │ └── ci.yml ├── requirements-test.txt ├── AUTHORS ├── .coveragerc ├── nixpkgs └── default.nix ├── .gitignore ├── setup.cfg ├── .editorconfig ├── requirements.txt ├── Makefile ├── pytest.ini ├── LICENSE ├── README.rst ├── default.nix ├── setup.py └── CHANGES /plim/adapters/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/adapters/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README* LICENSE CHANGES *.txt -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | {}: (import ./default.nix {}).devEnv 2 | -------------------------------------------------------------------------------- /docs/changes.rst: -------------------------------------------------------------------------------- 1 | .. module:: plim 2 | 3 | .. include:: ../CHANGES 4 | -------------------------------------------------------------------------------- /tests/fixtures/early_return_test.plim: -------------------------------------------------------------------------------- 1 | - return 2 | -continue 3 | -break -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "stylus": "^0.59.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /tests/fixtures/coffee_test.plim: -------------------------------------------------------------------------------- 1 | -coffee 2 | number = 100 3 | opposite = true -------------------------------------------------------------------------------- /tests/fixtures/early_return_result.mako: -------------------------------------------------------------------------------- 1 | <% return %> 2 | <% continue %> 3 | <% break %> -------------------------------------------------------------------------------- /tests/fixtures/no_filtering_result.mako: -------------------------------------------------------------------------------- 1 | ${value|n}${value|n} ${value |n,u}${value |n,u,h} -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [avanov] 4 | -------------------------------------------------------------------------------- /tests/fixtures/until_test.plim: -------------------------------------------------------------------------------- 1 | - until value 2 | Test 3 | 4 | -until \ 5 | value 6 | Test -------------------------------------------------------------------------------- /tests/fixtures/no_filtering_test.plim: -------------------------------------------------------------------------------- 1 | == value 2 | ==, value 3 | 4 | == value |u 5 | ==, value | u,h -------------------------------------------------------------------------------- /requirements-test.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | coverage 3 | pytest-cov 4 | 5 | mypy 6 | types-docutils 7 | types-setuptools 8 | -------------------------------------------------------------------------------- /tests/fixtures/unicode_attributes_test.plim: -------------------------------------------------------------------------------- 1 | a title="quick unicode string in 中文" 2 | input (placeholder=(u"選擇")) 3 | -------------------------------------------------------------------------------- /tests/fixtures/unicode_attributes_result.mako: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/fixtures/until_result.mako: -------------------------------------------------------------------------------- 1 | %while not (value): 2 | Test 3 | %endwhile 4 | 5 | %while not (value): 6 | Test 7 | %endwhile 8 | -------------------------------------------------------------------------------- /tests/fixtures/scss_result.mako: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/fixtures/with_test.plim: -------------------------------------------------------------------------------- 1 | -with open("x.txt") as f 2 | div Test 3 | 4 | - with open("x.txt") as f 5 | div Test -------------------------------------------------------------------------------- /tests/cli_fixtures/custom_parser_template.plim: -------------------------------------------------------------------------------- 1 | / Regular comment, it is not rendered 2 | 3 | /!But this comment will be rendered as an html comment tag -------------------------------------------------------------------------------- /tests/fixtures/with_result.mako: -------------------------------------------------------------------------------- 1 | %with open("x.txt") as f: 2 |
${ungettext('The link remains valid for {num} day.','The link remains valid for {num} days.',3).format(num=3)} ${_('Upon the expiration of this period, all non-activated accounts ''will be removed from the site.')}
-------------------------------------------------------------------------------- /tests/fixtures/style_script_result.mako: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/fixtures/call_test.plim: -------------------------------------------------------------------------------- 1 | -call expression="${4==4}" self:conditional 2 | |i'm the result 3 | 4 | - call expression=${4==4} self:conditional 5 | | i'm the result 6 | 7 | - call self:conditional 8 | | i'm the result 9 | 10 | - call self:conditional 11 | 12 | -------------------------------------------------------------------------------- /tests/fixtures/style_script_test.plim: -------------------------------------------------------------------------------- 1 | style type="text/css" 2 | h1 {color:red;} 3 | p {color:blue;} 4 | 5 | 6 | script type="text/javascript" 7 | document.write("Hello World!"); 8 | // test that `embedded markup` is not parsed 9 | document.write("`hello world`"); 10 | -------------------------------------------------------------------------------- /tests/fixtures/stylus_test.plim: -------------------------------------------------------------------------------- 1 | -stylus 2 | body 3 | background: linear-gradient(top, white, black) 4 | 5 | border-radius() 6 | -webkit-border-radius arguments 7 | -moz-border-radius arguments 8 | border-radius arguments 9 | 10 | a.button 11 | border-radius 5px 12 | -------------------------------------------------------------------------------- /docs/license.rst: -------------------------------------------------------------------------------- 1 | License 2 | ========= 3 | 4 | Plim source code is licensed under the `MIT licenseAllow
34 | %endif -------------------------------------------------------------------------------- /tests/fixtures/embedded_test.plim: -------------------------------------------------------------------------------- 1 | a href="#" Embedded `strong string` everywhere 2 | 3 | a href="#" Embedded `strong string`_`i s` everywhere 4 | 5 | This is a `a href="#" link` embedded `br` into a literal block. 6 | 7 | | another `a href="#" very ``strong funny ````i recursive``````` test 8 | 9 | Embed everything `#even statements``-for word in ['like', 'this']:= word```. 10 | 11 | Try using multi-line embedded markup `a( 12 | href="#" 13 | ): Like this ``strong( 14 | data-something="true" 15 | ) test``` 16 | -------------------------------------------------------------------------------- /tests/fixtures/plim_multiline_tag_result.mako: -------------------------------------------------------------------------------- 1 |
${Test}
8 |
${Test}
9 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: https://EditorConfig.org
2 |
3 | # top-most EditorConfig file
4 | root = true
5 |
6 | # Unix-style newlines with a newline ending every file
7 | [*]
8 | end_of_line = lf
9 | insert_final_newline = true
10 |
11 | # Matches multiple files with brace expansion notation
12 | # Set default charset
13 | [*.{js,py}]
14 | charset = utf-8
15 |
16 | # 4 space indentation
17 | [*.py]
18 | indent_style = space
19 | indent_size = 4
20 |
21 | [*.sh]
22 | indent_style = space
23 | indent_size = 4
24 |
25 | # Tab indentation (no size specified)
26 | [Makefile]
27 | indent_style = tab
28 |
29 | [*.nix]
30 | indent_style = space
31 | indent_size = 4
32 |
--------------------------------------------------------------------------------
/tests/fixtures/if_test.plim:
--------------------------------------------------------------------------------
1 |
2 |
3 | - if True
4 | div 1 Test
5 | div 2 Test
6 |
7 | |------------------------------------
8 |
9 | -if False
10 | div 3 False Test
11 | - if True
12 | div 4 Test
13 | div 5 Test
14 | -elif True
15 | div 6 True Test
16 | - elif 1 == 1
17 | div 7 Test
18 | -else
19 | div 8 Else Test
20 |
21 | -if False
22 | -elif True
23 | -else
24 |
25 | /--------------------------------
26 | - if (
27 | a == b
28 | ) or (
29 | c == d)
30 | |Test
31 | -elif (
32 | e == f
33 | )
34 | |Test2
35 |
36 | -if "permission:admin" in effective_principals(request)
37 | p Allow
38 |
--------------------------------------------------------------------------------
/tests/fixtures/dynamic_attributes_result.mako:
--------------------------------------------------------------------------------
1 | TestTest2 Test3Test4
22 |
--------------------------------------------------------------------------------
/tests/fixtures/if_result.dtl:
--------------------------------------------------------------------------------
1 | {% if True %}
2 | Allow
34 | {% endif %} -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Mako>=0.9.0 2 | pyrsistent>=0.18.1 3 | babel>=1.3 4 | # We use reStructuredText (docutils component) for both supporting 5 | # the "-rest" extension and project documenting. So, ensure that the docutils 6 | # get installed or upgraded on the target machine 7 | docutils>=0.3 8 | # We use Markdown for the "-markdown" extension 9 | markdown2>=1.4.2 10 | # Explicitly list PyExecJs as a dependency for the CoffeeScript and Stylus extensions 11 | PyExecJS>=1.0.4 12 | # We use CoffeeScript for "-coffee" extension 13 | CoffeeScript 14 | # We use SCSS for "-scss/sass" extension 15 | pyScss>=1.2.0.post3 16 | # We use the stylus package for "-stylus" extension 17 | # https://github.com/bkad/python-stylus 18 | stylus>=0.1.1 19 | -------------------------------------------------------------------------------- /docs/locale/zh_CN/LC_MESSAGES/cli.po: -------------------------------------------------------------------------------- 1 | # 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Plim 0.9\n" 5 | "Report-Msgid-Bugs-To: \n" 6 | "POT-Creation-Date: 2015-06-12 16:42+0800\n" 7 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 8 | "Last-Translator: FULL NAME| ${item.name} | ${item.price} |
${Test|n}
![]() | Sony: No PlayStation Vita ShortagesSony has increased production of the Vita to make
2 | sure that there are plenty of systems to go around. |
Now is the time for all good men to come to 168 | the aid of their country. This is just a 169 | regular paragraph.
170 | 171 |The quick brown fox jumped over the lazy 172 | dog's back.
173 | 174 |177 |183 | 184 | 185 | reStructuredText 186 | ~~~~~~~~~~~~~~~~ 187 | 188 | Plim uses `DocutilsThis is a blockquote.
178 | 179 |This is the second paragraph in the blockquote.
180 | 181 |This is an H2 in a blockquote
182 |
Grid table:
216 || Header 1 220 | | Header 2 221 | | Header 3 222 | |
|---|---|---|
| body row 1 227 | | column 2 228 | | column 3 229 | |
| body row 2 232 | | Cells may span columns. 233 | | |
| body row 3 236 | | Cells may span rows. 237 | |
238 |
|
| body row 4 246 | | ||
| Info: | See <http://docutils.sf.net/rst.html> for introductory docs. | 8 |
|---|---|
| Author: | 10 |David Goodger <goodger@python.org> |
| Date: | 12 |2011-06-17 |
| Revision: | 14 |7056 |
| Description: | This is a "docinfo block", or bibliographic field list | 16 |
Section titles are underlined or overlined & underlined.
22 |Grid table:
26 |Paragraphs are flush-left, 33 | separated by blank lines. 34 |35 | Block quotes are indented.36 | |
37 | Literal block, preceded by "::": 38 |39 | Indented 40 |41 | or: 42 |43 | > Quoted 44 |45 | |
46 |
48 | >>> print 'Doctest block' 49 | Doctest block 50 |51 | |
52 | |
54 |
60 | Line blocks preserve line breaks & indents. [new in 0.3.6]
55 |
56 |
59 | Useful for addresses, verse, and adornment-free lists; long
57 | lines can be wrapped with continuation lines.
58 | |
61 | |
Simple tables:
65 || List Type | 72 |Examples | 73 |||
|---|---|---|---|
| Bullet list | 77 |
|
81 | ||
| Enumerated list | 83 |
|
88 | ||
| Definition list | 90 |
|
95 | ||
| Field list | 97 |
|
106 | ||
| Option list | 108 |
|
118 |
| Explicit Markup | 128 |Examples (visible in the text source) | 129 |||
|---|---|---|---|
| Footnote | 133 |
|
141 | ||
| Citation | 143 |
|
150 | ||
| Hyperlink Target | 152 |153 | | ||
| Anonymous Target | 155 |156 | | ||
| Directive ("::") | 158 |
159 | |
160 | ||
| Substitution Def | 162 |163 | | ||
| Comment | 165 |166 | | 167 |||
| Empty Comment | 169 |(".." on a line by itself, with blank lines before & after, 170 | used to separate indentation contexts) | 171 |
emphasis; strong emphasis; interpreted text; interpreted text 178 | with role; inline literal text; standalone hyperlink, 179 | http://docutils.sourceforge.net; named reference, reStructuredText; 180 | anonymous reference; footnote reference, [1]; citation reference, 181 | [CIT2002]; like an inline directive; inline internal target.
182 |See <http://docutils.sf.net/docs/ref/rst/directives.html> for full info.
186 || Directive Name | 193 |Description (Docutils version added to, in [brackets]) | 194 |
|---|---|
| attention | 198 |Specific admonition; also "caution", "danger", 199 | "error", "hint", "important", "note", "tip", "warning" | 200 |
| admonition | 202 |Generic titled admonition: .. admonition:: By The Way | 203 |
| image | 205 |.. image:: picture.png; many options possible | 206 |
| figure | 208 |Like "image", but with optional caption and legend | 209 |
| topic | 211 |.. topic:: Title; like a mini section | 212 |
| sidebar | 214 |.. sidebar:: Title; like a mini parallel document | 215 |
| parsed-literal | 217 |A literal block with parsed inline markup | 218 |
| rubric | 220 |.. rubric:: Informal Heading | 221 |
| epigraph | 223 |Block quote with class="epigraph" | 224 |
| highlights | 226 |Block quote with class="highlights" | 227 |
| pull-quote | 229 |Block quote with class="pull-quote" | 230 |
| compound | 232 |Compound paragraphs [0.3.6] | 233 |
| container | 235 |Generic block-level container element [0.3.10] | 236 |
| table | 238 |Create a titled table [0.3.1] | 239 |
| list-table | 241 |Create a table from a uniform two-level bullet list [0.3.8] | 242 |
| csv-table | 244 |Create a table from CSV data (requires Python 2.3+) [0.3.4] | 245 |
| contents | 247 |Generate a table of contents | 248 |
| sectnum | 250 |Automatically number sections, subsections, etc. | 251 |
| header, footer | 253 |Create document decorations [0.3.8] | 254 |
| target-notes | 256 |Create an explicit footnote for each external target | 257 |
| math | 259 |Mathematical notation (input in LaTeX format) | 260 |
| meta | 262 |HTML-specific metadata | 263 |
| include | 265 |Read an external reST file as if it were inline | 266 |
| raw | 268 |Non-reST data passed untouched to the Writer | 269 |
| replace | 271 |Replacement text for substitution definitions | 272 |
| unicode | 274 |Unicode character code conversion for substitution defs | 275 |
| date | 277 |Generates today's date; for substitution defs | 278 |
| class | 280 |Set a "class" attribute on the next element | 281 |
| role | 283 |Create a custom interpreted text role [0.3.2] | 284 |
| default-role | 286 |Set the default interpreted text role [0.3.10] | 287 |
| title | 289 |Set the metadata document title [0.3.10] | 290 |
See <http://docutils.sf.net/docs/ref/rst/roles.html> for full info.
297 || Role Name | 304 |Description | 305 |
|---|---|
| emphasis | 309 |Equivalent to emphasis | 310 |
| literal | 312 |Equivalent to literal but processes backslash escapes | 313 |
| math | 315 |Mathematical notation (input in LaTeX format) | 316 |
| PEP | 318 |Reference to a numbered Python Enhancement Proposal | 319 |
| RFC | 321 |Reference to a numbered Internet Request For Comments | 322 |
| raw | 324 |For non-reST data; cannot be used directly (see docs) [0.3.6] | 325 |
| strong | 327 |Equivalent to strong | 328 |
| sub | 330 |Subscript | 331 |
| sup | 333 |Superscript | 334 |
| title | 336 |Title reference (book, etc.); standard default role | 337 |