[r-cran-recipes] 03/03: Add README.source to document binary data

Andreas Tille tille at debian.org
Mon Dec 4 20:29:56 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-recipes.

commit 5e12160754d5c283dc13156b3d2f4363e372ad80
Author: Andreas Tille <tille at debian.org>
Date:   Mon Dec 4 21:27:38 2017 +0100

    Add README.source to document binary data
---
 debian/README.source        | 20 ++++++++++++++++++++
 debian/create_README.source | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..f24bff4
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,20 @@
+Explanation for binary files inside source package according to
+  http://lists.debian.org/debian-devel/2013/09/msg00332.html
+
+Files: data/biomass.RData
+Documented: ../man/biomass.Rd
+  Biomass Data
+
+Files: data/covers.RData
+Documented: ../man/covers.Rd
+  Raw Cover Type Data
+
+Files: data/credit_data.RData
+Documented: ../man/credit_data.Rd
+  Credit Data
+
+Files: data/okc.RData
+Documented: ../man/okc.Rd
+  OkCupid Data
+
+ -- Andreas Tille <tille at debian.org>  Mon, 04 Dec 2017 21:25:48 +0100
diff --git a/debian/create_README.source b/debian/create_README.source
new file mode 100755
index 0000000..bfcd8b4
--- /dev/null
+++ b/debian/create_README.source
@@ -0,0 +1,33 @@
+#!/bin/sh
+cat <<EOT
+Explanation for binary files inside source package according to
+  http://lists.debian.org/debian-devel/2013/09/msg00332.html
+
+EOT
+
+for rda in `ls ../data/*.rda ../data/*.RData 2>/dev/null` ; do
+  rdoc="../man/$(basename $rda .rda)"
+  if [ ! -e ${rdoc}.Rd ] ; then
+    rdoc="../man/$(basename $rda .RData).Rd"
+  else
+    rdoc=${rdoc}.Rd
+  fi
+  if [ ! -e "$rdoc"  ] ; then
+    >&2 echo "Verify documentation for $rda manually"
+  else
+        echo "Files: data/$(basename $rda)"
+        echo "Documented: $rdoc"
+        grep '\\title' $rdoc | sed -e 's/^\\title{/  /' -e 's/ *} *$//'
+        echo ""
+  fi
+done
+
+cat <<EOT
+ -- Andreas Tille <tille at debian.org>  `date -R`
+EOT
+
+
+#        sed -e '0,/^\\title{/d' -e '/^}/,$d' -e 's/^\\description{//' -e 's/^\([^ ]\)/  \1/' $rdoc | \
+#           sed -e 's/\\code{\([^}]\+\)}/\1/g' | \
+#           perl -p -e 's/\cM//g' | grep -v '^ *$' | sed -e '/^ \+\\/d' -e 's/} *$/\n#####/' | \
+#           sed -e '/^#####/ { N; N; N; N; d; }' | sed -e '/^#####/ { N; N; N; d; }' | sed -e '/^#####/ { N; N; d; }'  | sed -e '/^#####/ { N; d; }'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-recipes.git



More information about the debian-science-commits mailing list