Recent posts

#71
Scripts and Plugins / Re: Textbox Frame Size when cr...
Last post by a.l.e - November 12, 2024, 08:19:58 PM
if width and height are defined, you're using the same width and height for creating the frame and then for resizing it.

in that case it won't change its size, no.

i just tested the sizeObject() function on my local Scribus and it did work as expected.

if reading this does not help, you might need to define a bit better what "it does not work" means...
#72
Scripts and Plugins / Re: Textbox Frame Size when cr...
Last post by AdmFubar - November 12, 2024, 07:46:21 PM
at a quick glance at this script, I dont see what the new size would be, or how the size is going to be changed. Yes there the resize section, but are the width and height, getting the updated values?
#73
Scripts and Plugins / Re: Custom keyboard shortcut f...
Last post by a.l.e - November 12, 2024, 07:47:02 AM
No, it's not possible...

And I am not sure that's a good idea, either:

Non default shortcuts tend do be pretty bad, complex and not match the name of the script...

Personally, I've integrated my scripts in the navigation and can now launch them with the action search...

https://bugs.scribus.net/view.php?id=15579

I have plans to improve the patch. But not before it gets accepted or at least reviewed.

If you compile your Scribus, you should be able to use it...
Otherwise you will need to wait...
Sorry.
#74
Scripts and Plugins / Custom keyboard shortcut for r...
Last post by shab.t786 - November 12, 2024, 06:01:25 AM
Hello
Is it possible to add a custome keyboard shortcut to run a custom script on scribus ?
#75
Scripts and Plugins / Textbox Frame Size when creati...
Last post by shab.t786 - November 12, 2024, 05:53:48 AM
sizeObject(...)
sizeObject(width, height [, "name"])
Resizes the object "name" to the given width and height. If "name" is not given the currently selected item is used.

I am trying to use this function to resize a text frame created. But it does not work
  text_frame = scribus.createText(x_pos, y_pos, width, height)
           
            # Insert only the cleaned text into the Scribus text box
            scribus.insertText(clean_text, -1, text_frame)

            # Optional: Set font styling
            scribus.setFontSize(10, text_frame)
            scribus.setFont("Baloo 2 Medium", text_frame)

            # Set columns for the text frame
            scribus.setColumns(2, text_frame)  # Adjust the number of columns as needed

            # Resize the object (if needed)
            scribus.sizeObject(width, height, text_frame)

            # Redraw all elements
            scribus.redrawAll()
#76
General Discussion / Re: What's the best way to dea...
Last post by apastuszak - November 11, 2024, 09:43:44 PM
Can you make tables using a script? I'd like to try that, if possible.

And, you're not the only ones with weak table functionality. I have a copy of Affinity Publisher and it's not much better.
#77
Scripts and Plugins / Re: Is there a way to delete a...
Last post by dtribby - November 11, 2024, 09:18:02 PM
Thanks! That would be great.
#78
General Discussion / Re: What's the best way to dea...
Last post by MrB - November 11, 2024, 09:03:02 PM
Unfortunately, we need to do a lot of work on the table functionality to make it really useful. Ideally, your scenario is just one way of making tables, yes.
#79
Scripts and Plugins / Re: Is there a way to delete a...
Last post by a.l.e - November 11, 2024, 07:53:44 PM
I did a quick search and, indeed, the command seems to be missing from the scripted API.

But it's probably easy to add.

On Thursday, I could give it a try.
#80
General Discussion / What's the best way to deal wi...
Last post by apastuszak - November 11, 2024, 03:41:01 PM
The built in table feature isn't really working as well as I would like. And just using tabs in a text column isn't working for me either.

The workaround I came up with after Googling was to design the able in Libreoffice Calc, copy and paste it into LibreOffice Draw, export it as an SVG and import that into Scribus. That works well enough, but is kind of a pain to use. You also can't edit the table in Scribus if you find a typo.

Does anyone have a good workflow for doing tables in Scribus?

In a perfect world, I'd love to just feed an app a csv file, pick a table style and have it just create a table for me.