Please or Register to create posts and topics.

Prism | Wordpress intergration OR google sheets


Would it be possible to implement some REST functionality to push data up to a WordPress database? For example if you wanted to view or query all play-blasts or dailies submission for an asset/shot/seq/show, this could easily be achieved in WordPress if it was possible to parse the data via REST.

WordPress Posts or Media Library data etc could be created on the fly via the prism UI with the option of uploading relative scene files and dependency files along with the play-blasts. The WordPress site could be browsed by production or non-artists as a way to keep up to date with what has been recently published and playlists of publishes could be created on the WordPress side.

The python to WordPress part is pretty straight forward via the WordPress REST API but what would be the best way to go about getting the data from Prism?



The Prism side would be very straight forward. With a Prism plugin you can trigger custom python functions and make REST api calls at specific Prism events or add menus to the Prism gui to let the artist trigger REST api calls.

If there are any required callbacks missing I can add them quickly.

If would be difficult to make one Prism plugin which can communicate with many different REST apis, because they can have different endpoints, which expect different kind of data.

Do you already have a wordpress site, which has a REST api and displays project management data in a nice way? Setting up a wordpress site with project management tools from scratch seems very ambitious as there are already so many online project management services available. But my wordpress experience is pretty basic. For someone with a lot wordpress knowledge it would be easier to archive for sure.


After some more thought, I think I just want to use WordPress as a UI for a google spreadsheet. Is it possible to dump all prism data to a spreadsheet? or what kind of data can prism dump?


It can dump anything you want 🙂
Take a look at the Shotgun plugin and you'll see how it's getting the shot-name, asset-name, shot duration and so on.
I'm sure there is some python library that can spit out a csv file or sync data to a google spreadsheet so it shouldn't be to hard to make a plugin for it.

Writing data to a csv file is already supported in the Python standard libraries. Making a small Prism plugin which queries the data from Prism and writes it to a csv file should be straight forward. Writing it to google sheets requires a few more steps, but there are guides out there how to access google sheets from Python.

When I find some time I can make an easy to use UI for that.

This would be an example to write all asset and shotnames to a csv file:

import sys
import csv

# get PrismCore
import PrismCore
pcore = PrismCore.create(prismArgs=["loadProject", "noUI"])

# get assets
assetPaths = pcore.entities.getAssetPaths()
assetRelPaths = [pcore.entities.getAssetRelPathFromPath(p) for p in assetPaths]

# get shots
shots = pcore.entities.getShots()
shotnames = [s[2] for s in shots[1]]

# write to csv
with open('output.csv','wb') as result_file:
    wr = csv.writer(result_file)
    wr.writerows([a] for a in assetRelPaths)
    wr.writerows([(s,) for s in shotnames])