emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Egli <christian.egli@alumni.ethz.ch>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Make the number of printed weeks configureable
Date: Mon, 30 Aug 2010 16:58:34 +0200	[thread overview]
Message-ID: <87iq2s9mg5.fsf@saadawi.sbszh.ch> (raw)


This is useful for the hipster PDA where you might want to print more
weeks than just four.
---
 contrib/scripts/org2hpda |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/contrib/scripts/org2hpda b/contrib/scripts/org2hpda
index 1957aa9..6b308f3 100755
--- a/contrib/scripts/org2hpda
+++ b/contrib/scripts/org2hpda
@@ -44,6 +44,11 @@ EMACS = emacs -batch -l ~/.emacs
 LATEX = latex
 DIARY = $($(EMACS) -eval "diary-file")
 
+# Number of weeks to be printed. Should be a multiple of 4, because 4
+# of them are merged on one page. Can be set when invoking the script
+# as follows: make NUMBER_OF_WEEKS=8 -f org2hpda
+NUMBER_OF_WEEKS = 4 
+
 hipsterFiles =  weekCalendar.pdf yearCalendar.pdf monthCalendar3.pdf monthCalendar2.pdf monthCalendar1.pdf
 pocketModFiles =  weekCalendar.pdf yearCalendar-rotated.pdf \
 	monthCalendar3-rotated.pdf monthCalendar2-rotated.pdf monthCalendar1-rotated.pdf
@@ -73,7 +78,7 @@ all: pocketMod.pdf hipsterPDA.pdf
 	done
 
 weekCalendar.tex: $(DIARY)
-	$(EMACS) -eval "(progn (calendar) (cal-tex-cursor-week-iso 4) (with-current-buffer cal-tex-buffer (write-file \"$@\")))"
+	$(EMACS) -eval "(progn (calendar) (cal-tex-cursor-week-iso $(NUMBER_OF_WEEKS)) (with-current-buffer cal-tex-buffer (write-file \"$@\")))"
 
 monthCalendar1.tex: $(DIARY)
 	 $(EMACS) -eval "(progn (calendar) (cal-tex-cursor-month-landscape 1) (with-current-buffer cal-tex-buffer (write-file \"$@\")))"
-- 
1.7.0.4

             reply	other threads:[~2010-08-30 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 14:58 Christian Egli [this message]
2010-08-31  6:24 ` [Accepted] Make the number of printed weeks configureable Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iq2s9mg5.fsf@saadawi.sbszh.ch \
    --to=christian.egli@alumni.ethz.ch \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).