Commits

Shlomi Fish committed 1e396bd

Extract the lib/cpan_dists.wml include.

It abstracts some link lists to CPAN modules.

Comments (0)

Files changed (6)

 $(T2_DEST)/humour.html $(T2_DEST)/humour-heb.html: lib/pages/t2/humour.wml
 $(T2_DEST)/work/hire-me/index.html $(T2_DEST)/work/hire-me/hebrew.html: lib/pages/t2/hire-me.wml
 
+$(T2_DEST)/open-source/projects/Module-Format/index.html $(T2_DEST)/open-source/projects/File-Find-Object/index.html $(T2_DEST)/open-source/projects/File-Dir-Dumper/index.html: lib/cpan_dists.wml
+
 docbook_extended: $(DOCBOOK4_FOS) $(DOCBOOK4_PDFS) \
 	$(DOCBOOK5_FOS) $(DOCBOOK5_PDFS) \
 	install_docbook4_pdfs install_docbook4_rtfs \
+* Extract <bitbucket_cpan_dist_links> in lib/cpan_dists.wml from more places.
+
+* Create a block to license a project under t2/open-source/projects/ under
+the X11 licence.
+
 * Fortunes Atom Feed:
     - Make it validate
     - Syndicate it into the rest.

lib/cpan_dists.wml

+<define-tag bitbucket_cpan_dist_links endtag="required">
+
+<preserve bitbucket_url dist freecode_url />
+
+<set-var %attributes />
+
+<ul>
+
+<li>
+<a href="<get-var bitbucket_url />">BitBucket.org
+Repository</a> - contains version control and other resources.
+</li>
+
+<li>
+<a href="http://metacpan.org/release/<get-var dist />">File-Find-Object
+on MetaCPAN</a> - download, documentation, browsing and information.
+</li>
+
+<li>
+<a href="http://search.cpan.org/dist/<get-var dist />/">File-Find-Object
+on search.cpan.org</a>.
+</li>
+
+<if "<get-var freecode_url />" "<li><a href="<get-var freecode_url />">Freecode Record</a></li>" />
+
+%body
+
+</ul>
+
+<restore bitbucket_url dist freecode_url />
+
+</define-tag>

t2/open-source/projects/File-Dir-Dumper/index.html.wml

 #include '../template.wml'
+#include "cpan_dists.wml"
 
 <latemp_subject "File-Dir-Dumper - Serialise Meta-Data of Directory Structures" />
 
 
 <h2 id="project-links">Project Links</h2>
 
-<ul>
-
-<li>
-<a href="https://bitbucket.org/shlomif/perl-file-dir-dumper">Bitbucket.org/Mercurial repository</a>
-</li>
-
-<li>
-<a href="http://search.cpan.org/dist/File-Dir-Dumper/">search.cpan.org
-Record</a>
-</li>
-
-<li>
-<a href="http://cpan.uwinnipeg.ca/dist/File-Dir-Dumper">kobesearch Record</a>
-</li>
-
-<li>
-<a href="http://freecode.com/projects/file-dir-dumper/">Freecode
-Record</a>
-</li>
-
-</ul>
+<bitbucket_cpan_dist_links
+    dist="File-Dir-Dumper"
+    bitbucket_url="https://bitbucket.org/shlomif/perl-file-dir-dumper"
+    freecode_url="http://freecode.com/projects/file-dir-dumper/">
+</bitbucket_cpan_dist_links >
 
 <h2 id="similar-projects">Similar Projects</h2>
 

t2/open-source/projects/File-Find-Object/index.html.wml

 #include '../template.wml'
+#include "cpan_dists.wml"
 
 <latemp_subject "File-Find-Object - CPAN Module to Traverse a Directory Tree" />
 
 
 <h3 id="links-file-find-object">For File-Find-Object</h3>
 
-<ul>
-
-<li>
-<a href="https://bitbucket.org/shlomif/perl-file-find-object">BitBucket.org
-Repository</a> - contains version control and other resources.
-</li>
-
-<li>
-<a href="http://metacpan.org/release/File-Find-Object">File-Find-Object
-on MetaCPAN</a>
-</li>
-
-<li>
-<a href="http://search.cpan.org/dist/File-Find-Object/">File-Find-Object
-on search.cpan.org</a> - download and more information.
-</li>
-
-<li>
-<a href="http://freecode.com/projects/file-find-object/">Freecode
-Record</a>
-</li>
-
-</ul>
+<bitbucket_cpan_dist_links
+    dist="File-Find-Object"
+    bitbucket_url="https://bitbucket.org/shlomif/perl-file-find-object"
+    freecode_url="http://freecode.com/projects/file-find-object/">
+</bitbucket_cpan_dist_links >
 
 <h3 id="links-file-find-object-rule">File-Find-Object-Rule</h3>
 
-<ul>
-
-<li>
-<a href="http://bitbucket.org/shlomif/perl-file-find-object-rule">BitBucket.org
-repository</a> - contains version control and other resources.
-</li>
-
-<li>
-<a href="http://metacpan.org/release/File-Find-Object-Rule">File-Find-Object-Rule
-on MetaCPAN.org</a> - download and more information.
-</li>
-
-<li>
-<a href="http://search.cpan.org/dist/File-Find-Object-Rule/">File-Find-Object-Rule
-on search.cpan.org</a>
-</li>
+<bitbucket_cpan_dist_links
+    dist="File-Find-Object-Rule"
+    bitbucket_url="https://bitbucket.org/shlomif/perl-file-find-object-rule">
+</bitbucket_cpan_dist_links >
 
 <define-tag freecode_removed>
 <li>
 </li>
 </define-tag>
 
-</ul>
 
 <h2 id="licence">Licence</h2>
 

t2/open-source/projects/Module-Format/index.html.wml

 #include '../template.wml'
+#include "cpan_dists.wml"
 
 <set-var modname="Module-Format" />
 <set-var sco_mod="http://search.cpan.org/dist/<get-var modname />/" />
 
 <h3 id="links-module-format">For <get-var modname /></h3>
 
-<ul>
-
-<li>
-<a href="<get-var sco_mod />"><get-var modname />
-on search.cpan.org</a> - download and more information.
-</li>
-
-<li>
-<a href="http://cpan.uwinnipeg.ca/dist/<get-var modname />"><get-var modname />
-on kobesearch</a>
-</li>
-
-<li>
-<a href="http://bitbucket.org/shlomif/web-cpan">BitBucket.org Mercurial
-repository</a> - contains the history of the code, the version control
-source code, and other resources.
-</li>
-
-<li>
-<a href="http://freecode.com/projects/module-format">Freecode Record - FILL IN</a>
-</li>
-
-</ul>
+<bitbucket_cpan_dist_links
+    dist="<get-var modname />"
+    bitbucket_url="http://bitbucket.org/shlomif/web-cpan"
+    freecode_url="http://freecode.com/projects/module-format">
+</bitbucket_cpan_dist_links >
 
 <h2 id="licence">Licence</h2>