[med-svn] [Git][med-team/community/helper-scripts][master] Add script to create README.source for R packages automatically
Andreas Tille
gitlab at salsa.debian.org
Wed Feb 21 15:25:32 UTC 2018
Andreas Tille pushed to branch master at Debian Med / community / helper-scripts
Commits:
d4aff718 by Andreas Tille at 2018-02-21T16:25:04+01:00
Add script to create README.source for R packages automatically
- - - - -
1 changed file:
- + create_README.source
Changes:
=====================================
create_README.source
=====================================
--- /dev/null
+++ b/create_README.source
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# you can use/adapt this script to create README.source for R packages
+# featuring large amounts of binary data files
+
+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; }'
View it on GitLab: https://salsa.debian.org/med-team/community/helper-scripts/commit/d4aff718fed63de9dcc2ab5625c3153ef99fa38a
---
View it on GitLab: https://salsa.debian.org/med-team/community/helper-scripts/commit/d4aff718fed63de9dcc2ab5625c3153ef99fa38a
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debian-med-commit/attachments/20180221/88dd71f4/attachment-0001.html>
More information about the debian-med-commit
mailing list