Discussion:
[scribus] Scripting question
Ralf Mattes
2018-06-25 12:56:12 UTC
Permalink
Hello,

is there any way to query the paragraph style of a text paragraph?
Seems to be an obvious task but I can't find it in the documentation.

Cheers, RalfD




___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
JLuc
2018-06-25 13:07:05 UTC
Permalink
Post by Ralf Mattes
is there any way to query the paragraph style of a text paragraph?
Seems to be an obvious task but I can't find it in the documentation.
Introduction page to scripts https://wiki.scribus.net/canvas/Category:Scripts
proposes a script to "Auto-Output all Scripter Commands".

I recently created a new page that lists the output of this script :
https://wiki.scribus.net/canvas/Automatic_Scripter_Commands_list

Amongst these is a setStyle command.
Have a look at it !

JLuc


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki
Ralf Mattes
2018-06-25 13:11:28 UTC
Permalink
Post by JLuc
Post by Ralf Mattes
is there any way to query the paragraph style of a text paragraph?
Seems to be an obvious task but I can't find it in the documentation.
Introduction page to scripts https://wiki.scribus.net/canvas/Category:Scripts
proposes a script to "Auto-Output all Scripter Commands".
Yes, I know. That's actually the 'documentation' I was refering to in my question (is there
another?).
Post by JLuc
https://wiki.scribus.net/canvas/Automatic_Scripter_Commands_list
Amongst these is a setStyle command.
Have a look at it !
Yes, I've seen that. But that function _set_s an object's style, but I need to _get_ it (and it seems
to refer to the style of 'nameable' objects, which, I assume, is not true for paragraphs of text).

Thanks, RalfD
Post by JLuc
JLuc
___
http://lists.scribus.net/mailman/listinfo/scribus
http://wiki.scribus.net
http://forums.scribus.net
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.ne
Václav Šmilauer
2018-06-28 08:19:16 UTC
Permalink
Hi Ralf,

I implemented that function (getStyle, which complements existing
setStyle) for my own needs, in this commit:
https://github.com/eudoxos/scribus/commit/27be147502016b11599ecf5401444b6d9344ffa8
. The code is in my github repo at https://github.com/eudoxos/scribus/,
the pull request is https://github.com/scribusproject/scribus/pull/90
(it also includes text on cyclic paths) but it seems to have been
ignored since it was created.

If you want to use (compile) that branch, you are welcome. If anyone
with the right permissions can look at the PR and integrate it into the
codebase, that would be most welcome.

Cheers,

Vaclav
Post by Ralf Mattes
Post by JLuc
Post by Ralf Mattes
is there any way to query the paragraph style of a text paragraph?
Seems to be an obvious task but I can't find it in the documentation.
Introduction page to scripts https://wiki.scribus.net/canvas/Category:Scripts
proposes a script to "Auto-Output all Scripter Commands".
Yes, I know. That's actually the 'documentation' I was refering to in my question (is there
another?).
Post by JLuc
https://wiki.scribus.net/canvas/Automatic_Scripter_Commands_list
Amongst these is a setStyle command.
Have a look at it !
Yes, I've seen that. But that function _set_s an object's style, but I need to _get_ it (and it seems
to refer to the style of 'nameable' objects, which, I assume, is not true for paragraphs of text).
Thanks, RalfD
Post by JLuc
JLuc
___
http://lists.scribus.net/mailman/listinfo/scribus
http://wiki.scribus.net
http://forums.scribus.net
___
http://lists.scribus.net/mailman/listinfo/scribus
http://wiki.scribus.net
http://forums.scribus.net
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://
ale rimoldi
2018-06-29 09:02:15 UTC
Permalink
hi vaclav

i had a closer look at your pull request...
Post by Václav Šmilauer
. The code is in my github repo at
https://github.com/eudoxos/scribus/, the pull request is
https://github.com/scribusproject/scribus/pull/90 (it also includes
text on cyclic paths) but it seems to have been ignored since it was
created.
can you please split it into two pull requests?

as far as i can judge it, adding the scripter command would be a
no-brainer and will be accepted in no time, the changes about the text
on path might need a more serious checking.

since you made the pull request from your master branch, i would
suggest you to create two new pull request from two different branches.
(i'm not a git expert, but one thing i think i've understood, is that
when doing a pull request, one should create a new branch with only
that feature, make the pull request and then leave that branch alone.
except for further patches to that specific pull request).

if you need help, you're welcome to show up in the irc or matrix
channels and ask : - )

ciao
a.l.e

