r27204 - in /trunk/libhtml-wikiconverter-markdown-perl: Changes META.yml Makefile.PL debian/changelog lib/HTML/WikiConverter/Markdown.pm t/markdown.t t/pod-coverage.t t/runtests.pl

bremner-guest at users.alioth.debian.org bremner-guest at users.alioth.debian.org
Sun Nov 23 13:29:18 UTC 2008


Author: bremner-guest
Date: Sun Nov 23 13:29:15 2008
New Revision: 27204

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27204
Log:
svn-upgrade to new upstream; merge two UNRELEASED stanzas

Modified:
    trunk/libhtml-wikiconverter-markdown-perl/Changes
    trunk/libhtml-wikiconverter-markdown-perl/META.yml
    trunk/libhtml-wikiconverter-markdown-perl/Makefile.PL
    trunk/libhtml-wikiconverter-markdown-perl/debian/changelog
    trunk/libhtml-wikiconverter-markdown-perl/lib/HTML/WikiConverter/Markdown.pm
    trunk/libhtml-wikiconverter-markdown-perl/t/markdown.t
    trunk/libhtml-wikiconverter-markdown-perl/t/pod-coverage.t
    trunk/libhtml-wikiconverter-markdown-perl/t/runtests.pl

Modified: trunk/libhtml-wikiconverter-markdown-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-markdown-perl/Changes?rev=27204&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-markdown-perl/Changes (original)
+++ trunk/libhtml-wikiconverter-markdown-perl/Changes Sun Nov 23 13:29:15 2008
@@ -1,12 +1,20 @@
 # Revision history for HTML::WikiConverter::Markdown
 
