Function Repository Resource:

CreateResourceObjectGallery

Source Notebook

Deploy a gallery of resource objects to the cloud

Contributed by: Bob Sandheinrich

ResourceFunction["CreateResourceObjectGallery"][resources]

deploys a browsable gallery of links to resource objects to the cloud.

ResourceFunction["CreateResourceObjectGallery"][resources,path]

deploys to the specified path.

Details and Options

The value of resources is a list of resource objects. The list can be a mixture of ResourceObject, ResourceFunction, names or UUID elements.
ResourceFunction["CreateResourceObjectGallery"] currently only supports resources published in a Wolfram repository.
The gallery includes links for adding and removing resources.
The background color of each tile corresponds to the repository from which it came.
ResourceFunction["CreateResourceObjectGallery"] accepts all the Options from CloudDeploy and GalleryView.
If a path is not given, ResourceFunction["CreateResourceObjectGallery"] deploys to the default "Galleries/ResourceObjects".
ResourceFunction["CreateResourceObjectGallery"] works by creating a directory of cloud objects. The returned cloud object is the directory. Therefore, some operations like SetOptions and SetPermissions will not be effective. See the example in Possible Issues below.
ResourceFunction["CreateResourceObjectGallery"] requires an authenticated cloud connection via CloudConnect.

Examples

Basic Examples (1) 

Create a gallery containing resource objects from several repositories:

In[1]:=
ResourceFunction[
 "CreateResourceObjectGallery"][{"BirdSay", "MNIST", "ClickedNotebook", "GrayCode", "AdaIN-Style Trained on MS-COCO and Painter by Numbers Data", "Hamlet"}]
Out[1]=

Scope (2) 

Deploy publicly, to a specified path with a custom title:

In[2]:=
ResourceFunction[
 "CreateResourceObjectGallery"][{"CircleTheDrain", "SudokuSolve", "Minesweeper"},
 "BobsFavoriteGames", AppearanceRules -> <|"Title" -> "My Games"|>, Permissions -> "Public"]
Out[2]=

Deploy using a mix of resource specifications:

In[3]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/d68cf8cc-892b-4967-a500-ae2ad7645b58"]
Out[3]=

Properties and Relations (2) 

When no path is specified, CloudDeploy uses an anonymous, UUID-based path:

In[4]:=
CloudDeploy[Delayed[Now]]
Out[4]=

CreateResourceObjectGallery uses a default location on the user’s cloud file path:

In[5]:=
ResourceFunction[
 "CreateResourceObjectGallery"][{"Age Estimation VGG-16 Trained on IMDB-WIKI Data",
  "Gender Prediction VGG-16 Trained on IMDB-WIKI Data"}]
Out[5]=

Possible Issues (4) 

The result is a directory, which by default uses $Permissions:

In[6]:=
gallery = ResourceFunction[
  "CreateResourceObjectGallery"][{"BirdSay", "MNIST", "ClickedNotebook", "GrayCode", "AdaIN-Style Trained on MS-COCO and Painter by Numbers Data", "Hamlet"}]
Out[6]=
In[7]:=
DirectoryQ[gallery]
Out[7]=
In[8]:=
Options[gallery, Permissions]
Out[8]=

The directory contains several cloud objects:

In[9]:=
obs = CloudObjects[gallery]
Out[9]=

Changing the permissions of the directory does not change permissions of all the cloud objects:

In[10]:=
SetPermissions[gallery, "Public"]
Out[10]=
In[11]:=
Options[obs[[1]], Permissions]
Out[11]=

To modify the permissions - or other options values - map the change over all the cloud objects:

In[12]:=
SetPermissions[#, "Public"] & /@ obs
Out[12]=

Version History

  • 4.0.0 – 10 June 2019
  • 3.0.0 – 10 June 2019
  • 2.0.0 – 10 June 2019
  • 1.0.0 – 07 June 2019

Related Resources

Author Notes

This function should be expanded to support a CloudObject for a cloud deployed ResourceObject.

License Information