Ann: weekly Calendar with prawn

60 views
Skip to first unread message

Bernhard Weichel

unread,
May 25, 2013, 9:48:19 AM5/25/13
to prawn...@googlegroups.com
Hi, 

I have created  a weekly calendar overview using prawn. It was created in a project where I had to read the (exchange maintained) calendars of a convention center and display an overview of the room occupation.

It might be of interest for some of you. See https://github.com/bwl21/prawn_calendar




you can install it with 

    gem install prawn_calendar

    pdf = Prawn::Document.new

    calendar = PrawnCalendar::WeeklyCalendar.new(@pdf) do |c|
      c.c_date_start="2013-04-30"
    end

    calendar.mk_calendar([20,700], width:500, height:250) do
      cal_entry("2013-04-30T06:30:00", "2013-04-30T07:30:00", "oben")
      cal_entry("2013-04-30T15:30:00", "2013-04-30T18:30:00", "normal", recurring: true)
      cal_entry("2013-05-01T06:30:00", "2013-05-01T18:30:00", "oben ")
      cal_entry("2013-05-02T06:30:00", "2013-05-02T23:30:00", "oben und unten")
      cal_entry("2013-05-03T15:30:00", "2013-05-03T23:30:00", "unten")
      cal_entry("2013-05-04T23:30:00", "2013-05-04T23:59:00", "ganz unten")
      cal_entry("2013-05-05T15:30:00", "2013-05-07T22:30:00", "c2 5.5 7as ist ein test, der laufen mussss öalskd jfölaksdj fssss")
      cal_entry("2013-05-06T08:00:00", "2013-05-04T19:00:00", "c3 6.5 7as ist ein test, der laufen musdddddds")
    end


Thanks for Prawn which made this possible. Any feedback is appreciated.

-b

Rodrigo Virgilio

unread,
May 28, 2013, 2:07:02 PM5/28/13
to prawn-ruby
Very good Bernhard Weichel it can be useful to others, thank you.


2013/5/25 Bernhard Weichel <bernhard...@googlemail.com>

-b

--
You received this message because you are subscribed to the Google Groups "Prawn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prawn-ruby+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages