Permalink
Browse files

Initial release

  • Loading branch information...
0 parents commit 8e2fbc86ea0c1d8c73643f5b4d5dae8e9c3cfd1a @SineSwiper committed May 3, 2012
@@ -0,0 +1,19 @@
+MANIFEST
+MANIFEST.bak
+Makefile
+Makefile.old
+Build
+Build.bat
+META.*
+MYMETA.*
+.build/
+_build/
+cover_db/
+blib/
+inc/
+.lwpcookies
+.last_cover_stats
+nytprof.out
+pod2htm*.tmp
+pm_to_blib
+Software-License-CCpack-*
@@ -0,0 +1,6 @@
+Revision history for Software-License
+
+{{$NEXT}}
+
+1.000 2012-05-03
+ Initial version
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+### This code basically just generates the license PMs on-the-fly ###
+
+for CODE in BY BY-SA BY-NC BY-ND BY-NC-SA BY-NC-ND; do
+ VER=3.0
+ PACKAGE=CC_`echo $CODE | tr '-' '_'`_3_0
+ URL=http://creativecommons.org/licenses/${CODE,,}/$VER/
+ LNAME=`curl -s $URL'legalcode' | html2text -style pretty | head -14 | tail -1 | perl -pe 's/\n//g;'`
+ META_NAME=restricted
+ [ $CODE == "BY-SA" -o $CODE == "BY" ] && META_NAME=unrestricted
+
+ echo "use strict;
+use warnings;
+package Software::License::$PACKAGE;
+use base 'Software::License';
+# ABSTRACT: Creative Commons $LNAME License (CC $CODE $VER)
+
+sub name { 'Creative Commons $LNAME License (CC $CODE $VER)' }
+sub url { '$URL' }
+
+sub version { '$VER' }
+sub meta_name { '$META_NAME' }
+
+1;
+__DATA__
+__NOTICE__
+This work, created by {{\$self->holder}}, is licensed under a
+Creative Commons $LNAME License.
+" > $PACKAGE.pm
+ curl -s $URL |
+ html2text -style pretty -width 77 |
+ perl -e '$_ = join("", <>); s/ Attribute this work:.+^ others can find the original work as well.\n//ms;
+ s/\*\s*\n\s+(\w)/\* $1/gms; s/(You are free:)/$1\n/g; s/\n\n(\* to )/\n$1/g; s/\n{2,}/\n\n/gms; print $_;' |
+ perl -pe 's/\&mdash;|—/--/g; s/-- /-- /g;' |
+ head -n -54 | tail -n +29 >> $PACKAGE.pm
+ echo "__LICENSE__" >> $PACKAGE.pm
+ curl -s $URL'legalcode' |
+ html2text -style pretty -width 77 |
+ perl -e '$_ = join("", <>); s/\n{2,}/\n\n/gms; s/(\*|^ \w\.)\s*\n\s+(\w)/$1 $2/gms; print $_;' |
+ perl -pe 's/\&mdash;|—/--/g; s/-- /-- /g;' |
+ head -n -25 | tail -n +5 >> $PACKAGE.pm
+done
+
+# .html2textrc:
+#
+# P.vspace.before = 1
+# OL.vspace.between = 1
+# UL.vspace.between = 1
+# DIR.vspace.between = 1
+# MENU.vspace.between = 1
+# DL.vspace.between = 1
+# A.attributes.internal_link = NONE
+# A.attributes.external_link = NONE
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+### This code basically just generates the license PMs on-the-fly ###
+
+for CODE in PDM; do
+ VER=1.0
+ PACKAGE=CC_`echo $CODE | tr '-' '_'`_1_0
+ URL=http://creativecommons.org/publicdomain/mark/$VER/
+ LNAME="Public Domain Mark 1.0"
+ META_NAME=unrestricted
+
+ echo "use strict;
+use warnings;
+package Software::License::$PACKAGE;
+use base 'Software::License';
+# ABSTRACT: Creative Commons $LNAME
+
+sub name { 'Creative Commons $LNAME' }
+sub url { '$URL' }
+
+sub version { '$VER' }
+sub meta_name { '$META_NAME' }
+
+1;
+__DATA__
+__LICENSE__" > $PACKAGE.pm
+ curl -s $URL |
+ html2text -style pretty -width 77 |
+ perl -e '$_ = join("", <>); s/\*\s*\n\s+(\w)/\* $1/gms; s/\n\n(\* to )/\n$1/g; s/\n{2,}/\n\n/gms;
+ s/^\* o Non-binding.+(\* Other Information)/$1/ms; print $_;' |
+ perl -pe 's/\&mdash;|—/--/g; s/-- /-- /g;' |
+ head -n -62 | tail -n +5 >> $PACKAGE.pm
+done
+
+# .html2textrc:
+#
+# P.vspace.before = 1
+# OL.vspace.between = 1
+# UL.vspace.between = 1
+# DIR.vspace.between = 1
+# MENU.vspace.between = 1
+# DL.vspace.between = 1
+# A.attributes.internal_link = NONE
+# A.attributes.external_link = NONE
@@ -0,0 +1,20 @@
+name = Software-License-CCpack
+author = Brendan Byrd <BBYRD@CPAN.org>
+license = LGPL_3_0
+copyright_holder = Brendan Byrd
+main_module = lib/Software/License/CCpack.pod
+version = 1.0
+
+[@RJBS]
+manual_version = 1
+github_issues = 1
+
+[GithubMeta]
+user = SineSwiper
+remote = origin
+
+[ReadmeAnyFromPod]
+
+[%PAUSE]
+username = BBYRD
+password =
Oops, something went wrong.

0 comments on commit 8e2fbc8

Please sign in to comment.