Import Macros into Collections (not Abilities!)?

1492776225
I have been searching around for a way to do this and I have found lots of ways to import data into the Journal and even into Rollable Tables, but I can't seem to find any script that will allow me to import a bunch of macros all at once. Again, just to be clear, I want to import these into the Macro section of the Collections tab in the Sidebar. The closest thing I can find is The Aaron's TableExport script which will automatically create a new Rollable Table based on the output from another campaign that had that Rollable Table. If only this could be modified so that it worked with the Macro section of Collections instead of the Rollable Tables section... [Hey The Aaron, Hint! Hint!] If I am missing an existing way to do this then please let me know. Thanks! -John
1492780245
The Aaron
Pro
API Scripter
You mean like this? https://app.roll20.net/forum/permalink/4607824/ =D
1492800379
Well, I was thinking that I would start with output from a spreadsheet that would give me the data that I want to import. However, if I run this on a test campaign and export a macro that is similar to what I want to import then I am guessing it will give me a "template" that I can use for the syntax of the output from the spreadsheet. If I then output a bunch of macros into a file in the same format will I be able to import those all in one shot using the "unpack-macros" command? BTW, what I am trying to do is import a bunch of D&D 2nd Edition spells as macros. They are going to be formatted similar to this: https://wiki.roll20.net/AD%26D_2Espell_Macros Do you see any parsing problems based on how those macros have been formatted? As usual, THANK YOU FOR ALL OF YOUR HELP!!! -John
1492801397
The Aaron
Pro
API Scripter
This script base64 encodes a json object with all the details of a player's macros in it.  The JSON object is an array of macro creation objects, so if you look at:  https://wiki.roll20.net/API:Objects#Macro and build your format from that, then base64 encode it and put it in a handout named "Macros: <display name>", it will be able to import it.  The big caveats being: 1) you need to have the display name and 2) you need to have the playerid of the player for whom to load the macros. If you run it in a test campaign and base64 decode the text of the handout it creates, it should be pretty easy to edit into what you want.
1492802272
Cool. I'll try it out this weekend and let you (and everyone else) know how it goes.
1493067692
Aaron could this be used to transfer macros easily between characters in the same campaign with different names? 
1493068194
The Aaron
Pro
API Scripter
No, this is for transferring Macros, which are attached to Players.   However, if you want to transfer Abilities from Characters, check out CharUtils: https://app.roll20.net/forum/post/1067109/script-charutils-a-collection-of-utilities-for-manipulating-character-data
1493068878
The Aaron
Pro
API Scripter
This thread has more:  https://app.roll20.net/forum/post/1953496/slug%7D
1493165870
Thanks