It is currently Thu Jun 20, 2024 7:13 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Sat Oct 07, 2023 1:54 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 785
Location: SEA - South East Asia
Origin:
The original script is from https://www.gimphelp.org/other_calendar_month.html (I have it from ages)
Then recently I discovered the same but with the possibility for the year to chose from month to month https://www.gimpscripts.net/2020/12/sg-calendar.html this later script has no Ctrl+Z capabilities (I did try to fix it, but nope I got more errors) and can be buggy as well as you do need to go to Select > None after that script did run)

Why:
It all started when I tried the script from gimpscripts, I saw there was a Russian version in this script, I told myself, "it misses the Ukrainian language!".
Then I just wanted to add a slider or two and change some default values and extend the max year on the one I did have from gimphelp, then testing it many times, I did many things to suit my needs like changing some others default values, then finally add the Ukrainian language, fixing a bug in the "Date position" as it was a mess in the drop-down list about the order, changing labels to be more specific as my test gave me a better understanding how it works, etc... (once I was in, I couldn't stop :hehe )

So two scripts -> which one:
I did work and tested thoroughly on the one from gimphelp sg-calendar-from-gh-210.scm, and just reported few changes on the other one sg-calendar-from-gs.scm, I did took some translations from the later that sg-calendar-from-gh-210.scm did not have, add also Ukrainian to the one from gimpscripts...
But overall this one -> sg-calendar-from-gh-210.scm is the one I use, is less buggy (maybe a point of view?), has the Ctrl+Z option working, and left the canvas without an active selection thus I like it better -> for sure it's just because I did all with it that I like it better :hehe , I'm not fair at this point.
On the other hand -> sg-calendar-from-gs.scm can make a year calendar from a month and ends to another month that you chose, where the other one gives you a full year. And let's face it, I just reported few things on it, not really doing things, and just tried it not fully testing it! Thus I don't really know this one.

I'm not a programmer:
I did not touch the core code, nor algorithms, etc... I did made a lot of changes from line 1 to 176 and from 761 to 812 in sg-calendar-from-gh-210.scm.
THUS, the usual warning -> if you download those scripts, you should know that they WILL BURN your computer, maybe your house with it...
So if you want to keep your car, park it outside of your garage, two or three blocks away from your house.

Both scripts are inside, you should not put them together, but I did some slight changes and they can be installed together in the script directory/folder.
On the menu Filters > Render > Calendar > (the entries starting with "Gs" is the script from gimpscript)
Attachment:
calendars.7z [11.91 KiB]
Downloaded 54 times


Example Year 2077
Image

Example January 2099
Image

Few things to know that can help:
There is an option called "Right Justify:...", this option affect only the numbers composed with one digit only -> if UNchecked, numbers 1 to 9 will be aligned vertically on the first digit of the numbers with 2 digits.
See?
Attachment:
screenshot_20231007-103134.jpg
screenshot_20231007-103134.jpg [ 140.81 KiB | Viewed 1084 times ]


When checked this option will align vertically the numbers composed with 1 digit, in the middle of the numbers composed with 2 digits
See?
Attachment:
screenshot_20231007-103354.jpg
screenshot_20231007-103354.jpg [ 155.84 KiB | Viewed 1084 times ]


Also the "Padding" in the year calendar (only in the year), will increase the space of the banner for the month's name, as well as the space BETWEEN rows, but it has a counter effect, it will decrease the size of the month's grids.
Roughly a month's name cannot be larger than the month's grid (see November/December, the biggest names), thus when a big name reach the wideness of its grid, if you continue to increase the Padding, this will start to add more space between rows -> thus decreasing the size of the months grid even faster -> as a name cannot be bigger that its grid -> now also decrease the month's name and increase even more the space between rows.
I don't know if you understand my explanations... but I discovered this during my tests. I found it quite genius once I understood, tough, but you should understand how it works, it's quite simple :mrgreen:

Padding at 10 100% view
Image

Padding at 30 100% view (see the month's grid already decrease while the month's names did increase
Image

You will find bugs, ants, and maybe some fishes!
Please I can only help (a very little) with sg-calendar-from-gh-210.scm, that's the only one I truly tested up to the other side of our galaxy.

_________________
Patrice


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Sat Oct 07, 2023 3:09 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
First step of becoming a programmer, in spite of your reluctance...
Welcome!

_________________
"Where am I ?"


Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Sat Oct 07, 2023 4:17 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Aug 08, 2016
Posts: 2048
Location: East Midlands of England
Hats off to you for playing with the scm format!

_________________
Image

"Let no one steal your dreams."
Paul Cookson


Latest plug-in update: Paragrapher v.1.4
Custom Font Links
Tools
Character Paths
White Bases


Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Sat Oct 07, 2023 9:28 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 785
Location: SEA - South East Asia
dinasset wrote:
First step of becoming a programmer, in spite of your reluctance...
Welcome!

:rofl :rofl

Skinnyhouse wrote:
Hats off to you for playing with the scm format!

I know absolutely nothing in Python, but I found python "easier"/ more readable could be the word, maybe because from my point of view, Python looks a lot more human ;)

Thank you very much Diego and Skinnyhouse for your kind words. :tyspin

_________________
Patrice


Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Sun Oct 08, 2023 1:52 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12692
Location: Spain, Aragón
Patrice, you have given a great step to much more. Congrats!
I'll test it. I'll do my next planning with your plug-in. Thanks :clap :tyspin

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.


Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Sun Oct 08, 2023 2:10 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
PixLab wrote:
dinasset wrote:
First step of becoming a programmer, in spite of your reluctance...
Welcome!

:rofl :rofl

Skinnyhouse wrote:
Hats off to you for playing with the scm format!

I know absolutely nothing in Python, but I found python "easier"/ more readable could be the word, maybe because from my point of view, Python looks a lot more human ;)

