Wolfram Research

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

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

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/d5541246-b3eb-4e5c-9d7b-ea32d86e99c3"]
Out[3]=

Properties and Relations

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

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]=

Resource History

See Also

License Information