Author Topic: A new Scripter API documentation  (Read 1096 times)

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2473
  • Karma: 36
    • the graphics lab
A new Scripter API documentation
« on: August 22, 2020, 04:41:40 pm »
Over and over, I've heard complains about the Scripter documentation
(among other things, of course!).

Since the Scribus documentation is not really free, there was not much
I was willing / able to do.

Last week, I got one more critical voice on the API documentation, and
I've decided that it was time to see if it was possible to get to
something sane, by exporting the API from the docstrings.

The starting point was the "good old"

https://github.com/aoloe/scribus-script-collection/blob/master/export-api-doc/export-api-doc.py

the final result is

https://github.com/aoloe/scribus-script-repository/tree/master/export-scripter-api

that can be used to produce

http://impagina.org/scribus-scripter-api/

(yes, people also asked for the API help to be published in the web)

Yeah, no more undocumented commands!
Only one place where the command will be documented!

The final goal is to replace the hand crafted API help in the Scribus
help by a separated Help entry (that will provide more focused search
results).

If you have ideas on how to improve the script or the output, you're
welcome to comment in here or in the bug tracker

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

or in the scribus-script-repository Github repository linked above.

For those who are willing to help out, I could need a hand for
improving the docstrings:

- modify all signatures in the docstrings to match the real Python
  signatures ("getAllObjects(page: int=None) -> list" instead of
  "getAllObjects(["page"]) -> list"
- fix the formatting that do not convert well to Markdown/HTML (like
  code snippets and lists)
- a unified way of marking depracated functions
- propose (and implement) name changes for functions that do not match
  the overall naming schema.
- generally, improving the docstrings to be more useful.

Have fun
a.l.e

digirew

  • Jr. Member
  • **
  • Posts: 81
  • Karma: 0
  • Scribus User
Re: A new Scripter API documentation
« Reply #1 on: September 16, 2020, 02:19:18 am »
These new docs are very good and a drastic improvement over the "old" ones.

Great work!


Luke.Whitehorn

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
  • Scribus User
Re: A new Scripter API documentation
« Reply #2 on: December 23, 2020, 10:49:08 pm »
Thank you! I was going a little bit mad looking for the documentation.

dragonfly

  • Full Member
  • ***
  • Posts: 203
  • Karma: 0
  • Scribus User
Re: A new Scripter API documentation
« Reply #3 on: January 15, 2021, 05:30:18 pm »
I have started studying Scripter API (with aim of hooking up Scribus to external toolchain) and on first skim read noticed this broken link.

https://impagina.org/scribus-scripter-api/scribus

A minor editing point, and otherwise the document structure looks to be very good. Thanks to author(s).

dragonfly

  • Full Member
  • ***
  • Posts: 203
  • Karma: 0
  • Scribus User
Re: A new Scripter API documentation
« Reply #4 on: January 23, 2021, 04:14:04 pm »
Pursuing further experiments on workflows, recently I found that Scribus 1.5.4 is available in the cloud through a free Starter account at rollapp.com.

https://www.rollapp.com/app/scribus

This opens up interesting workflows where online demonstrations can be created.

However I have encountered an obstacle which I have failed to get around. When I start a new Scribus file, insert textframe, and select Text Properties, the popup window start point is offset from top screen and I cannot drag the popup window to centre screen to select all text properties.

It would help if there was some Scribus preference which could be set for the start point of the popup properties windows (such as 200:200).

Alternatively can I configure popup windows through a Scripter script? Can anyone give some tips on repositioning properties popup windows?

=====================

[Update] This issue applies to any properties boxes ticked under Windows.
The ticked properties boxes are offset on screen making them unusable.
I can use story editor but this does not solve the issue.
I will raise this through rollapp.com support since this seems to be a design flaw.

« Last Edit: January 23, 2021, 05:14:29 pm by dragonfly »

 

palmate