Monthly Calendar script

Previous topic - Next topic

rafferty

Hello,

During the past weeks I reworked the CalendarWizard script for my own purposes and I want to share it. The resulting script generates a classic monthly calendar with many layout options. A manual which explains the menu items of the script is included in the zip download.

One of the options is to import a text file with the holidays for your country. You are free to post your local holidays files in this thread.


Please enjoy.

note: Unfortunately this script only works with Windows 10 and Scribus 1.5.5. I could not integrate the various codepages for the languages on an easy way in Linux. I am sorry for that.


[attachment deleted by admin]

rafferty

#1
Monthly Calendar options:

1) You can choose between many (European) languages (default is English). You may add, change or delete entries in the localization list in the script. Please respect the python syntax.

2) You can choose a font from the list of fonts available on your system (default is set to Lato Bold, which is provided with my version of Scribus). Please check if all special characters for your language are available in the chosen font!

3) Calendar year and week starting day are to be given. Saturdays and Sundays will be printed in grey.

4) Option to show week numbers with (or without) a week numbers heading in your local language. Week numbers will be printed in grey.

5) Option to import holidays from a 'holiday.txt' file for your country. Holidays will be printed in red.

6) Select one or more months or the whole year.

7) You have the possibility to determine where on the page the calender month will be drawn with the offsets from top and / or left margin. Option to draw an empty image frame within the top and / or left 'offset' area and to get an 'inner' margin between this frame and the calendar grid.

[attachment deleted by admin]

rafferty

Version 2 of the Monthly Calendar script.

Changes:
- now works also in Linux.
- added option to draw moon phase symbols.
- added option draw mini calendars for previous and next months in the calendar month heading.

[attachment deleted by admin]

RodneyLee


mnawij

Thank you, this will be useful!

mnawij

AarGeeBee

Great Job Rafferty. Very usefull.

Best Regards

rafferty

On rgb-labs.com (a website that promotes tutorials for Blender, Inkscape and Gimp) there was a series on introducing Scribus (in German).
Yesterday they wrote an article about the Monthly Calendar Script and how to use it (https://www.rgb-labs.com/scribus-017-raffertys-monthly-calendar-script/).
For their readers, I added the German official holidays file (DE_holidays.txt) in the download here.

Rafferty

[attachment deleted by admin]

AarGeeBee

Thank you for the kind enrichment. Great work.

RobertsDaughter

Thanks a lot for sharing. Will be very useful to me.

RobertsDaughter

I use a dark theme in Linux Mint. As you can see from my screenshots it's almost impossible to do the settings because dialogue font is light grey (?) on white. Is there a chance to change that to something more readable?

[attachment deleted by admin]

rafferty

to RobertsDaughter:

The problem of the colors has nothing to do with the script itself, but with the open file dialog of Python programming language.
You can try to change some colors (temporary) in the dark theme. I do not see another solution.

Best regards,
Rafferty

rafferty

New version 3 of the Monthly Calendar Script.

Now you can display small texts of holidays or special days (like birthdays) below the date figures. You can hide the 'holidays' layer if you do not want to show them. Possibility of changing fonts, etc. by editing the Styles of the different elements in the calendar afterwards. Export to PDF for printing.

Please note that the format of the 'holidays.txt'-file has changed completely! See the examples and read the pdf-file with instructions in the download for more info.

Happy holidays to all!
Rafferty

[attachment deleted by admin]

rafferty

Here an example of a modern calendar made with the Monthly Calendar Script.

Instructions:
1) Run the script (version 3) with the options as displayed in the menu.
2) Select the 'US_holidays.txt' and the 'moonphases.txt' files when asked.
3) Fill in the New document - dialog as displayed (it is half of a letter page).
4) Menu: Windows -> Layers: uncheck 'Make layer visible' and 'Print layer' for the layer 'Grid'.
5) Make layer 'Calendar' active and select the cells with the weekday names. Then apply menu Windows -> Properties and open the Colors tab. Set Fill mode to Green and Shade to 25%.
6) Menu: Edit -> Styles -> char_style_DayNames -> Edit. Then Properties -> Family -> Ink Free -> Done.
7) Change layer to Images. Select the empty image frame and get the image of your choice and arrange it with menu: Windows -> Properties -> Image.
8) Menu: File -> Export -> Save as pdf.

[attachment deleted by admin]

Pablo J

Hello and congratulation for the script,

I have a suggestion to improve the script. It would be great if all the configuration parameters (fonts, language, size fonts, background colors, ...) were saved in an external configuration file. In this way, if I want to repeat my 2019 calendar but for the year 2020 I just have to load my custom configuration file and only modify the year.

It's only a suggestion, anyway It's a great script. Congratulations.

rafferty

Version 4 of the Monthly Calendar Script.

Changes:
- Addition of custom colors and styles for texts, fills and lines for several parts of the calendar: simply edit the color or style for month name, day names, week numbers, holidays, etc. and it will be applied to all calendar months.
- Holidays.txt file changed in order to include automatic calculation of holidays for the nth workday of month for every year.
- Moonphases.txt updated to 2020-2025.
- Instructions file included with worked out example to demonstrate the use of custom colors and styles.

[attachment deleted by admin]