Skip to content

Instantly share code, notes, and snippets.

@Mouq
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mouq/a61a6912a745d3f2227c to your computer and use it in GitHub Desktop.
Save Mouq/a61a6912a745d3f2227c to your computer and use it in GitHub Desktop.
diff --git a/htmlify.p6 b/htmlify.p6
index c162457..66b3c23 100755
--- a/htmlify.p6
+++ b/htmlify.p6
@@ -135,6 +135,7 @@ sub MAIN(
process-pod-dir 'Language', :$sparse;
process-pod-dir 'Type', :sorted-by{ %h{.key} // -1 }, :$sparse;
+ process-pod-dir 'NativeType', 'type', :sorted-by{ %h{.key} // -1 }, :$sparse;
pygmentize-code-blocks unless $no-highlight;
@@ -163,7 +164,7 @@ sub MAIN(
}
}
-sub process-pod-dir($dir, :&sorted-by = &[cmp], :$sparse) {
+sub process-pod-dir($dir, $kind = $dir.lc, :&sorted-by = &[cmp], :$sparse) {
say "Reading lib/$dir ...";
my @pod-sources =
recursive-dir("lib/$dir/")\
@@ -180,7 +181,6 @@ sub process-pod-dir($dir, :&sorted-by = &[cmp], :$sparse) {
say "Processing $dir Pod files ...";
my $total = +@pod-sources;
- my $kind = $dir.lc;
for @pod-sources.kv -> $num, (:key($filename), :value($file)) {
printf "% 4d/%d: % -40s => %s\n", $num+1, $total, $file.path, "$kind/$filename";
my $pod = EVAL(slurp($file.path) ~ "\n\$=pod")[0];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment