Mercurial > org-tools
changeset 8:73beed20f7de
going to move refreshing the page to auto-weave
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 25 Oct 2011 01:08:31 -0700 |
parents | ce96610fe058 |
children | d09937a6cb4b |
files | auto-weave.pl tangle.sh weave.sh |
diffstat | 3 files changed, 20 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/auto-weave.pl Mon Oct 24 09:41:38 2011 -0700 1.2 +++ b/auto-weave.pl Tue Oct 25 01:08:31 2011 -0700 1.3 @@ -11,7 +11,7 @@ 1.4 @org_files = glob("./org/*.org"); 1.5 1.6 $" = "\n"; 1.7 -print "@org_files"; 1.8 +print "@org_files\n"; 1.9 1.10 1.11 foreach(@org_files){ 1.12 @@ -21,22 +21,26 @@ 1.13 my $e = shift; 1.14 my $name = $e->fullname; 1.15 print "$name was modified\n" if $e->IN_MODIFY; 1.16 - `weave $name`; 1.17 + system ("weave $name"); 1.18 + print ("$name\n"); 1.19 + $path = `readlink -f $name`; 1.20 + $path =~ s|/home/r/proj|http://aurellem.localhost|; 1.21 + print ("$path\n"); 1.22 + $path =~ s|org|html|g; 1.23 + print ("$path\n"); 1.24 + system ("firefox $path"); 1.25 + 1.26 }); 1.27 - 1.28 - 1.29 - 1.30 - 1.31 } 1.32 1.33 1.34 1.35 1.36 # integration into AnyEvent (works with EV, Glib, Tk, POE...) 1.37 -my $inotify_w = AnyEvent->io 1.38 - ( 1.39 - fh => $inotify->fileno, poll => 'r', cb => sub { $inotify->poll } 1.40 - ); 1.41 +#my $inotify_w = AnyEvent->io 1.42 +# ( 1.43 +# fh => $inotify->fileno, poll => 'r', cb => sub { $inotify->poll } 1.44 +# ); 1.45 1.46 # manual event loop 1.47 1 while $inotify->poll;
2.1 --- a/tangle.sh Mon Oct 24 09:41:38 2011 -0700 2.2 +++ b/tangle.sh Tue Oct 25 01:08:31 2011 -0700 2.3 @@ -17,4 +17,4 @@ 2.4 (mapc (lambda (file) 2.5 (find-file (expand-file-name file \"$DIR\")) 2.6 (org-babel-tangle) 2.7 - (kill-buffer)) '($FILES)))" 2>&1 | pcregrep '(Wrote)|(tangled)' 2.8 + (kill-buffer)) '($FILES)))"
3.1 --- a/weave.sh Mon Oct 24 09:41:38 2011 -0700 3.2 +++ b/weave.sh Tue Oct 25 01:08:31 2011 -0700 3.3 @@ -9,7 +9,11 @@ 3.4 3.5 dir=`dirname $org` 3.6 3.7 -emacsclient \ 3.8 +emacs \ 3.9 +-l /home/r/config/emacs/clojure-init.el \ 3.10 +-l /home/r/config/emacs/org-init.el \ 3.11 +-l /home/r/config/emacs/web-color.el \ 3.12 +--batch \ 3.13 --eval " 3.14 (progn 3.15 (setq org-publish-project-alist