-date: Thu Jul 20 18:00:00 EST 2006
+date: 2008-11-14
+version: 0.03
+changes:
+  - (bug #40914) require H::WC 0.63
+  - add perl license to Makefile.PL
+  - add more comprehensive test
+  - tighten pod-coverage.t loose ends
+
+date: 2006-07-20
 version: 0.02
 changes:
-  - require 0.60
+  - require H::WC 0.60
   - add attribute types
 
-date: Wed Jun 07 10:00:00 EST 2006
+date: 2006-07-07
 version: 0.01
 changes:
   - initial release (fulfill feature request: bug #18111)

Modified: trunk/libhtml-wikiconverter-markdown-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-markdown-perl/META.yml?rev=27204&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-markdown-perl/META.yml (original)
+++ trunk/libhtml-wikiconverter-markdown-perl/META.yml Sun Nov 23 13:29:15 2008
@@ -1,15 +1,24 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         HTML-WikiConverter-Markdown
-version:      0.02
-version_from: lib/HTML/WikiConverter/Markdown.pm
-installdirs:  site
+--- #YAML:1.0
+name:               HTML-WikiConverter-Markdown
+version:            0.03
+abstract:           Convert HTML to Markdown markup
+author:
+    - David J. Iberri <diberri at cpan.org>
+license:            perl
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
 requires:
-    HTML::Tagset:                  0
-    HTML::WikiConverter:           0.6
-    Params::Validate:              0
-    Test::More:                    0
-    URI:                           0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+    HTML::Tagset:         0
+    HTML::WikiConverter:  0.63
+    Params::Validate:     0
+    Test::More:           0
+    URI:                  0
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.48
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: trunk/libhtml-wikiconverter-markdown-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-markdown-perl/Makefile.PL?rev=27204&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-markdown-perl/Makefile.PL (original)
+++ trunk/libhtml-wikiconverter-markdown-perl/Makefile.PL Sun Nov 23 13:29:15 2008
@@ -5,12 +5,13 @@
 WriteMakefile(
     NAME                => 'HTML::WikiConverter::Markdown',
     AUTHOR              => 'David J. Iberri <diberri at cpan.org>',
+    LICENSE             => 'perl',
     VERSION_FROM        => 'lib/HTML/WikiConverter/Markdown.pm',
     ABSTRACT_FROM       => 'lib/HTML/WikiConverter/Markdown.pm',
     PL_FILES            => {},
     PREREQ_PM => {
         'Test::More' => 0,
-        'HTML::WikiConverter' => 0.60,
+        'HTML::WikiConverter' => 0.63,
         'HTML::Tagset' => 0,
         'Params::Validate' => 0,
         'URI' => 0,

Modified: trunk/libhtml-wikiconverter-markdown-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-markdown-perl/debian/changelog?rev=27204&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-markdown-perl/debian/changelog (original)
+++ trunk/libhtml-wikiconverter-markdown-perl/debian/changelog Sun Nov 23 13:29:15 2008
@@ -1,9 +1,18 @@
-libhtml-wikiconverter-markdown-perl (0.02-7) UNRELEASED; urgency=low
+libhtml-wikiconverter-markdown-perl (0.03-1) UNRELEASED; urgency=low
 
+  [ gregor herrmann <gregoa at debian.org>  ]
   * Add debian/README.source to document quilt usage, as required by
     Debian Policy since 3.8.0.
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
     (source stanza).
+
+  [ David Bremner <bremner at unb.ca> ]
+  * (NOT RELEASED YET) New upstream release
+    
+ -- David Bremner <bremner at unb.ca>  Sun, 23 Nov 2008 09:26:21 -0400
+
+libhtml-wikiconverter-markdown-perl (0.02-7) UNRELEASED; urgency=low
+
 
  -- gregor herrmann <gregoa at debian.org>  Wed, 06 Aug 2008 21:33:43 -0300
 

Modified: trunk/libhtml-wikiconverter-markdown-perl/lib/HTML/WikiConverter/Markdown.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-markdown-perl/lib/HTML/WikiConverter/Markdown.pm?rev=27204&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-markdown-perl/lib/HTML/WikiConverter/Markdown.pm (original)
+++ trunk/libhtml-wikiconverter-markdown-perl/lib/HTML/WikiConverter/Markdown.pm Sun Nov 23 13:29:15 2008
@@ -4,7 +4,7 @@
 use strict;
 
 use base 'HTML::WikiConverter';
-our $VERSION = '0.02';
+our $VERSION = '0.03';
 
 use Params::Validate ':types';
 use HTML::Tagset;
@@ -134,6 +134,7 @@
 sub _header_start {
   my( $self, $node, $rules ) = @_;
   return '' unless $self->header_style eq 'atx';
+
   ( my $level = $node->tag ) =~ s/\D//g;
   return unless $level;
 

Modified: trunk/libhtml-wikiconverter-markdown-perl/t/markdown.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-markdown-perl/t/markdown.t?rev=27204&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-markdown-perl/t/markdown.t (original)
+++ trunk/libhtml-wikiconverter-markdown-perl/t/markdown.t Sun Nov 23 13:29:15 2008
@@ -1,3 +1,5 @@
+use HTML::WikiConverter;
+
 local $/;
 require 't/runtests.pl';
 runtests( data => <DATA>, dialect => 'Markdown', wiki_uri => 'http://www.test.com/wiki/' );
@@ -321,3 +323,42 @@
 -------
 
 More fun stuff!
+__NEXT__
+more complete example ::header_style('atx')
+__H__
+<h2>Aaron Swartz's html2text</h2>
+
+<p>A handful of people have asked if there's a way to translate Markdown
+in reverse — to turn HTML back into Markdown-formatted plain text.
+The short answer is yes, by using Aaron Swartz's new version of
+<a href="http://www.aaronsw.com/2002/html2text/">html2text</a>:</p>
+
+<blockquote>
+  <p>html2text is a Python script that convers a page of HTML into clean,
+  easy-to-read plain ASCII. Better yet, that ASCII also happens to be
+  valid Markdown (a text-to-HTML format).</p>
+</blockquote>
+
+<p>html2text works so well that I'm planning to use it to convert most of
+my old Daring Fireball articles (the ones I wrote in raw HTML). It's
+worth noting that if you start with a Markdown document, translate it
+to HTML, then use html2text to go back to Markdown, it won't give you
+the exact same document you started with. That sort of complete
+round-trip fidelity simply is not possible, but html2text comes pretty
+close.</p>
+
+<p>Also, much like Markdown and SmartyPants, html2text works as a BBEdit
+text filter. Simply save a copy in the Unix Filters folder in your
+BBEdit Support folder.</p>
+__W__
+## Aaron Swartz's html2text
+
+A handful of people have asked if there's a way to translate Markdown in reverse — to turn HTML back into Markdown-formatted plain text. The short answer is yes, by using Aaron Swartz's new version of [html2text][1]:
+
+> html2text is a Python script that convers a page of HTML into clean, easy-to-read plain ASCII. Better yet, that ASCII also happens to be valid Markdown (a text-to-HTML format).
+
+html2text works so well that I'm planning to use it to convert most of my old Daring Fireball articles (the ones I wrote in raw HTML). It's worth noting that if you start with a Markdown document, translate it to HTML, then use html2text to go back to Markdown, it won't give you the exact same document you started with. That sort of complete round-trip fidelity simply is not possible, but html2text comes pretty close.
+
+Also, much like Markdown and SmartyPants, html2text works as a BBEdit text filter. Simply save a copy in the Unix Filters folder in your BBEdit Support folder.
+
+  [1]: http://www.aaronsw.com/2002/html2text/

Modified: trunk/libhtml-wikiconverter-markdown-perl/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-markdown-perl/t/pod-coverage.t?rev=27204&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-markdown-perl/t/pod-coverage.t (original)
+++ trunk/libhtml-wikiconverter-markdown-perl/t/pod-coverage.t Sun Nov 23 13:29:15 2008
@@ -9,6 +9,7 @@
      get_elem_contents
     |get_wiki_page
     |get_attr_str
+    |elem_within_block
     |is_camel_case
     |rule
     |rules

Modified: trunk/libhtml-wikiconverter-markdown-perl/t/runtests.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-markdown-perl/t/runtests.pl?rev=27204&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-markdown-perl/t/runtests.pl (original)
+++ trunk/libhtml-wikiconverter-markdown-perl/t/runtests.pl Sun Nov 23 13:29:15 2008
@@ -76,15 +76,37 @@
     my( $html, $wiki ) = split /__W__\n/, $test;
     $html =~ s/__H__\n//;
 
+#    $name =~ s{\s*\:\:(\w+\([^\)]*?\))}{
+#      my $method_call = $1;
+#      eval "\$wc->$method_call;";
+#      die "Failed test call ($name): $@" if $@;
+#      '';
+#    }ge;
+
+    my( $todo, $todo_reason );
     $name =~ s{\s*\:\:(\w+\([^\)]*?\))}{
-      my $method_call = $1;
-      eval "\$wc->$method_call;";
-      die "Failed test call ($name): $@" if $@;
+      my $keyword = $1;
+      if( $keyword =~ /TODO\((\"|\')(.*?)\1/ ) {
+        $todo = 1;
+        $todo_reason = $2;
+      } else {
+        my $method_call = $keyword;
+        eval "\$wc->$method_call;";
+        die "Failed test call ($name): $@" if $@;
+      }
       '';
     }ge;
 
     for( $html, $wiki ) { s/^\n+//; s/\n+$// }
-    is( $wc->html2wiki($html), $wiki, $name );
+
+    if( $todo ) {
+      TODO: {
+        local $TODO = $todo_reason;
+        is( $wc->html2wiki($html), $wiki, $name );
+      }
+    } else {
+      is( $wc->html2wiki($html), $wiki, $name );
+    }
   }
 
   #file_test($wc) unless $minimal;




More information about the Pkg-perl-cvs-commits mailing list