Missing Documentation for Scripting


#1

Hi, I’ve been reading the docs (https://docu.glyphsapp.com/), but I have seen that in some threads (like Feature request: previous master and next master shortcuts or Detect position of mouse without dragging for example) where you suggest code that it appeares not to be documented anywhere…

So, am I missing something or there is actually no docs for that? If so, how am I supposed to write scripts if there is no info about it? Any tips?

Thx


#2

The docu.glyphsapp.com link contains what is covered by the Python wrapper. Of course Glyphs has many more functions, accessible via ObjC or the PyObjC bridge, many of which are covered in the Core documentation, which is the link at the top, next to the word Python.

You can look into the .h files inside the Glyphs.app package. Or you get a list of all possible methods with the Method Reporter in my repo, or by using dir() and help() on the classes you want to know more about.


#3

OMG! Thanks for that… just as a constructive feedback, that menu should be more explicit, I’ve been reading the documentation a lot and this is the first time I see that.

I would be helpful for other people to make that more obvious. Thanks :slight_smile:


#4

We are very happy about feedback and are trying to improve as much as we can, if only a day had more hours :wink:


#5

I came across this as I’m looking through forum posts on using the “core” functions.

I had this same issue, as did another acquaintance! If I may, here’s a theory on why people are missing this.

The way the navigation is set – with just two navigational items – gives the appearance that “Python Core” is a single logo or title for the documentation. After all, people coming into these docs for the first few times may not realize yet that there are separate APIs for “python” and “core,” so they aren’t prompted to search for the second type of API docs.

After I learned that “core” was actually a separate option, I realized that the “active” item style matches the “active” tab style of the main Glyphs website. However, the header on the main site is more obviously a navigation bar (with familiar link names, like home, get started, forum, blog, etc), which is why people don’t misunderstand it so often.

Possibly, adding in some repetition to the titles might help clarify them as separate options. For instance, the navigation could look like this:

Other ways of clarifying it could make it even more obvious, such as:

  • more closely copying a typical style of web navigation from familiar sites like GitHub or Facebook, where the navigation bar is a bit thinner, and the navigation gets a similar prominence to the site logo/title.
  • The URL could reflect that the Python docs are a section of the docs site, rather than just the whole of it.
  • Separating the “breadcrumb” navigation from the sidebar style and from its proximity to the header, to show that it isn’t the main navigation.

Perhaps, that could be something like this:

Of course, other ways could go further still, like adding a “home” or “about” page to the docs. But, even shifting section titles could probably save someone pain in the future.

Hope this helps a bit, at least for getting a couple of ideas out there!


#6

Thanks for the detailed feedback. I have a look.