[Returnanalytics-commits] r3200 - pkg/PortfolioAnalytics/sandbox/symposium2013/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Oct 3 16:19:32 CEST 2013


Author: peter_carl
Date: 2013-10-03 16:19:32 +0200 (Thu, 03 Oct 2013)
New Revision: 3200

Added:
   pkg/PortfolioAnalytics/sandbox/symposium2013/src/pdf2png.sh
Log:
- automates file conversion from pdf to png using Imagemagick's convert


Added: pkg/PortfolioAnalytics/sandbox/symposium2013/src/pdf2png.sh
===================================================================
--- pkg/PortfolioAnalytics/sandbox/symposium2013/src/pdf2png.sh	                        (rev 0)
+++ pkg/PortfolioAnalytics/sandbox/symposium2013/src/pdf2png.sh	2013-10-03 14:19:32 UTC (rev 3200)
@@ -0,0 +1,21 @@
+# #! /bin/bash
+# Automate file conversion in bash
+if [ "$1" == "" ]; then
+  inputdir="../results"
+  destdir="../docs/symposium-slides-2013-figure"
+else
+  inputdir=$1
+  destdir=$2
+fi
+n=0;
+echo " ";
+echo "Converting:"
+echo " ";
+for file in $inputdir/*.pdf
+  do 
+    pngfile=${file%%.pdf}.png
+    echo "$((++n)): $file to $destdir/$pngfile."
+    convert -density 300 $file -quality 100 -sharpen 0x1.0 $destdir/$pngfile 
+    echo " ";
+    echo "$((n)) files were converted from PDF to PNG format."
+done 
\ No newline at end of file


Property changes on: pkg/PortfolioAnalytics/sandbox/symposium2013/src/pdf2png.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the Returnanalytics-commits mailing list