Recent posts

#31
Scripts and Plugins / Re: Color functions
Last post by a.l.e - December 01, 2023, 03:54:16 PM
i don't insist, it's just an "extreme" idea:

defineColor("red", 255, 0, 0) # creates a rgb red
defineColor("red", 0, 92, 48, 0) # creates a cmyk red
defineColor("red", 51, 53, 71, colorModel="lab") # creates a lab color
defineColor("red", 255, 0, 0, colorModel="rgb") # creates a rgb red
defineColor("red", 0, 92, 48, 0, colorModel="cmyk") # creates a cmyk red

if you set three values, you get an rgb color.
with four values, you get a cmyk one.
and you can always specify the color model (to be clearer?), but you still need to pass the correct number of parameters.

i think that most people will use the first two version and they will be happy with what they get.

but, as i said, it's an extreme proposal and it's possible that yours is better.
#32
Scripts and Plugins / Re: Color functions
Last post by Darkoni - December 01, 2023, 02:18:44 PM
Why insist on an additional colorMode parameter?

The script author knows how he wants to create the color, and will call that function.

Isn't it simpler to have five functions than to call one function with an additional colorMode parameter?

defineColorCMYK("name", c, m, y, k)
defineColorCMYKFloat("name", c, m, y, k)
defineColorRGB("name", r, g, b)
defineColorRGBFloat("name", r, g, b)
defineColorLab("name", L, a, b)

against

defineColor("name", (c, m, y, k), "CMYK"      )
defineColor("name", (c, m, y, k), "CMYKFloat" )
defineColor("name", (r, g, b)   , "RGB"       )
defineColor("name", (r, g, b)   , "RGBFloat"  )
defineColor("name", (L, a, b)   , "Lab"       )
#33
Scripts and Plugins / Re: Color functions
Last post by a.l.e - December 01, 2023, 01:08:45 PM
well, what about an even more extreme proposal?

defineColor("name", ...[, colorModel=None)
which would:

  • create an RGB color when given three values
  • create a CMYK color when given four values
  • create a lab color when given three values and colorModel='lab'
  • colorModel can have three values: cmyk, rgb, lab (and the color model is only automatically picked when no colorModel is specified; if there is a mismatch between the number of values and the model, an exception gets triggered).

such an implementation would be compatible with the existing function and, i think, by default do what most (or evern every) user expects.

but your proposition is also a good one (if indeed all "similar" functions do indeed the same thing)!
#34
Features / Polish typography rules - no s...
Last post by mariuszkisling - November 30, 2023, 11:19:18 PM
Hi,
in Poland we have a rule, which i couldn't find english translation for.
It is considered a mistake to leave single characters at the end of lines. It's fairly common as many conjugations are single letter words.

Example:
Byliśmy z moją mamą na zakupach w
lidlu, moim ulubionym sklepie


Should be
Byliśmy z moją mamą na zakupach
w lidlu, moim ulubionym sklepie


It's our national custom to search and replace all spaces to nonbreaking for all of the possible single character words in polish, but it would be great if scribus gave an option to just tick a box in edit>styles to automatically break the line before those words.

Here is the same issue someone had in Tex.

It's called "sieroty" (literal orphans, but different than english orphans in typography, what a linguistic mess. 
#35
Scripts and Plugins / Color functions
Last post by Darkoni - November 30, 2023, 09:10:39 PM
I am curious - why there two Scribus scripting functions:

defineColorCMYK("name", c, m, y, k)

changeColorCMYK("name", c, m, y, k)

I think the defineColorCMYK should be enough.

Please, see it for yourself:

defineColorCMYK("name", c, m, y, k)
changeColorCMYK("name", c, m, y, k)

defineColorCMYKFloat("name", c, m, y, k)
changeColorCMYKFloat("name", c, m, y, k)

defineColorRGB("name", r, g, b)
changeColorRGB("name", r, g, b)

defineColorRGBFloat("name", r, g, b)
changeColorRGBFloat("name", r, g, b)

defineColorLab("name", L, a, b)
changeColorLab("name", L, a, b)

defineColor("name", c, m, y, k)
changeColor("name", c, m, y, k)

And we do not need defineColor and changeColor at all - as we easily could have only defineColorCMYK

At total, 7 functions that are not needed at all.
#36
PDF Generation / Re: PDF Generation is not stab...
Last post by obergeau - November 30, 2023, 11:55:57 AM
Looks' like I inadvertently started 2 user actions

sorry

all the relevant data is attached to both user actions

ED
#37
PDF Generation / Re: PDF Generation is not stab...
Last post by obergeau - November 30, 2023, 11:38:48 AM
where did the previous posts go?
#38
PDF Generation / PDF Generation is not stable w...
Last post by obergeau - November 30, 2023, 11:35:34 AM
here is the first 4 months of the 2000 wind data from the csv file
#39
PDF Generation / Re: PDF Generation is not stab...
Last post by obergeau - November 30, 2023, 11:19:21 AM
code is attached in text file 2000WindBasic

Plus the image files that are inputted when sla is run

Ed
#40
PDF Generation / Re: PDF Generation is not stab...
Last post by obergeau - November 30, 2023, 10:43:51 AM
Dear AdmFubar
Thanks for getting back to me.

We started out with a template a long time ago but have only been upgrading the sla files and not the template.

in order to test our changes to the sla upgrades I just run 4 or 5 days at a time because to run the whole year takes 15 minutes so with the short runs we never encountered an of the long run crash problems.

I am a very newbee re scibus but am basically sefl taught.

My email is obergeau@gmail.com com

I can send you the files.  I'll try to send you a typical sla file and csv file but you will need the other image files .  I"ll try to do this using this dialogue box I noticed the icons above this text box

ED