Re: Markdown

Sherwood Botsford <[email protected]> Fri, 10 Feb 2017 17:02:12 -0700
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <CAOX=2F-R_MbZgnW0_z4+kmKwjAfvghqWvnD7wZgi8FK9CUyN0g@mail.gmail.com>
--===============8937079787187576703==
Content-Type: multipart/alternative; boundary=001a114e3db8862e13054835ef12

--001a114e3db8862e13054835ef12
Content-Type: text/plain; charset=UTF-8

Most of my files work like this:

This is a typical web page for me.

[% PROCESS header.inc
Title = "Sherwood.s Forests Links"
Desc = "Sherwood's Forests Links to More Information"
%]


<DIV id="content">
[% FILTER multimarkdown %]
# Shelterbelts

Alberta Agriculture and Rural Development has a good overview on
shelterbelts. This article is aimed at use for soil conservation, but the
discussion of species is useful to anyone
planning a shelterbelt.

* [Field Shelterbelts for Soil Conservation][FSSC]
*  [Shelterbelt Varieties for Alberta][SVA]
* [Shelterbelt Planning & Establishment][SPE]  This one is the first in a
chain of articles.

The Canadian government started the Prairie Farm Reclamation Administration
during
the height of the dust bowl in the dirty thirties.  PFRA has been providing
trees
and advice on using trees for shelterbelts for decades.  While I don't
agree with
all of their recommendations, I concede that they have a lot more
experience than I
do. Probably another area where I'm not quite right. The main page has
PFRA's application
and contact information. The publications page has a ton of info about
planning, planting,
maintenance and uses for shelterbelts.

* [PFRA Main Page][PFRA]
* [Shelterbelt Program Publications][SPP]

[FSSC]: http://www1.agric.gov.ab.ca/\$department/deptdocs.nsf/all/agdex2073
[SVA]:  http://www1.agric.gov.ab.ca/\$department/deptdocs.nsf/all/agdex981
  [SPE]:
http://www.agr.gc.ca/eng/science-and-innovation/agricultural-practices/agroforestry/shelterbelt-planning-and-establishment/?id=1344636433852




[% PROCESS Copyright.inc %][% END %]
</div>
[% INCLUDE footer.inc %]

*********************************

Now could you not just do this:

[% PROCESS header.inc
Title = "Sherwood.s Forests Links"
Desc = "Sherwood's Forests Links to More Information"
%]
[% FILTER multimarkdown %]

[% INCLUDE YOURFILE.md %]


[% PROCESS Copyright.inc %][% END %]

[% INCLUDE footer.inc %]


Or use WRAP instead to process MD files?

Regards

Sherwood


On 10 February 2017 at 11:41, Johan Vromans <[email protected]> wrote:

> Thanks for all the feedback.
>
> It seems that Text::MultiMarkdown and Template::Plugin::MultiMarkdown are
> sufficiently stable and useful.
>
> Usually I process templates using the ttree tool. I can configure it to
> accept both .tt2 and .md templates, but is there a way to automatically run
> the .md templates through the MultiMarkdown filter?
>
> -- Johan
>
> _______________________________________________
> templates mailing list
> [email protected]
> http://mail.template-toolkit.org/mailman/listinfo/templates
>

--001a114e3db8862e13054835ef12
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:&quot;ti=
mes new roman&quot;,serif">Most of my files work like this:</div><div class=
=3D"gmail_default" style=3D"font-family:&quot;times new roman&quot;,serif">=
<br></div><div class=3D"gmail_default" style=3D"font-family:&quot;times new=
 roman&quot;,serif">This is a typical web page for me.</div><div class=3D"g=
