8000 missing entries · Issue #77 · dmulyalin/ttp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
missing entries #77
Closed
Closed
@pdimop

Description

@pdimop
DATA_TO_PARSE = '''
lsp "lsp100"
    primary "name"
        include "1"
        exclude "2"
    exit
    secondary "name"
        include "3"
        exclude "4"
    exit
exit
lsp "lsp101"
    primary "name"
        include "5"
        exclude "6"
    exit
    secondary "name"
        include "7"
        exclude "8"
    exit
exit
'''

TTP_TEMPLATE = '''
<group name="lsp**.{{ lspname }}**">
lsp "{{ lspname | _start_ }}"
    <group name="primary**.{{ primaryname }}**">
    primary "{{ primaryname | _start_ }}"
        <group name="include**.{{ item }}**">
        include "{{ item | _start_ }}"
        </group>
        <group name="exclude**.{{ item }}**">
        exclude "{{ item | _start_ }}"
        </group>
    exit{{ _end_ }}
    </group>
    <group name="secondary**.{{ secondaryname }}**">
    secondary "{{ secondaryname | _start_ }}"
        <group name="include**.{{ item }}**">
        include "{{ item | _start_ }}"
        </group>
        <group name="exclude**.{{ item }}**">
        exclude "{{ item | _start_ }}"
        </group>
    exit{{ _end_ }}
    </group>
exit{{ _end_ }}
</group>
'''

output=

[[{'lsp': {'lsp100': {'primary': {'name': {'exclude': {'2': {}}, 'include': {'1': {}}}},
                      'secondary': {'name': {'exclude': {'4': {}}, 'include': {'3': {}}}}},
           'lsp101': {'primary': {'name': {                        'include': {'5': {}}}},
                      'secondary': {'name': {'exclude': {'8': {}}, include': {'7': {}}}}}}}]]

missing 'exclude':'6'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0