[SCM] librdf-ns-perl Debian packaging branch, master, updated. debian/20130208-1-22-g47de138

Jakob Voss voss at gbv.de
Fri Apr 19 13:28:39 UTC 2013


The following commit has been merged in the master branch:
commit 96a3930e9c0e6131abee80c9d50b76f079b9bb57
Author: Jakob Voss <voss at gbv.de>
Date:   Mon Oct 31 10:10:53 2011 +0100

    added README

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e7683df
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*~
+*.bak
diff --git a/README b/README
new file mode 100644
index 0000000..79bb178
--- /dev/null
+++ b/README
@@ -0,0 +1,35 @@
+Working with RDF data is cumbersome, unless you define namespaces and prefixes
+for abbreviation. Defining namespaces, however, is also cumbersome because you
+need to repeat this step in every environment. This is silly because in most
+cases we use the same URI namespaces anyway. Some popular examples:
+
+    @prefix owl: <http://www.w3.org/2002/07/owl#> .            Turtle/N3 syntax
+
+    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>     SPARQL syntax
+
+    xlmns:rdf="http://xmlns.com/foaf/0.1/"                       RDF/XML syntax
+
+Fortunately there is http://prefix.cc, a registry where people can vote the most
+popular URI namespaces. It is best practice to use the same prefixes as defined
+there. The Perl module RDF::NS contains regular snapshots from http://prefix.cc
+for easy reuse without having to download them in every application.
+
+In short, you can get a full prefix-to-namespace mapping as blessed hash with
+
+    RDF::NS->new('20111028')
+
+The only argument to the constructor is the version number, that is equivalent
+to the date of a particular snapshot. The changelog in the file Changes lists
+all snapshots with their modifications. RDF::NS provides some handy methods,
+for instance you can use method-calls to create full URIs:
+
+    $ns = RDF::NS->new('20111028');
+
+    $ns->rdf_type; # returns "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+
+The subclass RDF::NS::Trine, shipped with RDF::NS returns blessed URI objects
+instead of plain strings, as expected by RDF::Trine. Please have a look at the
+documentation for more information.
+
+The source code of RDF::NS is available at https://github.com/nichtich/RDF-NS/
+with releases at http://search.cpan.org/dist/RDF-NS/.
diff --git a/update.pl b/update.pl
index acfd3e0..acdf9a7 100755
--- a/update.pl
+++ b/update.pl
@@ -47,18 +47,26 @@ push @log, "  changed: " . join(",",sort @changed) if @changed;
 
 print join '', map { "$_\n" } @log;
 
-if (@ARGV and @ARGV eq '-m') {
-    foreach my $file (qw(dist.ini lib/RDF/NS.pm lib/RDF/NS/Trine.pm)) {
-        print "$cur_version => $new_version in $file\n";
-        local ($^I, at ARGV)=('.bak',$file);
-        while(<>) {
-            s/$cur_version/$new_version/ig;
-            print;
-        }
+foreach my $file (qw(dist.ini lib/RDF/NS.pm lib/RDF/NS/Trine.pm README)) {
+    print "$cur_version => $new_version in $file\n";
+    local ($^I, at ARGV)=('.bak',$file);
+    while(<>) {
+        s/$cur_version/$new_version/ig;
+        print;
     }
-    # TODO: modify 'Changes'
-	# print join '' map { "$_\n" }, @log;
-    # $ git commit -m "update to $new_version"
-    # $ dzil release
 }
+do {
+    print "prepend modifications to Changes\n"; 
+    local ($^I, at ARGV)=('.bak','Changes');
+    my $line=0;
+    while (<>) {
+        if (!$line++) {
+            print join '', map { "$_\n" } @log;
+        }
+        print; 
+    } 
+}
+# $ git commit -m "update to $new_version"
+# $ git tag $new_version
+# $ dzil release
 

-- 
librdf-ns-perl Debian packaging



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