summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Kellner <ken@kenkellner.com>2018-01-26 15:37:15 (GMT)
committerKen Kellner <ken@kenkellner.com>2018-01-26 15:37:15 (GMT)
commit86e3b47b0e7dcac58fd006d7f27918461774d8dd (patch)
tree0ba841f9e2fde9440a6e059414f3b4d1e59a943a
parentebd6e63cf369d0b4c6b6d5d55bd4cbf39c0f6c0a (diff)
Finish updates
-rwxr-xr-xcollect-images.sh26
-rw-r--r--common.tex4
-rw-r--r--content.md2
-rw-r--r--data-sources.R6
-rwxr-xr-xgen_sources.sh88
-rw-r--r--image-sources.txt29
-rw-r--r--images.txt12
-rw-r--r--makefile3
8 files changed, 62 insertions, 108 deletions
diff --git a/collect-images.sh b/collect-images.sh
index 3ab66d3..8bc97ec 100755
--- a/collect-images.sh
+++ b/collect-images.sh
@@ -1,10 +1,28 @@
#!/bin/bash
-while read location path filename ;
+while read location path filename command ;
do
if [ "$location" == "remote" ]; then
- wget -nc $path -O $filename
+ wget -nc $path -O images/$filename
+ elif [ "$location" == "convert" ]; then
+ #needs librsvg2-bin for svg conversions
+ $command $HOME/$path images/$filename
else
- cp -n $HOME/$path ./$filename
+ cp -n $HOME/$path images/$filename
fi
-done < images.txt
+done < image-sources.txt
+
+#Manual image conversions
+if ! [ -f images/rubus.png ]; then
+ convert images/rubus.jpg images/rubus.png
+fi
+if ! [ -f images/scarlet_tanager.png ]; then
+ convert images/scarlet_tanager.jpg images/scarlet_tanager.png
+fi
+
+#needs gifsicle package
+if ! [ -d images/soel ]; then
+ echo "Building SOEL animation..."
+ mkdir images/soel
+ gifsicle --unoptimize $HOME/images/research/animation_contextualforest.gif | convert - images/soel/frame-%d.png
+fi
diff --git a/common.tex b/common.tex
index 19714c9..d9779bc 100644
--- a/common.tex
+++ b/common.tex
@@ -6,13 +6,13 @@
\usepackage{listings}
\usepackage{animate}
-\graphicspath{images/}
+\graphicspath{{images/}{figures/}}
\definecolor{firebrick}{HTML}{FF3030}
\definecolor{brickred}{HTML}{CB4154}
\usepackage[comma,sort]{natbib}
-\bibliographystyle{ecology}
+\bibliographystyle{style}
\renewcommand{\bibsection}{}
\lstset{
diff --git a/content.md b/content.md
index 34d9f1f..a45dcb5 100644
--- a/content.md
+++ b/content.md
@@ -379,4 +379,4 @@ Does this affect oak regeneration success?
\LARGE
-kkellner@purdue.edu
+kenneth.kellner@mail.wvu.edu
diff --git a/data-sources.R b/data-sources.R
new file mode 100644
index 0000000..a4216ed
--- /dev/null
+++ b/data-sources.R
@@ -0,0 +1,6 @@
+micromn <- read.csv('~/research/archive/hee_small_mammals/data/hee_microsite_means.csv',header=T)
+load('~/research/archive/hee_bird_abundance/hl_bird_abun.Rdata')
+birds <- read.csv('~/research/archive/hee_bird_abundance/data/hee_mistnets_2015.csv',header=T)
+veg <- read.csv('~/research/archive/hee_bird_abundance/data/hee_mistnet_veg.csv',header=T)
+load('~/research/archive/hee_acorn_dispersal/output_dispersal.Rdata')
+load('~/research/archive/soel/casestudy_predation.Rdata')
diff --git a/gen_sources.sh b/gen_sources.sh
deleted file mode 100755
index 7018d9d..0000000
--- a/gen_sources.sh
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/bash
-
-#Save bibliography location
-if ! [ -s bibsources.tex ]
-then
- echo "Specify path to bibtex file"
- read path
- echo "\\bibliography{$path}" > bibsources.tex
-fi
-
-#Make image directory if needed
-if ! [ -d images ]
-then
- mkdir images
-fi
-
-#Save image directory location if necessary (relative!)
-if ! [ -s imagesources.tex ]
-then
- echo "Specify path to source photos"
- read imgdir2
- echo "\\graphicspath{{$imgdir2/}{images/}}" > imagesources.tex
-fi
-
-#Save data source locations for R
-if ! [ -s datasources.R ]
-then
- echo "Specify path to mammal microsite data"
- read path
- echo "micromn <- read.csv(\"$path\",header=T)" > datasources.R
- echo "Specify path to bird abundance model"
- read path
- echo "load(\"$path\")" >> datasources.R
- echo "Specify path to SCTA abundance data"
- read path
- echo "birds <- read.csv(\"$path\",header=T)" >> datasources.R
- echo "Specify path to Rubus data"
- read path
- echo "veg <- read.csv(\"$path\",header=T)" >> datasources.R
- echo "Specify path to acorn dispersal model output"
- read path
- echo "load(\"$path\")" >> datasources.R
- echo "Specify path to SOEL predation output"
- read path
- echo "load(\"$path\")" >> datasources.R
-fi
-
-#List of images to include
-cd images
-wget https://upload.wikimedia.org/wikipedia/commons/9/9f/Controlled_burn_in_northern_Portugal.jpg -O fire.jpg
-wget https://upload.wikimedia.org/wikipedia/commons/5/54/Mniotilta_varia_3.jpg -O blackandwhite_warbler.jpg
-wget https://upload.wikimedia.org/wikipedia/commons/f/f3/Dendroica-cerulea-002.jpg -O cerulean_warbler.jpg
-wget https://upload.wikimedia.org/wikipedia/commons/b/bb/Timber_Harvest.jpg -O timber_harvest.jpg
-wget https://upload.wikimedia.org/wikipedia/commons/b/b5/Hooded_Warbler_%28Setophaga_citrina%29.jpg -O hooded_warbler.jpg
-wget https://upload.wikimedia.org/wikipedia/commons/7/71/Worm-eating_Warbler.jpg -O worm_eating_warbler.jpg
-wget https://upload.wikimedia.org/wikipedia/commons/2/22/Rubus_fructicosus_owoce_646.jpg -O rubus.jpg
-wget https://upload.wikimedia.org/wikipedia/commons/e/e6/Tamias_striatus_juilllet_2011-CN.jpg -O each.jpg
-wget https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Deer_Mouse_%28Peromyscus_maniculatus%29_%289310532204%29.jpg/1024px-Deer_Mouse_%28Peromyscus_maniculatus%29_%289310532204%29.jpg -O wfmo.jpg
-wget https://upload.wikimedia.org/wikipedia/commons/thumb/0/07/Grey_squirrel_%28Sciurus_carolinensis%29_02.jpg/1280px-Grey_squirrel_%28Sciurus_carolinensis%29_02.jpg -O grsq.jpg
-wget https://upload.wikimedia.org/wikipedia/commons/f/f7/Tamia_striatus_eating.jpg -O each_dispersal.jpg
-
-convert rubus.jpg rubus.png
-rm rubus.jpg
-wget https://upload.wikimedia.org/wikipedia/commons/1/1b/Scarlet_Tanager_-_Texas-_USA_H8O9998_%2822882467759%29.jpg -O scarlet_tanager.jpg
-convert scarlet_tanager.jpg scarlet_tanager.png
-rm scarlet_tanager.jpg
-
-cd ..
-
-#Hardcoded bc windows...
-convert $imgdir2/hee_shelterwood_spring2011.png -crop 25%x100%+0+0 images/shelterwood.png
-convert $imgdir2/hee_clearcut_spring2009.png -crop 25%x100%+1000+0 images/clearcut.png
-convert $imgdir2/hee_singletree_spring2011.jpg -crop 25%x100%+1000+0 images/singletree.png
-convert $imgdir2/hee_patch_spring2011.jpg -crop 25%x100%+0+0 images/patch.png
-convert $imgdir2/hee_clearcut_spring2011.png -crop 70%x100%+500+0 images/clearcut_long.png
-convert -density 200 -background transparent $imgdir2/dispersal_methods.svg images/dispersal_methods.png
-convert -density 200 -background transparent $imgdir2/clearcut_diagram.svg images/clearcut_diagram.png
-convert -density 200 -background transparent $imgdir2/patchcut_diagram.svg images/patchcut_diagram.png
-convert -density 200 -background transparent $imgdir2/shelterwood_diagram.svg images/shelterwood_diagram.png
-convert -density 200 -background transparent $imgdir2/singletree_diagram.svg images/singletree_diagram.png
-convert -density 200 -background transparent $imgdir2/soel_diagram.svg images/soel_diagram.png
-
-if ! [ -d images/soel]
-then
- mkdir images/soel
-fi
-
-gifsicle --unoptimize $imgdir2/animation_contextualforest.gif | convert - images/soel/frame-%d.png
diff --git a/image-sources.txt b/image-sources.txt
new file mode 100644
index 0000000..cc95ca7
--- /dev/null
+++ b/image-sources.txt
@@ -0,0 +1,29 @@
+remote https://upload.wikimedia.org/wikipedia/commons/9/9f/Controlled_burn_in_northern_Portugal.jpg fire.jpg
+remote https://upload.wikimedia.org/wikipedia/commons/5/54/Mniotilta_varia_3.jpg blackandwhite_warbler.jpg
+remote https://upload.wikimedia.org/wikipedia/commons/f/f3/Dendroica-cerulea-002.jpg cerulean_warbler.jpg
+remote https://upload.wikimedia.org/wikipedia/commons/b/bb/Timber_Harvest.jpg timber_harvest.jpg
+remote https://upload.wikimedia.org/wikipedia/commons/b/b5/Hooded_Warbler_%28Setophaga_citrina%29.jpg hooded_warbler.jpg
+remote https://upload.wikimedia.org/wikipedia/commons/7/71/Worm-eating_Warbler.jpg worm_eating_warbler.jpg
+remote https://upload.wikimedia.org/wikipedia/commons/2/22/Rubus_fructicosus_owoce_646.jpg rubus.jpg
+remote https://upload.wikimedia.org/wikipedia/commons/e/e6/Tamias_striatus_juilllet_2011-CN.jpg each.jpg
+remote https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Deer_Mouse_%28Peromyscus_maniculatus%29_%289310532204%29.jpg/1024px-Deer_Mouse_%28Peromyscus_maniculatus%29_%289310532204%29.jpg wfmo.jpg
+remote https://upload.wikimedia.org/wikipedia/commons/thumb/0/07/Grey_squirrel_%28Sciurus_carolinensis%29_02.jpg/1280px-Grey_squirrel_%28Sciurus_carolinensis%29_02.jpg grsq.jpg
+remote https://upload.wikimedia.org/wikipedia/commons/f/f7/Tamia_striatus_eating.jpg each_dispersal.jpg
+remote https://upload.wikimedia.org/wikipedia/commons/1/1b/Scarlet_Tanager_-_Texas-_USA_H8O9998_%2822882467759%29.jpg scarlet_tanager.jpg
+local images/research/hee_logo.png hee_logo.png
+local images/research/hee_patch_spring2011.jpg hee_patch_spring2011.jpg
+local images/research/rightarrow.png rightarrow.png
+local images/research/hee_area_transparent.pdf hee_area_transparent.pdf
+local images/research/hee_cores_transparent.pdf hee_cores_transparent.pdf
+local images/research/oak_seedling.png oak_seedling.png
+convert images/research/hee_shelterwood_spring2011.png shelterwood.png convert -crop 25%x100%+0+0
+convert images/research/hee_clearcut_spring2009.png clearcut.png convert -crop 25%x100%+1000+0
+convert images/research/hee_singletree_spring2011.jpg singletree.png convert -crop 25%x100%+1000+0
+convert images/research/hee_patch_spring2011.jpg patch.png convert -crop 25%x100%+0+0
+convert images/research/hee_clearcut_spring2011.png clearcut_long.png convert -crop 70%x100%+500+0
+convert images/research/dispersal_methods.svg dispersal_methods.png convert -density 300 -background transparent
+convert images/research/clearcut_diagram.svg clearcut_diagram.png convert -density 300 -background transparent
+convert images/research/patchcut_diagram.svg patchcut_diagram.png convert -density 300 -background transparent
+convert images/research/shelterwood_diagram.svg shelterwood_diagram.png convert -density 300 -background transparent
+convert images/research/singletree_diagram.svg singletree_diagram.png convert -density 300 -background transparent
+convert images/research/soel_diagram.svg soel_diagram.png convert -density 300 -background transparent
diff --git a/images.txt b/images.txt
deleted file mode 100644
index 94cfddf..0000000
--- a/images.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-remote https://upload.wikimedia.org/wikipedia/commons/9/9f/Controlled_burn_in_northern_Portugal.jpg fire.jpg
-remote https://upload.wikimedia.org/wikipedia/commons/5/54/Mniotilta_varia_3.jpg blackandwhite_warbler.jpg
-remote https://upload.wikimedia.org/wikipedia/commons/f/f3/Dendroica-cerulea-002.jpg cerulean_warbler.jpg
-remote https://upload.wikimedia.org/wikipedia/commons/b/bb/Timber_Harvest.jpg timber_harvest.jpg
-remote https://upload.wikimedia.org/wikipedia/commons/b/b5/Hooded_Warbler_%28Setophaga_citrina%29.jpg hooded_warbler.jpg
-remote https://upload.wikimedia.org/wikipedia/commons/7/71/Worm-eating_Warbler.jpg worm_eating_warbler.jpg
-remote https://upload.wikimedia.org/wikipedia/commons/2/22/Rubus_fructicosus_owoce_646.jpg rubus.jpg
-remote https://upload.wikimedia.org/wikipedia/commons/e/e6/Tamias_striatus_juilllet_2011-CN.jpg each.jpg
-remote https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Deer_Mouse_%28Peromyscus_maniculatus%29_%289310532204%29.jpg/1024px-Deer_Mouse_%28Peromyscus_maniculatus%29_%289310532204%29.jpg wfmo.jpg
-remote https://upload.wikimedia.org/wikipedia/commons/thumb/0/07/Grey_squirrel_%28Sciurus_carolinensis%29_02.jpg/1280px-Grey_squirrel_%28Sciurus_carolinensis%29_02.jpg grsq.jpg
-remote https://upload.wikimedia.org/wikipedia/commons/f/f7/Tamia_striatus_eating.jpg each_dispersal.jpg
-local images/research/hee_logo.png hee_logo.png
diff --git a/makefile b/makefile
index 05ac0fd..bda67cd 100644
--- a/makefile
+++ b/makefile
@@ -5,6 +5,7 @@ talk-fnr-2018.pdf: content.md talk.tex common.tex references.bib style.bst image
xelatex talk.tex
bibtex talk
xelatex talk.tex
+ xelatex talk.tex
pdftk talk.pdf cat 1-36 output talk1.pdf
pdftk talk.pdf cat 37-end output talk2.pdf
gs -sDEVICE=pdfwrite -dMaxSubsetPct=100 -dPDFSETTINGS=/prepress -dEmbedAllFonts=true -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile="talk1_small.pdf" -dNOPAUSE -dBATCH "talk1.pdf"
@@ -22,7 +23,7 @@ images: collect-images.sh image-sources.txt
@mkdir -p images
bash collect-images.sh
-figures: figures.R
+figures: figures.R data-sources.R
@mkdir -p figures
Rscript figures.R