v_kyr Posted December 23, 2023 Share Posted December 23, 2023 Note: there are a bunch of calendar generation tools available, either on the net as online tools, or as specific apps, or as plugins for word processors and other common apps, or as common system CLI tools etc. All of these can be mostly used to generate all sort of calendars for a (re)usage in the Affinity Suite. - Thus I list here just a few of these calendar tools, so mostly some online and CLI tools, which don't need any account requirements, or to be extra bought. Online calendar tools ( should be usable without account requirements ) Advanced calendar creator (can generate various sorts of calendars) Basic calendar creator SVG Calendar Generator (by Mensch Mesch) Create a calendar for any year Calendar Generator Design a custom calendar Make Word calendar online (can generate various sorts of calendars) PDF Calendar Fantasy Calendar Generator Personal life calendar generator ...etc... OS CLI tools: cal (macOS) ncal (macOS) Gnu gcal (macOS + Win, very powerful) Gnu gcal manual ...etc... Python Scripting: calendar module calendar module tut workalendar module ...etc... (to be continued over time) 73pctGeek and StillSneezy 1 1 Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
v_kyr Posted December 23, 2023 Author Share Posted December 23, 2023 I give a quick little example (a mini primer) for a by the "Python calendar" module generated localized 2024 calendar: First you have to determine what locale languages are supported on your system (in my case macOS), to do so we can perform in a terminal (Terminal.app, iTerm2, etc.) a call of "locale -a" which will list as output a bunch of locales ... Quote > locale -a af_ZA af_ZA.ISO8859-1 af_ZA.ISO8859-15 af_ZA.UTF-8 am_ET am_ET.UTF-8 be_BY be_BY.CP1131 be_BY.CP1251 be_BY.ISO8859-5 be_BY.UTF-8 bg_BG bg_BG.CP1251 bg_BG.UTF-8 ca_ES ca_ES.ISO8859-1 ca_ES.ISO8859-15 ca_ES.UTF-8 cs_CZ cs_CZ.ISO8859-2 cs_CZ.UTF-8 da_DK da_DK.ISO8859-1 da_DK.ISO8859-15 da_DK.UTF-8 de_AT de_AT.ISO8859-1 de_AT.ISO8859-15 de_AT.UTF-8 de_CH de_CH.ISO8859-1 de_CH.ISO8859-15 de_CH.UTF-8 de_DE de_DE.ISO8859-1 de_DE.ISO8859-15 de_DE.UTF-8 el_GR el_GR.ISO8859-7 el_GR.UTF-8 en_AU en_AU.ISO8859-1 en_AU.ISO8859-15 en_AU.US-ASCII en_AU.UTF-8 en_CA en_CA.ISO8859-1 en_CA.ISO8859-15 en_CA.US-ASCII en_CA.UTF-8 en_GB en_GB.ISO8859-1 en_GB.ISO8859-15 en_GB.US-ASCII en_GB.UTF-8 ... ... ... next we simply reuse the choosen/wanted locale then in a little Python script, for generating a 2024 year overview calendar in DE starting always on mondays ... Quote import calendar ### use in terminal -> "locale -a" and use the wanted locale for output calsheet = calendar.LocaleTextCalendar(calendar.MONDAY, locale='de_DE.UTF-8') output = calsheet.formatyear(2024, 2, 1, 1, 3) print(output) ... and run that script ... > python3 pcal_2024_de.py 2024 Januar Februar März Mo Di Mi Do Fr Sa So Mo Di Mi Do Fr Sa So Mo Di Mi Do Fr Sa So 1 2 3 4 5 6 7 1 2 3 4 1 2 3 8 9 10 11 12 13 14 5 6 7 8 9 10 11 4 5 6 7 8 9 10 15 16 17 18 19 20 21 12 13 14 15 16 17 18 11 12 13 14 15 16 17 22 23 24 25 26 27 28 19 20 21 22 23 24 25 18 19 20 21 22 23 24 29 30 31 26 27 28 29 25 26 27 28 29 30 31 April Mai Juni Mo Di Mi Do Fr Sa So Mo Di Mi Do Fr Sa So Mo Di Mi Do Fr Sa So 1 2 3 4 5 6 7 1 2 3 4 5 1 2 8 9 10 11 12 13 14 6 7 8 9 10 11 12 3 4 5 6 7 8 9 15 16 17 18 19 20 21 13 14 15 16 17 18 19 10 11 12 13 14 15 16 22 23 24 25 26 27 28 20 21 22 23 24 25 26 17 18 19 20 21 22 23 29 30 27 28 29 30 31 24 25 26 27 28 29 30 Juli August September Mo Di Mi Do Fr Sa So Mo Di Mi Do Fr Sa So Mo Di Mi Do Fr Sa So 1 2 3 4 5 6 7 1 2 3 4 1 8 9 10 11 12 13 14 5 6 7 8 9 10 11 2 3 4 5 6 7 8 15 16 17 18 19 20 21 12 13 14 15 16 17 18 9 10 11 12 13 14 15 22 23 24 25 26 27 28 19 20 21 22 23 24 25 16 17 18 19 20 21 22 29 30 31 26 27 28 29 30 31 23 24 25 26 27 28 29 30 Oktober November Dezember Mo Di Mi Do Fr Sa So Mo Di Mi Do Fr Sa So Mo Di Mi Do Fr Sa So 1 2 3 4 5 6 1 2 3 1 7 8 9 10 11 12 13 4 5 6 7 8 9 10 2 3 4 5 6 7 8 14 15 16 17 18 19 20 11 12 13 14 15 16 17 9 10 11 12 13 14 15 21 22 23 24 25 26 27 18 19 20 21 22 23 24 16 17 18 19 20 21 22 28 29 30 31 25 26 27 28 29 30 23 24 25 26 27 28 29 30 31 pcal_2024_de.py If we let's say want to have instead months & days output in GR, we simply change the locale setting in above script to "el_GR.UTF-8" and let Python then generate the greek lang calendar for that locale ... 2024 Ιανουαρίου Φεβρουαρίου Μαρτίου Δε Τρ Τε Πε Πα Σα Κυ Δε Τρ Τε Πε Πα Σα Κυ Δε Τρ Τε Πε Πα Σα Κυ 1 2 3 4 5 6 7 1 2 3 4 1 2 3 8 9 10 11 12 13 14 5 6 7 8 9 10 11 4 5 6 7 8 9 10 15 16 17 18 19 20 21 12 13 14 15 16 17 18 11 12 13 14 15 16 17 22 23 24 25 26 27 28 19 20 21 22 23 24 25 18 19 20 21 22 23 24 29 30 31 26 27 28 29 25 26 27 28 29 30 31 Απριλίου Μαΐου Ιουνίου Δε Τρ Τε Πε Πα Σα Κυ Δε Τρ Τε Πε Πα Σα Κυ Δε Τρ Τε Πε Πα Σα Κυ 1 2 3 4 5 6 7 1 2 3 4 5 1 2 8 9 10 11 12 13 14 6 7 8 9 10 11 12 3 4 5 6 7 8 9 15 16 17 18 19 20 21 13 14 15 16 17 18 19 10 11 12 13 14 15 16 22 23 24 25 26 27 28 20 21 22 23 24 25 26 17 18 19 20 21 22 23 29 30 27 28 29 30 31 24 25 26 27 28 29 30 Ιουλίου Αυγούστου Σεπτεμβρίου Δε Τρ Τε Πε Πα Σα Κυ Δε Τρ Τε Πε Πα Σα Κυ Δε Τρ Τε Πε Πα Σα Κυ 1 2 3 4 5 6 7 1 2 3 4 1 8 9 10 11 12 13 14 5 6 7 8 9 10 11 2 3 4 5 6 7 8 15 16 17 18 19 20 21 12 13 14 15 16 17 18 9 10 11 12 13 14 15 22 23 24 25 26 27 28 19 20 21 22 23 24 25 16 17 18 19 20 21 22 29 30 31 26 27 28 29 30 31 23 24 25 26 27 28 29 30 Οκτωβρίου Νοεμβρίου Δεκεμβρίου Δε Τρ Τε Πε Πα Σα Κυ Δε Τρ Τε Πε Πα Σα Κυ Δε Τρ Τε Πε Πα Σα Κυ 1 2 3 4 5 6 1 2 3 1 7 8 9 10 11 12 13 4 5 6 7 8 9 10 2 3 4 5 6 7 8 14 15 16 17 18 19 20 11 12 13 14 15 16 17 9 10 11 12 13 14 15 21 22 23 24 25 26 27 18 19 20 21 22 23 24 16 17 18 19 20 21 22 28 29 30 31 25 26 27 28 29 30 23 24 25 26 27 28 29 30 31 pcal_2024_gr.py It's that easy. And of course we can also let the output to be generate into a file, or just pipe the output into a txt file instead, so we can easier copy/paste & reuse the generated output in the Affinity apps. Quote > python3 pcal_2024_de.py > somefile.txt When you copy/paste generated calendar texts over into Affinity, you best use some Monospace Font for the texts, so everything keeps to be aligned properly as was shown before in a terminal output. Top 10 Most Popular Monospaced Fonts Of course the Python calendar module offers much more functions for generating a bunch of other customized different type of year, month and day calendars etc. But that would be beyond this little intro primer about building a simple localized year calendar. Komatös and StillSneezy 2 Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.