X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tags%2Fgsoc_final%2Fexec%2Fcran_pkgs;fp=tags%2Fgsoc_final%2Fexec%2Fcran_pkgs;h=b8a2dcb4dd94b042bad60fca23839d9fd12afe2d;hb=5101cce1568b46d042316f32c8216e956f76ff65;hp=0000000000000000000000000000000000000000;hpb=1d3c6e2092b87a8e640704ce3ceec4e8ece3859e;p=cran2deb.git diff --git a/tags/gsoc_final/exec/cran_pkgs b/tags/gsoc_final/exec/cran_pkgs new file mode 100755 index 0000000..b8a2dcb --- /dev/null +++ b/tags/gsoc_final/exec/cran_pkgs @@ -0,0 +1,28 @@ +#!/usr/bin/env r +## DOC: cran2deb cran_pkgs +## DOC: print a list of 800 packages picked at random +## DOC: cran2deb cran_pkgs query +## DOC: print the names of all CRAN TaskViews +## DOC: cran2deb cran_pkgs taskview1 taskview2 ... +## DOC: print the names of all packages in a particular CRAN TaskView +## DOC: + +library(cran2deb) + +if (length(argv) == 1) { + writeLines(sample(dimnames(available)[[1]],800)) +} else { + argv = argv[2:length(argv)] + if (argv[1] == 'query') { + for (ctv in ctv.available) { + writeLines(ctv$name) + } + q(save='no') + } + # list of task lists + for (ctv in ctv.available) { + if (ctv$name %in% argv) { + writeLines(ctv$packagelist$name) + } + } +}