Skip to content

Commit

Permalink
still use r-forge to host images, because Dropbox does not work well …
Browse files Browse the repository at this point in the history
…with animations
  • Loading branch information
yihui committed Feb 17, 2013
1 parent 151a3de commit 5535d56
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions _bin/knit
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,16 @@ invisible(local({
# generate figures to the ./figure/ directory
if (!file.exists('figure/')) dir.create('figure')
opts_knit$set(base.dir = normalizePath('figure', mustWork = TRUE))
# I save figures to my Dropbox folder
opts_knit$set(base.url = if (Sys.getenv('USER') != 'yihui') '/figure/' else
'http://dl.dropbox.com/u/15335397/vistat/')
# save images to R-Forge; I can simply save them to my Dropbox folder, e.g.
# http://dl.dropbox.com/u/15335397/vistat/ but the problem is that animations
# do not work well under Google Chrome for some reason (SciAnimator keeps on
# fetching images from Dropbox)
opts_knit$set(base.url = if (Sys.getenv('USER') != 'yihui') '/figure/' else {
# mount my R-Forge dir to the local figure dir
if (as.character(file.info('figure/')[, 'mode']) != '2755') {
stopifnot(system('sshfs [email protected]:/srv/gforge/chroot/home/groups/isu/htdocs/vistat figure') == 0L)
}
'http://isu.r-forge.r-project.org/vistat/'
})
knit(f, paste('_posts/', base, '.md', sep = ''), envir = globalenv())
}))

0 comments on commit 5535d56

Please sign in to comment.