Thank you very much Diego and Skinnyhouse for your kind words. :tyspin

Second step towards entering programming: comparing script-fu and python and selecting python. Go on... :gimp

_________________
"Where am I ?"


Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Sun Oct 08, 2023 9:30 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 785
Location: SEA - South East Asia
dinasset wrote:
Second step towards entering programming: comparing script-fu and python and selecting python. Go on... :gimp


Happily that I was not drinking some coffee while reading :rofl :rofl
I literally bursted into laughter
Thanks a lot for the laughter, Diego, that were very good ones :yes

_________________
Patrice


Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Sun Oct 08, 2023 9:52 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 785
Location: SEA - South East Asia
Issabella wrote:
Patrice, you have given a great step to much more. Congrats!
I'll test it. I'll do my next planning with your plug-in. Thanks :clap :tyspin


Thank you very much Issabella for your kind words, do not hesitate if you see a problem (no sure I can solve it, though, but find some "trick" solution, yes it's possible)
:tyspin

_________________
Patrice


Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Thu Oct 19, 2023 8:37 pm  (#9) 
Offline
GimpChat Member

Joined: Oct 19, 2023
Posts: 6
My instinct would be to do this kind of thing as a plugin for Inkscape rather than GIMP. Why? Because it’s the kind of thing that you might want to edit/tweak by hand after it’s been generated. Inkscape documents are SVG, as you may know, and SVG is resolution-independent, so you can do this kind of editing without loss of quality. You can include the GIMP graphic (or any other graphic) as a background layer.


Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Thu Oct 19, 2023 10:23 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 785
Location: SEA - South East Asia
ldo wrote:
My instinct would be to do this kind of thing as a plugin for Inkscape rather than GIMP. Why? Because it’s the kind of thing that you might want to edit/tweak by hand after it’s been generated. Inkscape documents are SVG, as you may know, and SVG is resolution-independent, so you can do this kind of editing without loss of quality. You can include the GIMP graphic (or any other graphic) as a background layer.


No need, it exists in Inkscape, just go to the top menu Extensions > Render > Calendar...
Attachment:
screenshot_20231020-102304.jpg
screenshot_20231020-102304.jpg [ 140.46 KiB | Viewed 824 times ]


On a side note:
Not everyone is willing to learn both GIMP and Inkscape.
And what about not savvy computer users who knows only GIMP.
On different forums or reddit, some people said it's better to do it in LibreOffice/Calc or Writer, so for them even Inkscape is not good enough... ;)

_________________
Patrice


Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Thu Oct 19, 2023 10:59 pm  (#11) 
Offline
GimpChat Member

Joined: Oct 19, 2023
Posts: 6
I wouldn’t do it in LibreOffice anything. You want a proper design/layout tool, which means something like the align/distribute functions in Inkscape. GIMP is more for your painterly pixel-oriented imagery.


Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Fri Oct 20, 2023 12:33 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Sep 27, 2016
Posts: 345
Location: Germany, BW
Anyway, the script exists for GIMP, so I find it nice of Pixlab to give it a little love and update it (and maybe start his programming for GIMP career this way).
Nobody must use it, if they find other ways.
But It's nice to have.

_________________
Regards
nelo

(Gimp 2.10 on Linux Mint MATE 20.1)


Top
 Post subject: Re: Calendar month and year plugin (script .scm) updated - modified
PostPosted: Sat Oct 21, 2023 1:22 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 785
Location: SEA - South East Asia
nelo wrote:
(and maybe start his programming for GIMP career this way)

:hoh

:rofl :rofl :rofl

Thank you nelo for the kind words and the laughter :bigthup

_________________
Patrice


Top
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Happy New Year design plugin

8

No new posts Attachment(s) dinasset's photos modified

35

No new posts Looking for the Text Stamp Plugin/Script

4

No new posts Plugin or Script to bend/curve text

17

No new posts Script passes a 0 to the Displace plugin, and apparently it's an issue

0



* Login  



Powered by phpBB3 © phpBB Group