p.s.: the team does not accept pull requests from github so yourself or
myself will have to copy the diff to the official bug tracker and make
a formal request... it's just a bit tedious and not hard at all (if you
add .diff at the end of pull request address you get the diff that you
can then add to the bug tracker... : - )

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Václav Šmilauer
2018-08-17 11:49:18 UTC
Permalink
I added patch for getStyle (for obtaining default frame style) to
mantis: https://bugs.scribus.net/view.php?id=15403 - please someone
process it. Thanks!
Post by Ralf Mattes
is there any way to query the paragraph style of a text paragraph?
Seems to be an obvious task but I can't find it in the documentation.
Introduction page to scripts https://wiki.scribus.net/canvas/Category:Scripts
proposes a script to "Auto-Output all Scripter Commands".
Yes, I know. That's actually the 'documentation' I was refering to in my question (is there
another?).
https://wiki.scribus.net/canvas/Automatic_Scripter_Commands_list
Amongst these is a setStyle command.
Have a look at it !
Yes, I've seen that. But that function _set_s an object's style, but I need to _get_ it (and it seems
to refer to the style of 'nameable' objects, which, I assume, is not true for paragraphs of text).
Thanks, RalfD
JLuc
___
http://lists.scribus.net/mailman/listinfo/scribus
http://wiki.scribus.net
http://forums.scribus.net
___
http://lists.scribus.net/mailman/listinfo/scribus
http://wiki.scribus.net
http://forums.scribus.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20180817/1ff634ee/attachment.html>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums
ale rimoldi
2018-08-17 15:20:21 UTC
Permalink
hi václav
Post by Václav Šmilauer
I added patch for getStyle (for obtaining default frame style) to
mantis: https://bugs.scribus.net/view.php?id=15403 - please someone
process it. Thanks!
thanks for the patches!

i commented on them in the bug tracker...

ciao
a.l.e

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
JLuc
2018-09-01 21:54:00 UTC
Permalink
merged in trunk :
http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22654

JLuc
Post by ale rimoldi
hi václav
Post by Václav Šmilauer
I added patch for getStyle (for obtaining default frame style) to
mantis: https://bugs.scribus.net/view.php?id=15403 - please someone
process it. Thanks!
thanks for the patches!
i commented on them in the bug tracker...
ciao
a.l.e
___
http://lists.scribus.net/mailman/listinfo/scribus
http://wiki.scribus.net
http://forums.scribus.net
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scrib

Gregory Pittman
2018-06-25 13:20:08 UTC
Permalink
Post by Ralf Mattes
Hello,
is there any way to query the paragraph style of a text paragraph?
Seems to be an obvious task but I can't find it in the documentation.
Hi Ralf,

No, there isn't. I'm not sure there would be much need for it.

Greg


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Ralf Mattes
2018-06-25 13:38:51 UTC
Permalink
Post by Gregory Pittman
Hi Ralf,
No, there isn't. I'm not sure there would be much need for it.
Well, I guess it really depends on your needs. For any kind of (semi-)automatic
typesetting the im- and export of styled text seems to be a rather basic need.
Shot of the LibreOffice/MS-Word import are there any other ways of importing
styled text? Even the XTags import currently silently ignores character styles.
I'd hate to have to provide my data in RTF or the like (have done it decades ago,
don't want to go back ;-.)

Cheers, RalfD





