diff options
author | Carlos Goce <carlosgoce@gmail.com> | 2015-01-24 19:47:48 +0100 |
---|---|---|
committer | Carlos Goce <carlosgoce@gmail.com> | 2015-01-24 19:47:48 +0100 |
commit | a55ff6eba7dad35f869fa9c52ab4ca9c00f6328b (patch) | |
tree | 5c283c61d52fc2747f9d33f00d0d222a7308569e /calendar.rb | |
parent | 9907cf572bb79e0c2a02c979ca3dc2aaeeb9b241 (diff) | |
download | pdf-calendars-a55ff6eba7dad35f869fa9c52ab4ca9c00f6328b.tar.gz pdf-calendars-a55ff6eba7dad35f869fa9c52ab4ca9c00f6328b.tar.bz2 pdf-calendars-a55ff6eba7dad35f869fa9c52ab4ca9c00f6328b.zip |
Remove old script
Diffstat (limited to 'calendar.rb')
-rw-r--r-- | calendar.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/calendar.rb b/calendar.rb deleted file mode 100644 index efb315c..0000000 --- a/calendar.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'rubygems' -require 'bundler/setup' -require 'prawn' -require 'prawn/table' -require 'active_support/core_ext/time' -require 'active_support/core_ext/date' - -locales_folder = 'config/locales' -output_folder = 'output' - -# Para obtener el primer día de la semana -d = Date.today -puts d.beginning_of_week - -I18n.load_path = Dir["#{locales_folder}/*.yml"] -I18n.backend.load_translations -I18n.locale = 'es' || I18n.default_locale - -Prawn::Document.generate("#{output_folder}/calendar.pdf") do - (1..12).each do |month| - text I18n.t('date.month_names')[month] - data = (1..Time.days_in_month(month)).to_a.each_slice(7).to_a - table data, :cell_style => {:align => :center} - end -end - -# `open #{output_folder}/calendar.pdf`
\ No newline at end of file |