mail_default" style=3D"font-family:&quot;times new roman&quot;,serif"><br><=
/div><div class=3D"gmail_default"><div class=3D"gmail_default"><font face=
=3D"times new roman, serif">[% PROCESS header.inc</font></div><div class=3D=
"gmail_default"><font face=3D"times new roman, serif"><span class=3D"gmail-=
Apple-tab-span" style=3D"white-space:pre">	</span>Title =3D &quot;Sherwood.=
s Forests Links&quot;</font></div><div class=3D"gmail_default"><font face=
=3D"times new roman, serif"><span class=3D"gmail-Apple-tab-span" style=3D"w=
hite-space:pre">	</span>Desc =3D &quot;Sherwood&#39;s Forests Links to More=
 Information&quot;</font></div><div class=3D"gmail_default"><font face=3D"t=
imes new roman, serif">%]</font></div><div class=3D"gmail_default"><font fa=
ce=3D"times new roman, serif"><br></font></div><div class=3D"gmail_default"=
><font face=3D"times new roman, serif"><br></font></div><div class=3D"gmail=
_default"><font face=3D"times new roman, serif">&lt;DIV id=3D&quot;content&=
quot;&gt;</font></div><div class=3D"gmail_default"><font face=3D"times new =
roman, serif">[% FILTER multimarkdown %]</font></div><div class=3D"gmail_de=
fault"><font face=3D"times new roman, serif"># Shelterbelts</font></div><di=
v class=3D"gmail_default"><font face=3D"times new roman, serif"><br></font>=
</div><div class=3D"gmail_default"><font face=3D"times new roman, serif">Al=
berta Agriculture and Rural Development has a good overview on shelterbelts=
. This article is aimed at use for soil conservation, but the discussion of=
 species is useful to anyone</font></div><div class=3D"gmail_default"><font=
 face=3D"times new roman, serif">planning a shelterbelt.</font></div><div c=
lass=3D"gmail_default"><font face=3D"times new roman, serif"><br></font></d=
iv><div class=3D"gmail_default"><font face=3D"times new roman, serif">* [Fi=
eld Shelterbelts for Soil Conservation][FSSC]</font></div><div class=3D"gma=
il_default"><font face=3D"times new roman, serif">* =C2=A0[Shelterbelt Vari=
eties for Alberta][SVA]</font></div><div class=3D"gmail_default"><font face=
=3D"times new roman, serif">* [Shelterbelt Planning &amp; Establishment][SP=
E] =C2=A0This one is the first in a chain of articles. =C2=A0</font></div><=
div class=3D"gmail_default"><font face=3D"times new roman, serif"><br></fon=
t></div><div class=3D"gmail_default"><font face=3D"times new roman, serif">=
The Canadian government started the Prairie Farm Reclamation Administration=
 during</font></div><div class=3D"gmail_default"><font face=3D"times new ro=
man, serif">the height of the dust bowl in the dirty thirties.=C2=A0 PFRA h=
as been providing trees</font></div><div class=3D"gmail_default"><font face=
=3D"times new roman, serif">and advice on using trees for shelterbelts for =
decades.=C2=A0 While I don&#39;t agree with</font></div><div class=3D"gmail=
_default"><font face=3D"times new roman, serif">all of their recommendation=
s, I concede that they have a lot more experience than I</font></div><div c=
lass=3D"gmail_default"><font face=3D"times new roman, serif">do. Probably a=
nother area where I&#39;m not quite right. The main page has PFRA&#39;s app=
lication</font></div><div class=3D"gmail_default"><font face=3D"times new r=
oman, serif">and contact information. The publications page has a ton of in=
fo about planning, planting,</font></div><div class=3D"gmail_default"><font=
 face=3D"times new roman, serif">maintenance and uses for shelterbelts.</fo=
nt></div><div class=3D"gmail_default"><font face=3D"times new roman, serif"=
><br></font></div><div class=3D"gmail_default"><font face=3D"times new roma=
n, serif">* [PFRA Main Page][PFRA]</font></div><div class=3D"gmail_default"=
><font face=3D"times new roman, serif">* [Shelterbelt Program Publications]=
[SPP]</font></div><div class=3D"gmail_default"><font face=3D"times new roma=
n, serif"><br></font></div><div class=3D"gmail_default"><font face=3D"times=
 new roman, serif">[FSSC]: <a href=3D"http://www1.agric.gov.ab.ca/\$departm=
ent/deptdocs.nsf/all/agdex2073">http://www1.agric.gov.ab.ca/\$department/de=
ptdocs.nsf/all/agdex2073</a></font></div><div class=3D"gmail_default"><font=
 face=3D"times new roman, serif">[SVA]: =C2=A0<a href=3D"http://www1.agric.=
