From 346e70596c8e44d9bba40ec756280d54ba4640fb Mon Sep 17 00:00:00 2001 From: Christian Egli Date: Wed, 18 Jun 2008 00:22:33 +0200 Subject: [PATCH 1/2] Make the location of the diary file configurable. --- contrib/ChangeLog | 5 +++++ contrib/scripts/org2hpda | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 880948abc..b19c7329d 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,8 @@ +2008-06-18 Christian Egli + + * scripts/org2hpda (DIARY): Make the location of the diary file + configurable. + 2008-05-28 Carsten Dominik * lisp/org-mtags.el (org-mtags-replace) diff --git a/contrib/scripts/org2hpda b/contrib/scripts/org2hpda index 6eb9fb905..bfe39408f 100755 --- a/contrib/scripts/org2hpda +++ b/contrib/scripts/org2hpda @@ -25,6 +25,7 @@ EMACS = emacs -batch -l ~/.emacs LATEX = latex +DIARY = ~/TODO/diary hipsterFiles = weekCalendar.pdf yearCalendar.pdf monthCalendar3.pdf monthCalendar2.pdf monthCalendar1.pdf pocketModFiles = weekCalendar.pdf yearCalendar-rotated.pdf \ @@ -51,19 +52,19 @@ all: pocketMod.pdf hipsterPDA.pdf pdf90 --outfile tmp.pdf $@; mv tmp.pdf $@; \ done -weekCalendar.tex: ~/diary +weekCalendar.tex: $(DIARY) $(EMACS) -eval "(progn (calendar) (cal-tex-cursor-week-iso 4) (with-current-buffer cal-tex-buffer (write-file \"$@\")))" -monthCalendar1.tex: ~/diary +monthCalendar1.tex: $(DIARY) $(EMACS) -eval "(progn (calendar) (cal-tex-cursor-month-landscape 1) (with-current-buffer cal-tex-buffer (write-file \"$@\")))" -monthCalendar2.tex: ~/diary +monthCalendar2.tex: $(DIARY) $(EMACS) -eval "(progn (calendar) (calendar-forward-month 1) (cal-tex-cursor-month-landscape 1) (with-current-buffer cal-tex-buffer (write-file \"$@\")))" -monthCalendar3.tex: ~/diary +monthCalendar3.tex: $(DIARY) $(EMACS) -eval "(progn (calendar) (calendar-forward-month 2) (cal-tex-cursor-month-landscape 1) (with-current-buffer cal-tex-buffer (write-file \"$@\")))" -yearCalendar.tex: ~/diary +yearCalendar.tex: $(DIARY) $(EMACS) -eval "(progn (calendar) (calendar-forward-month 2) (cal-tex-cursor-year-landscape 1) (with-current-buffer cal-tex-buffer (write-file \"$@\")))" pocketMod.pdf: $(pocketModFiles) From 9c692c42f17c0f05335655c1910ce1670c5371a5 Mon Sep 17 00:00:00 2001 From: Christian Egli Date: Wed, 18 Jun 2008 00:26:29 +0200 Subject: [PATCH 2/2] reduce links to their destination i.e. change '[[http://foo][bar]]' to 'bar' --- contrib/ChangeLog | 2 ++ contrib/scripts/org2hpda | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/ChangeLog b/contrib/ChangeLog index b19c7329d..061a31934 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -2,6 +2,8 @@ * scripts/org2hpda (DIARY): Make the location of the diary file configurable. + (all): reduce links to their destination, i.e. change + '[[http://foo][bar]]' to 'bar' 2008-05-28 Carsten Dominik diff --git a/contrib/scripts/org2hpda b/contrib/scripts/org2hpda index bfe39408f..ff296ffdf 100755 --- a/contrib/scripts/org2hpda +++ b/contrib/scripts/org2hpda @@ -35,11 +35,14 @@ all: pocketMod.pdf hipsterPDA.pdf %.dvi: %.tex # Quick hack to massage the LaTeX produced by cal-tex - # quote '@', then increase font size of week calendars and - # finaly increase font of diary entries in moth calendar + # quote '@', then increase font size of week calendars, + # increase font of diary entries in moth calendar and + # finally reduce links to their destination, i.e. + # change '[[http://foo][bar]]' to 'bar' sed -e 's/\\verb|@|/\@/g' \ -e 's/documentclass\[11pt\]/documentclass[12pt]/g' \ -e 's/{\\tiny \\raggedright #3}/{\\small \\raggedright #3}/g' \ + -e 's/\[\[[^]]\+\]\[\([^]]\+\)\]\]/\1/g' \ < $< > /tmp/temp-org-file.$$$$; mv /tmp/temp-org-file.$$$$ $< $(LATEX) $^