Scriptable via command line or similar?


#1

Hi there.

Does OmniPlan have a command line interface (CLI)?

Use case:

Current behavior:

After the initial set up of a project I do the following on a daily/weekly basis:

  1. Open my company’s proprietary bug tracker / project management tool
  2. Get the update efforts for the tasks in the project
  3. Manually update OmniPlan with them
  4. Generate a baseline
  5. Generate a report to send to my stakeholders

Desired behavior:

Ideally I would be able to create a script to do all 5 steps above programmatically.

Is it possible somehow? I don’t think the Automation Console would suffice here, would it?


#2

Would AppleScript help you here?


#3

Good question, how many actions in OmniPlan are exposed to Apple/JavaScript? I think it would have to be a really granular and complete feature set.

Personally, I’m terrible at AppleScript but well versed in shellscript and javscript, so being able do it via a shell script or bash script and all the tools that go with the, like dealing with CSV, making HTTP requests, etc would be ideal…

Have you done something similar with AppleScript only?


#4

I would personally tend to use osascript -l JavaScript ... in a shell script.

(see man osascript)

You can explore the API that is exposed to JXA from macOS Script Editor by:

  • setting the top left language dropdown to JS
  • browsing to OmniPlan.app from Script Editor > File > Open Dictionary

(reasonably complete, I think)


#5

@draft8 you’re awesome! Learning a lot with your replies in different threads. Thank you very much, I guess osascript might serve me well. I’ll play around with it and report back here for future readers. Thanks!