___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Ralf Mattes
2018-06-28 09:29:40 UTC
Permalink
Post by Gregory Pittman
Hi Ralf,
I implemented that function (getStyle, which complements existing
https://github.com/eudoxos/scribus/commit/27be147502016b11599ecf5401444b6d9344ffa8
. The code is in my github repo at https://github.com/eudoxos/scribus/,
Cool, thank's for the link. I fixed my problem by writing a c++ plugin that exports text flows
with paragraph styles but I guess your code will be very helpful for upcomming projects.
Post by Gregory Pittman
the pull request is https://github.com/scribusproject/scribus/pull/90
(it also includes text on cyclic paths) but it seems to have been
ignored since it was created.
That's too bad . That PR is one year old, why wa there no reaction?
I think the ability to manipulate styling in text flows (StoryText in Scribus parlance) is pretty
important for start-to-end publishing/database based publishing.

Cheers, RalfD




___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http
JLuc
2018-06-28 09:37:42 UTC
Permalink
Post by Ralf Mattes
Post by Václav Šmilauer
the pull request is https://github.com/scribusproject/scribus/pull/90
(it also includes text on cyclic paths) but it seems to have been
ignored since it was created.
That's too bad . That PR is one year old, why wa there no reaction?
This is not an official repo.

When you wish scribus devs to see a PR, it has to be proposed on the bug tracker
http://bugs.scribus.net
Is there a ticket for this PR yet ?

JLuc


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://
Václav Šmilauer
2018-06-28 10:58:25 UTC
Permalink
Post by JLuc
This is not an official repo.
(I know I'd be re-iterating thing brought up on the list many times
already, but... using SVN does not really make collaboration easier.)
Post by JLuc
When you wish scribus devs to see a PR, it has to be proposed on the bug tracker
http://bugs.scribus.net
Is there a ticket for this PR yet ?
there is: https://bugs.scribus.net/view.php?id=14921

Cheers, v.

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
JLuc
2018-06-28 12:45:37 UTC
Permalink
(I know I'd be re-iterating thing brought up on the list many times already, but... using SVN does not really make
collaboration easier.)
Probably, but that's another topic.
Post by JLuc
When you wish scribus devs to see a PR, it has to be proposed on the bug tracker
http://bugs.scribus.net
Is there a ticket for this PR yet ?
there is: https://bugs.scribus.net/view.php?id=14921
Fine. Core devs can (could) have a look at this part !

How about the getStyle part ?

JLuc


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
htt
Václav Šmilauer
2018-06-29 20:36:51 UTC
Permalink
Post by JLuc
Fine. Core devs can (could) have a look at this part !
How about the getStyle part ?
It is in the same branch, the PR for tex-around-closed-path was
automatically updated with that one as well:
https://github.com/scribusproject/scribus/pull/90/commits/27be147502016b11599ecf5401444b6d9344ffa8


v.

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
JLuc
2018-06-29 21:01:36 UTC
Permalink
Post by Václav Šmilauer
Post by JLuc
Fine. Core devs can (could) have a look at this part !
How about the getStyle part ?
https://github.com/scribusproject/scribus/pull/90/commits/27be147502016b11599ecf5401444b6d9344ffa8
I'm not in a position where i can merge a commit so it's useless to explain this to me.

JL


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
htt
Ralf Mattes
2018-06-28 10:09:07 UTC
Permalink
Post by JLuc
Post by Ralf Mattes
Post by Václav Šmilauer
the pull request is https://github.com/scribusproject/scribus/pull/90
(it also includes text on cyclic paths) but it seems to have been
ignored since it was created.
That's too bad . That PR is one year old, why wa there no reaction?
This is not an official repo.
To be fair, this is one of the most hidden repositories I've ever seen. Try to find it on the
scribus website (search: git). Nothing. A google search leads to either the SVN repo or the
above-mentioned github repo.

Cheers, RalfD





___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
JLuc
2018-06-28 12:56:46 UTC
Permalink
Post by Ralf Mattes
To be fair, this is one of the most hidden repositories I've ever seen. Try to find it on the
scribus website (search: git). Nothing. A google search leads to either the SVN repo or the
above-mentioned github repo.
You might learn more on www.scribus.net official internet site for scribus.

see https://www.scribus.net/how-to-get-support-or-contact-the-team/

JL


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
htt
Ralf Mattes
2018-06-28 18:39:19 UTC
Permalink
Post by JLuc
Post by Ralf Mattes
To be fair, this is one of the most hidden repositories I've ever seen. Try to find it on the
scribus website (search: git). Nothing. A google search leads to either the SVN repo or the
above-mentioned github repo.
You might learn more on www.scribus.net official internet site for scribus.
see https://www.scribus.net/how-to-get-support-or-contact-the-team/
I might be stupid or blind (or both) but nowhere on that page does it mention the location
of the git repository ...

Cheers, RalfD





___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
htt
ale rimoldi
2018-06-29 09:11:47 UTC
Permalink
hoi ralf
Post by Ralf Mattes
Post by JLuc
Post by Ralf Mattes
To be fair, this is one of the most hidden repositories I've ever
seen. Try to find it on the scribus website (search: git).
Nothing. A google search leads to either the SVN repo or the
above-mentioned github repo.
You might learn more on www.scribus.net official internet site for scribus.
see
https://www.scribus.net/how-to-get-support-or-contact-the-team/
I might be stupid or blind (or both) but nowhere on that page does it
mention the location of the git repository ...
the scribus github repository is trivial to find: just google "scribus
git" and you'll get it!

as the title of the page says: it's a mirror of the official
scribus svn repository.

for one shot contributions you're very welcome to open tickets in
there and add pull request.
i try to take care of them and to mirror them in the official bug
tracker.

if you are regularly contributing patches, i (or somebody else...) will
ask you open an account in the scribus official bug tracker
(https://bugs.scribus.net) and create your own tickets. at that point i
think it's a an acceptable effort!
(this has been done multiple time in the past and works imo ok)

as you see here

https://github.com/scribusproject/scribus/pull/98

lot of work can be done on a pull request even when it's not in the
official bug tracker.
(yes, i have to go through it, check it and copy it in the bug
tracker... but somebody else can also do it...)

i hope this helps you with your code and your work!

ciao
a.l.e

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Ralf Mattes
2018-06-28 20:44:56 UTC
Permalink
While I am at it, our wiki is currently very broken and I’m looking for another solution. Possibly XWiki or just a fresh instance of MediaWiki. Not sure yet.
While at it - who has editing permissions in the wiki? How to get write permissions? I'd be more than happy
to bring certain info up to date.

RalfD






___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wik
Gregory Pittman
2018-06-28 22:38:27 UTC
Permalink
Post by Ralf Mattes
While I am at it, our wiki is currently very broken and I’m looking for another solution. Possibly XWiki or just a fresh instance of MediaWiki. Not sure yet.
While at it - who has editing permissions in the wiki? How to get write permissions? I'd be more than happy
to bring certain info up to date.
Anybody, basically. YOu need to get an account:

https://wiki.scribus.net/canvas/Your_first_Scribus_Wiki_article

As Craig says, the thought is to switch from MediaWiki. All sorts of
indexes are not updating like they should, and when I edit a page and
save it, the page goes blank. If I click the Reload button it will then
show the new edits, but it's frustrating.

Greg


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribu
Loading...