gov.ab.ca/\$department/deptdocs.nsf/all/agdex981">http://www1.agric.gov.ab.=
ca/\$department/deptdocs.nsf/all/agdex981</a></font></div><div class=3D"gma=
il_default"><font face=3D"times new roman, serif">=C2=A0 [SPE]: <a href=3D"=
http://www.agr.gc.ca/eng/science-and-innovation/agricultural-practices/agro=
forestry/shelterbelt-planning-and-establishment/?id=3D1344636433852">http:/=
/www.agr.gc.ca/eng/science-and-innovation/agricultural-practices/agroforest=
ry/shelterbelt-planning-and-establishment/?id=3D1344636433852</a></font></d=
iv><div class=3D"gmail_default"><font face=3D"times new roman, serif"><br><=
/font></div><div class=3D"gmail_default"><font face=3D"times new roman, ser=
if"><br></font></div><div class=3D"gmail_default"><font face=3D"times new r=
oman, serif"><br></font></div><div class=3D"gmail_default"><font face=3D"ti=
mes new roman, serif"><br></font></div><div class=3D"gmail_default"><font f=
ace=3D"times new roman, serif">[% PROCESS Copyright.inc %][% END %]</font><=
/div><div class=3D"gmail_default"><font face=3D"times new roman, serif">&lt=
;/div&gt;</font></div><div class=3D"gmail_default"><font face=3D"times new =
roman, serif">[% INCLUDE footer.inc %]</font></div><div style=3D"font-famil=
y:&quot;times new roman&quot;,serif"><br></div><div style=3D"font-family:&q=
uot;times new roman&quot;,serif">*********************************</div><di=
v style=3D"font-family:&quot;times new roman&quot;,serif"><br></div><div st=
yle=3D"font-family:&quot;times new roman&quot;,serif">Now could you not jus=
t do this:</div><div style=3D"font-family:&quot;times new roman&quot;,serif=
"><br></div><div><div><font face=3D"times new roman, serif">[% PROCESS head=
er.inc</font></div><div><font face=3D"times new roman, serif"><span class=
=3D"gmail-Apple-tab-span" style=3D"white-space:pre">	</span>Title =3D &quot=
;Sherwood.s Forests Links&quot;</font></div><div><font face=3D"times new ro=
man, serif"><span class=3D"gmail-Apple-tab-span" style=3D"white-space:pre">=
	</span>Desc =3D &quot;Sherwood&#39;s Forests Links to More Information&quo=
t;</font></div><div><font face=3D"times new roman, serif">%]</font></div><d=
iv><span style=3D"font-family:&quot;times new roman&quot;,serif">[% FILTER =
multimarkdown %]</span><font face=3D"times new roman, serif"><br></font></d=
iv><div><font face=3D"times new roman, serif"><br></font></div><div><font f=
ace=3D"times new roman, serif">[% INCLUDE YOURFILE.md %]</font></div><div><=
font face=3D"times new roman, serif"><br></font></div><div><font face=3D"ti=
mes new roman, serif"><br></font></div><div><font face=3D"times new roman, =
serif">[% PROCESS Copyright.inc %][% END %]</font></div><div><br></div><div=
><font face=3D"times new roman, serif">[% INCLUDE footer.inc %]</font></div=
><div style=3D"font-family:&quot;times new roman&quot;,serif"><br></div></d=
iv><div style=3D"font-family:&quot;times new roman&quot;,serif"><br></div><=
div style=3D"font-family:&quot;times new roman&quot;,serif">Or use WRAP ins=
tead to process MD files?</div></div></div><div class=3D"gmail_extra"><br c=
lear=3D"all"><div><div class=3D"gmail_signature" data-smartmail=3D"gmail_si=
gnature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div>=
Regards</div><div><br></div><div>Sherwood<br><br></div></div></div></div></=
div></div></div></div>
<br><div class=3D"gmail_quote">On 10 February 2017 at 11:41, Johan Vromans =
<span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_bl=
ank">[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex">Thanks for all the feedback.<br>
<br>
It seems that Text::MultiMarkdown and Template::Plugin::<wbr>MultiMarkdown =
are<br>
sufficiently stable and useful.<br>
<br>
Usually I process templates using the ttree tool. I can configure it to<br>
accept both .tt2 and .md templates, but is there a way to automatically run=
<br>
the .md templates through the MultiMarkdown filter?<br>
<br>
-- Johan<br>
<br>
______________________________<wbr>_________________<br>
templates mailing list<br>
<a href=3D"mailto:[email protected]">templates@template-toolki=
t.org</a><br>
<a href=3D"http://mail.template-toolkit.org/mailman/listinfo/templates" rel=
=3D"noreferrer" target=3D"_blank">http://mail.template-toolkit.<wbr>org/mai=
lman/listinfo/templates</a><br>
</blockquote></div><br></div>

--001a114e3db8862e13054835ef12--


--===============8937079787187576703==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

--===============8937079787187576703==--