menu

Frame.io Developers

Frame.io is a video review and collaboration platform. Share video projects with your team and clients for fast feedback and approval. Use Frame.io's API to add custom features to your workflow!

Channels
# All channels
view-forward
# General
view-forward
# Feedback
view-forward
# Help
view-forward
# Show + Tell
view-forward
Team

Pulling a list of all account assets in an account into Google Sheets

May 29, 2020 at 1:43pm

Pulling a list of all account assets in an account into Google Sheets

May 29, 2020 at 1:43pm
I'm working on a Google Apps Script to crawl an account and generate a list of all assets in all folders and list them in a Google Sheet via calls to the Frame.io API. While I've created functions for listing all the assets in a folder, I wanted to pause my development and make sure I'm not "reinventing the wheel." Has anyone posted a script for crawling the contents of an account? I see the basic methodology is described in the API docs.

May 29, 2020 at 2:06pm
Hi Allan, to my knowledge we don't have an example script that crawls an account and lists all assets in all folders. (I say public because we've spoken to developers running similar scripts privately within their org.)
This would be a welcome contrib if you want to share what you create! We are working on sample code to recursively upload / download files within a project -- your code would make a great compliment to these.
Are you planning to crawl all of the assets within a project, and then broaden out to crawl all projects?
Edited
  • reply
  • like
Yes - I'll be crawling all projects for the purpose of listing the URLs of all original assets in an account so our product, Dataclay Templater, can automate the compositing of any or all of these assets in After Effects. But the Google Sheets work I do will all be available free to the public - so I'm happy to share whatever I create.
  • reply
  • like
Got it. I've been thinking about how to best format files and folders in Google Sheets (e.g. should folders be captured in a separate column from files? or is same column with a type field a better way to go?)
I'm interested to see what you come up with. I might tinker with this use case in Python over the weekend.
  • reply
  • like
For general purposes, I think having a column for folder and another for asset makes the most sense in a 2D spreadsheet. Then having a separate column for a directory path representation all the way from the account root would be cool - I'll have to think about how to construct that path string, but it would make it easier to understand where the assets are located.
  • reply
  • like

June 1, 2020 at 2:56am
Hey , I didn't want to leave you hanging so I wrote some sample code for listing all assets in an account and writing them to a .csv: https://github.com/Frameio/comment-scraper-python/blob/add-asset-scraper/asset_scraper.py
The code needs refactoring but it runs. I left a few debug statements in there. I'd like to re-write this so it dumps a separate log of files for each team under the account. That's probably more useful for folks working with tens of thousands of assets.
  • reply
  • like

June 15, 2020 at 11:02pm
Hey , I didn't want to leave you hanging so I wrote some sample code for listing all assets in an account and writing them to a .csv: https://github.com/Frameio/comment-scraper-python/blob/add-asset-scraper/asset_scraper.py
The code needs refactoring but it runs. I left a few debug statements in there. I'd like to re-write this so it dumps a separate log of files for each team under the account. That's probably more useful for folks working with tens of thousands of assets.
I'm just seeing this, Kyle! Sorry, I would have referenced it while I was working on my Google Apps Script version. Anyway, I've almost finished my version - I'm just cleaning it up and troubleshooting - but it appears to be working. I'm not much of a script writer, and I don't currently know Python, but I've hacked it together. I'll put the script on GitHub when it is ready.
like-fill
1
  • reply
  • like