From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Amirouche Boubekki Newsgroups: gmane.lisp.guile.user Subject: Re: sfx: baby steps of an html templating engine based on skribillo's skribe reader and sxml Date: Thu, 30 Jul 2015 18:52:25 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_cfd15cf3eeb3323598123b3b341874e2" X-Trace: ger.gmane.org 1438275188 20426 80.91.229.3 (30 Jul 2015 16:53:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jul 2015 16:53:08 +0000 (UTC) Cc: guile-user-bounces+amirouche=hypermove.net@gnu.org To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jul 30 18:52:54 2015 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZKr4c-0004KF-Iw for guile-user@m.gmane.org; Thu, 30 Jul 2015 18:52:50 +0200 Original-Received: from localhost ([::1]:41112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKr4c-0007l8-1r for guile-user@m.gmane.org; Thu, 30 Jul 2015 12:52:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKr4Q-0007l1-Bp for guile-user@gnu.org; Thu, 30 Jul 2015 12:52:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKr4O-0006nZ-37 for guile-user@gnu.org; Thu, 30 Jul 2015 12:52:38 -0400 Original-Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:44266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKr4H-0006mD-0H; Thu, 30 Jul 2015 12:52:29 -0400 Original-Received: from mfilter26-d.gandi.net (mfilter26-d.gandi.net [217.70.178.154]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id DD442FB886; Thu, 30 Jul 2015 18:52:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter26-d.gandi.net Original-Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter26-d.gandi.net (mfilter26-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id iEK2j6SPMRU9; Thu, 30 Jul 2015 18:52:26 +0200 (CEST) X-Originating-IP: 10.58.1.147 Original-Received: from webmail.gandi.net (unknown [10.58.1.147]) (Authenticated sender: amirouche@hypermove.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPA id F1A7FFB88B; Thu, 30 Jul 2015 18:52:25 +0200 (CEST) In-Reply-To: X-Sender: amirouche@hypermove.net User-Agent: Roundcube Webmail/1.1.2 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4b98:c:538::198 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11931 Archived-At: --=_cfd15cf3eeb3323598123b3b341874e2 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Le 2015-07-30 13:55, Amirouche Boubekki a =C3=A9crit=C2=A0: > H=C3=A9llo, >=20 >=20 > I've been lurking around skribillo and artanis. I don't really like > the rails-like syntax > of artanis, even if it has its use-cases and I wanted to hack on > something "small", so > I've put together sfx. >=20 > The code of skribe reader is included in sfx.scm. So the only > dependency is guile (2.0.11) and > guile-reader that you can install using `guix package -i guile-reader`. >=20 > This bare template language has the following features: >=20 > - wanna be simpler sxml syntax > - templates with custom environment > - external libraries loading inside the template >=20 >=20 > # Wanna be simpler sxml syntax >=20 > Skribe reader (implemented with guile-reader) provide a handy syntax to > both define keywords and quasiquote. In an sxml context those features > are used to implemented attributes and text nodes. >=20 > ## attributes >=20 > Attributes in sxml are defined as follow: >=20 > (div (@ (id "shell")) "This the main area") >=20 > Instead of requiring the nesting of `(attribute-name attribute-value)`=20 > sfx use > the simpler keyword syntax `:keyword`. The above snippet becomes: >=20 > (div (@ :id "shell") "This the main area") >=20 > I'm not sure it's worth the trouble of diverting from sxml standard. > That said, it looks > more like plain xml. >=20 > ## text nodes >=20 > Text nodes can be defined as >=20 > (p [h=C3=A9llo hacker]) >=20 > This is looks the same as the default reader. It becomes handy when > you include an > inline element inside the text node: >=20 > (p [h=C3=A9llo ,(b [hacker]) >=20 > `,()` is a special syntax of skribe reader which provides `(unquote)` > inside [bracket] `quasiquote`. >=20 > With the default guile reader, this must be written as: >=20 > (p "h=C3=A9llo " (b "hacker")) >=20 > This is looks verbose and prone to error. One must not forget the space= =20 > in the > string before the `(b)` element. >=20 >=20 > # templates with custom environment >=20 > Right now this part of the template language is not really > userfriendly. But you can pass custom > variables to the template but those must be parameters. In the example > sfx.scm (which includes > example use of the procedures) the environment in which the template > is evaled is defined as follow: >=20 > (define value (make-parameter 42)) > (define amirouche (make-person "amirouche" 30)) > (define env (let ((value value) > (amirouche amirouche)) > (the-environment))) >=20 >=20 > Then `value` can be echo'ed inside the template using the unquote > syntax `,()`, e.g. >=20 > (p [Here is a lucky number for you =C2=AB,(value)=C2=BB]) >=20 > As you can see the previous snippet, there is also a `` record > inside the environment. > One can (maybe) provide in the environment the required procedures to > echo the correct > fields but this is verbose. Instead sfx use `(use-modules)` inside the > template definition > file. This is presented in the following and last part. >=20 > # external libraries loading inside the template >=20 > Currently it's (only) possible to do `(use-modules)` inside the > template file. The template > file looks like the following: >=20 > ``` > (use-modules (person)) >=20 > `(html > (body > (p [My name is ,(person-name amirouche)]))) > ``` >=20 > I could not make procedure definition work inside the template, this > my be linked to the way > I eval the template. It's shame because for quick and dirty hacks it > can be handy like defining > mini-templates inside the big template. >=20 >=20 >=20 >=20 >=20 > This is my second try at this and having a look at the code of haunt > [1] was helpful. >=20 > Hope this helps! >=20 >=20 > [1] https://git.dthompson.us/haunt.git Sorry for the double posting. This mail is not a duplicate. I though that the implementation `extend` would be more involving. `extend` is the dual of `include`. Given a base template `base.sfx` you=20 define placeholders say `,(main)` and `,(sidebar)` and the rest is the "shell" of the=20 application ie. the part of GUI that is always the same over the application. If `index.sfx` inherit `base.sfx` the context in which `base.sfx` is=20 rendered is the same as the context used to render `=C3=ACndex.sfx` plus the variables defined/passed in=20 `=C3=ACndex.sfx` to `base.sfx`. In the following example, `title` and `intro` are evaled and then added=20 to `(current-module)` environment with which `base.sfx` is rendered. (extend "base.sfx" (current-module) `((title `(h1 [H=C3=A9llo again hacker!!])) (intro "This is a little presentation of sfx template=20 language"))) I don't how to make `(current-module)` disappear but it's also more=20 explicit. I'm not sure. `extend` implement a pattern similar to inheritance in OOP. I attach complete code with an example. There is small doc in the header=20 of the file. --=_cfd15cf3eeb3323598123b3b341874e2 Content-Transfer-Encoding: base64 Content-Type: text/plain; name=sfx.scm Content-Disposition: attachment; filename=sfx.scm; size=8716 Ozs7IENvcHlyaWdodCDCqSAyMDE1ICBBbWlyb3VjaGUgQm91YmVra2kgPGFtaXJvdWNoZUBoeXBl cm1vdmUubmV0Pgo7OzsgQ29weXJpZ2h0IMKpIDIwMDUsIDIwMDYgTHVkb3ZpYyBDb3VydMOocyA8 bHVkb3ZpYy5jb3VydGVzQGxhYXMuZnI+Cjs7Owo7OzsgVGhpcyBsaWJyYXJ5IGlzIGZyZWUgc29m dHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vcgo7OzsgbW9kaWZ5IGl0IHVuZGVy IHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlCjs7OyBh cyBwdWJs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hv ciIgOmNvbnRlbnQgIkFtaXJvdWNoZSBCT1VCRUtLSSA8YW1pcm91Y2hlQGh5cGVybW92ZS5uZXQ+ IikpCjs7ICAgIChtZXRhIChAIDpuYW1lICJ2aWV3cG9ydCIgOmNvbnRlbnQgIndpZHRoPWRldmlj ZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0xIikpCjs7ICAgIChsaW5rIChAIDpyZWwgInN0eWxlc2hl ZXQiIDpocmVmICJzdGF0aWMvY3NzL2Jvb3RzdHJhcC5taW4uY3NzIikpCjs7ICAgIChsaW5rIChA IDpyZWwgInN0eWxlc2hlZXQiIDpocmVmICJzdGF0aWMvY3NzL2Jvb3RzdHJhcC10aGVtZS5taW4u Y3NzIikpCjs7ICAgIChsaW5rIChAIDpyZWwgInN0eWxlc2hlZXQiIDpocmVmICJzdGF0aWMvY3Nz L21haW4uY3NzIikpKSAgCjs7ICAgKGJvZHkgKEAgOmNsYXNzICJpbmRleCIpCjs7ICAgICAgICAg KGRpdiAoQCA6Y2xhc3MgY29udGFpbmVyKQo7OyAgICAgICAgICAgICAgKGRpdiAoQCA6Y2xhc3Mg ImhlYWRlciBjbGVhcmZpeCIpCjs7ICAgICAgICAgICAgICAgICAgIChuYXYKOzsgICAgICAgICAg ICAgICAgICAgICh1bCAoQCA6Y2xhc3MgIm5hdiBuYXYtcGlsbHMgcHVsbC1yaWdodCIpICAgICAg ICAgICAgICAgICAgICAgCjs7ICAgICAgICAgICAgICAgICAgICAgICAgKGxpIChAIDpyb2xlICJw cmVzZW50YXRpb24iIDpjbGFzcyAiYWN0aXZlIikKOzsgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGEgKEAgOmhyZWYgIiMiKSBbSG9tZV0pKQo7OyAgICAgICAgICAgICAgICAgICAgICAgIChs aSAoQCA6cm9sZSAicHJlc2VudGF0aW9uIiApCjs7ICAgICAgICAgICAgICAgICAgICAgICAgICAg IChhIChAIDpocmVmICIjIikgW0Fib3V0XSkpCjs7ICAgICAgICAgIC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bWVyIChzeW1ib2wt cHJlZml4LXByb2MgJ3I6KSkpCgo7OzsKOzs7IHNrcmliZSByZWFkZXIgKGJvcnJvd2VkIGZyb20g c2tyaWJpbG8pCjs7OwoKKGRlZmluZSAobWFrZS1jb2xvbi1mcmVlLXRva2VuLXJlYWRlciB0cikK ICA7OyBTdG9sZW4gZnJvbSBgZ3VpbGUtcmVhZGVyJyAwLjMuCiAgIklmIHRva2VuIHJlYWRlciBA dmFye3RyfSBoYW5kbGVzIHRoZSBAY29kZXs6fSAoY29sb24pIGNoYXJhY3RlciwgcmVtb3ZlIGl0 CmZyb20gaXRzIHNwZWNpZmljYXRpb24gYW5kIHJldHVybiB0aGUgbmV3IHRva2VuIHJlYWRlci4i CiAgKGxldCogKChzcGVjIChyOnRva2VuLXJlYWRlci1zcGVjaWZpY2F0aW9uIHRyKSkKICAgICAg ICAgKHByb2MgKHI6dG9rZW4tcmVhZGVyLXByb2NlZHVyZSB0cikpKQogICAgKHI6bWFrZS10b2tl bi1yZWFkZXIgKGZpbHRlciAobGFtYmRhIChjaHIpCiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKG5vdCAoY2hhcj0/IGNociAjXDopKSkKICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgc3BlYykKICAgICAgICAgICAgICAgICAgICAgICAgIHByb2MpKSkKCihkZWZpbmUg JnNoYXJwLXJlYWRlcgogIDs7IFRoZSByZWFkZXIgZm9yIHdoYXQgY29tZXMgYWZ0ZXIgYSBgIycg Y2hhcmFjdGVyLgogIChsZXQqICgoZHNzc2wta2V5d29yZC1yZWFkZXIgIDs7IGtleXdvcmRzIMOg IGxhIGAjIWtleScKICAgICAgICAgIChyOm1ha2UtdG9rZW4tcmVhZGVyICNcIQogICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKHI6dG9rZW4tcmVhZGVyLXByb2NlZHVyZQogICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIChyOnN0YW5kYXJkLXRva2VuLXJlYWRlciAna2V5d29yZCkp KSkpCiAgICAgIChyOm1ha2UtcmVhZGVyIChjb25zIGRzc3NsLWtleXdvcmQtcmVhZGVyCiAgICAg ICAgICAgICAgICAgICAgICAgICAgIChtYXAgcjpzdGFuZGFyZC10b2tlbi1yZWFkZXIKICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAnKGNoYXJhY3RlciBzcmZpLTQgdmVjdG9yCiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1iZXIrcmFkaXggYm9vbGVhbgogICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgc3JmaTMwLWJsb2NrLWNvbW1lbnQKICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHNyZmk2Mi1zZXhwLWNvbW1lbnQpKSkKICAgICAgICAg ICAgICAgICAgICAgI2YgOzsgdXNlIGRlZmF1bHQgZmF1bHQgaGFuZGxlcgogICAgICAgICAgICAg ICAgICAgICAncmVhZGVyL3JlY29yZC1wb3NpdGlvbnMpKSkKCihkZWZpbmUgKG1ha2Utc2tyaWJl LXJlYWRlcikKICAobGV0ICgoY29sb24ta2V5d29yZHMgOzsga2V5d29yZHMgw6AgbGEgYDprZXkn IGZhc2hpb24KICAgICAgICAgKHI6bWFrZS10b2tlbi1yZWFkZXIgI1w6CiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChyOnRva2VuLXJlYWRlci1wcm9jZWR1cmUKICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChyOnN0YW5kYXJkLXRva2VuLXJlYWRlciAna2V5d29yZCkpKSkKICAg ICAgICAoc3ltYm9sLW1pc2MtY2hhcnMtdHIKICAgICAgICAgOzsgTWFrZSBzdXJlIGA6JyBpcyBo YW5kbGVkIG9ubHkgYnkgdGhlIGtleXdvcmQgdG9rZW4gcmVhZGVyLgogICAgICAgICAobWFrZS1j b2xvbi1mcmVlLXRva2VuLXJlYWRlcgogICAgICAgICAgKHI6c3RhbmRhcmQtdG9rZW4tcmVhZGVy ICdyNnJzLXN5bWJvbC1taXNjLWNoYXJzKSkpKQoKCiAgICA7OyBOb3RlOiB3ZSB1c2UgdGhlIGBy NnJzLXN5bWJvbC0qJyBhbmQgYHI2cnMtbnVtYmVyJyB0b2tlbiByZWFkZXJzIHNpbmNlCiAgICA7 OyB0aGV5IGNvbnNpZGVyIHNxdWFyZSBicmFja2V0cyBhcyBkZWxpbWl0ZXJzLgogICAgKHI6bWFr ZS1yZWFkZXIgKGNvbnMqIChyOm1ha2UtdG9rZW4tcmVhZGVyICNcIyAmc2hhcnAtcmVhZGVyKQog ICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9uLWtleXdvcmRzCiAgICAgICAgICAgICAgICAg ICAgICAgICAgc3ltYm9sLW1pc2MtY2hhcnMtdHIKICAgICAgICAgICAgICAgICAgICAgICAgICAo bWFwIHI6c3RhbmRhcmQtdG9rZW4tcmVhZGVyCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBgKHdoaXRlc3BhY2UKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V4cCBzdHJp bmcgcjZycy1udW1iZXIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcjZycy1zeW1i b2wtbG93ZXItY2FzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByNnJzLXN5bWJv bC11cHBlci1jYXNlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1b3RlLXF1YXNp cXVvdGUtdW5xdW90ZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZW1pY29sb24t Y29tbWVudAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza3JpYmUtZXhwKSkpCiAg ICAgICAgICAgICAgICAgICAjZiA7OyB1c2UgdGhlIGRlZmF1bHQgZmF1bHQgaGFuZGxlcgogICAg ICAgICAgICAgICAgICAgJ3JlYWRlci9yZWNvcmQtcG9zaXRpb25zCiAgICAgICAgICAgICAgICAg ICApKSkKCihkZWZ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uKSkpCiAgICAKICAgICgodmFsdWUgLi4uKSAobWFwIHNmeC0+c3ht bCB2YWx1ZSkpCiAgICAoXyBzZngpKSkKCjs7Cjs7IEVudmlyb25tZW50IGRlZmluaXRpb24KOzsK OzsgRklYTUU6IHRoZSBlbnZpcm9ubWVudCBpcyBoYXJkY29kZWQgaW5zaWRlIGZseWV2YWwKOzsK Cih1c2UtbW9kdWxlcyAocGVyc29uKSkKKGRlZmluZSB2YWx1ZSAobWFrZS1wYXJhbWV0ZXIgNDIp KQoKKGRlZmluZSBhbWlyb3VjaGUgKG1ha2UtcGVyc29uICJhbWlyb3VjaGUiIDMwKSkKKGRlZmlu ZSBqdWxpZW4gKG1ha2UtcGVyc29uICJqdWxpZW4iIDMwKSkKKGRlZmluZSBtZXogKG1ha2UtcGVy c29uICJtZXoiIDI3KSkKCihkZWZpbmUgZXhhbXBsZS1lbnYgKHNjaGVtZS1yZXBvcnQtZW52aXJv bm1lbnQgNSkpCihtb2R1bGUtYWRkISBleGFtcGxlLWVudgogICAgICAgICAgICAgJ3RpdGxlCiAg ICAgICAgICAgICAobWFrZS12YXJpYWJsZSAobWFrZS1wYXJhbWV0ZXIgJyhoMSAiSMOpbGxvIGhh Y2tlciIpKSkpCgooZGVmaW5lIChleHRlbmQgYmFzZSBlbnYgY29udGV4dCkKICAobWFwIChsYW1i ZGEgKHBhaXIpCiAgICAgICAgIChtYXRjaCBwYWlyCiAgICAgICAgICAgICAgICAoKG5hbWUgdmFs dWUpCiAgICAgICAgICAgICAgICAgKG1vZHVsZS1hZGQhIGVudgogICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBuYW1lCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtYWtlLXZhcmlh YmxlIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1ha2UtcGFyYW1ldGVyIChmbHll dmFsIHZhbHVlIGVudikpKSkpKSkKICAgICAgIGNvbnRleHQpCiAgKGNhbGwtd2l0aC1vdXRwdXQt c3Rya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ZW1wbGF0ZS0+eG1sIGV4YW1wbGUtZW52IHBv cnQpKSkpKSkKCjs7IChvdXRwdXQpICA7OyBkaXNwbGF5IGh0bWwgdG8gc3Rkb3V0CgoKKHdpdGgt b3V0cHV0LXRvLWZpbGUgImluZGV4Lmh0bWwiCiAgKGxhbWJkYSAoKSAob3V0cHV0KSkpCg== --=_cfd15cf3eeb3323598123b3b341874e2 Content-Transfer-Encoding: base64 Content-Type: text/plain; name=base.sfx Content-Disposition: attachment; filename=base.sfx; size=1054 YChodG1sCiAgKGhlYWQKICAgKG1ldGEgKEAgOmNoYXJzZXQgInV0Zi04IikpCiAgICh0aXRsZSBb VGhpcyBpcyBhIHBhZ2UgZ2VuZXJhdGVkIGZyb20gc2NoZW1lXSkKICAgKG1ldGEgKEAgOm5hbWUg ImF1dGhvciIgOmNvbnRlbnQgIkFtaXJvdWNoZSBCT1VCRUtLSSA8YW1pcm91Y2hlQGh5cGVybW92 ZS5uZXQ+IikpCiAgIChtZXRhIChAIDpuYW1lICJ2aWV3cG9ydCIgOmNvbnRlbnQgIndpZHRoPWRl dmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0xIikpCiAgIChsaW5rIChAIDpyZWwgInN0eWxlc2hl ZXQiIDpocmVmICJzdGF0aWMvY3NzL2Jvb3RzdHJhcC5taW4uY3NzIikpCiAgIChsaW5rIChAIDpy ZWwgInN0eWxlc2hlZXQiIDpocmVmICJzdGF0aWMvY3NzL2Jvb3RzdHJhcC10aGVtZS5taW4uY3Nz IikpCiAgIChsaW5rIChAIDpyZWwgInN0eWxlc2hlZXQiIDpocmVmICJzdGF0aWMvY3NzL21haW4u Y3NzIikpKSAgCiAgKGJvZHkgKEAgOmNsYXNzICJpbmRleCIpCiAgICAgICAgKGRpdiAoQCA6Y2xh c3MgY29udGFpbmVyKQogICAgICAgICAgICAgKGRpdiAoQCA6Y2xhc3MgImhlYWRlciBjbGVhcmZp eCIpCiAgICAgICAgICAgICAgICAgIChuYXYKICAgICAgICAgICAgICAgICAgICh1bCAoQCA6Y2xh c3MgIm5hdiBuYXYtcGlsbHMgcHVsbC1yaWdodCIpICAgICAgICAgICAgICAgICAgICAgCiAgICAg ICAgICAgICAgICAgICAgICAgKGxpIChAIDpyb2xlICJwcmVzZW50YXRpb24iIDpjbGFzcyAiYWN0 aXZlIikKICAgICAgICAgICAgICAgICAgICAgICAgICAgKGEgKEAgOmhyZWYgIiMiKSBbSG9tZV0p KQogICAgICAgICAgICAgICAgICAgICAgIChsaSAoQCA6cm9sZSAicHJlc2VudGF0aW9uIiApCiAg ICAgICAgICAgICAgICAgICAgICAgICAgIChhIChAIDpocmVmICJtYWlsdG86YW1pcm91Y2hlQGh5 cGVyZGV2LmZyIikgW0NvbnRhY3RdKSkpKQogICAgICAgICAgICAgICAgICAoaDMgKEAgOmNsYXNz ICJ0ZXh0LW11dGVkIikgW2h5cGVyZGV2LmZyXSkpCiAgICAgICAgICAgICAoaDEgWywodGl0bGUp XSkKICAgICAgICAgICAgICwoaW50cm8pKSkpCg== --=_cfd15cf3eeb3323598123b3b341874e2 Content-Transfer-Encoding: base64 Content-Type: text/plain; name=index.sfx Content-Disposition: attachment; filename=index.sfx; size=170 KGV4dGVuZCAiYmFzZS5zZngiCiAgICAgICAgKGN1cnJlbnQtbW9kdWxlKQogICAgICAgIGAoKHRp dGxlIGAoaDEgW0jDqWxsbyBhZ2FpbiBoYWNrZXIhIV0pKQogICAgICAgICAgKGludHJvICJUaGlz IGlzIGEgbGl0dGxlIHByZXNlbnRhdGlvbiBvZiBzZnggdGVtcGxhdGUgbGFuZ3VhZ2UiKSkpCgo= --=_cfd15cf3eeb3323598123b3b341874e2--