Making First Impressions: 2 Prototypes and containers

In the first article, I sketched out the main, linear linked writing spaces to form the top level of my hypertext on the First Impressionist Exhibition of 1874. My next task is to implement the more complex interlinked writing spaces which will detail each artist who took part, and give insight into their life and work.

If you are unfamiliar with any of the techniques used here, you should find further information in the index to articles, which will take you to the relevant tutorial.


My initial plan to implement this is to make the central writing space, The First Impressionist Exhibition, a container. Within that, each participant will consist of their own container, within which there will be writing spaces containing their biography and individual examples of their work.

I will therefore need prototypes for artist, painting (including prints), and sculpture and other works (such as enamelled porcelain). To keep the top level Map clean, I will put these prototypes in a container named prototypes.

The artist prototype is straightforward. Its title will be the normal name of the artist, as generally used. It has four key attributes: $StartDate for the year of birth, $EndDate for the year of death, and two user attributes $FirstNames and $LastName to store the full names of the artist.


The first two attributes are used to construct the $Subtitle of the writing space using the rule:
$Subtitle = "("+format($StartDate,"y")+"-"+format($EndDate,"y")+")"
which simply generates a conventional year range such as (1800-1940). Those extremes are set as the outlying date range for these dates, although I recognise that I may need to adjust them as I add artists.


I have also added a badge to indicate that these writing spaces represent people.

The prototype painting needs more user attributes so that I can build a complete citation in its $Text field. These include $WorkTitle, $Artist, $Media, $Dimensions, $Location, and $Credit, as well as the key attributes $StartDate for the start of the work’s creation, and $EndDate for the year of its completion.

In addition to the same rule for the construction of its $Subtitle, its $Text is made by the additional rule:
$Text = $Artist+", "+$WorkTitle+" "+$Subtitle+", "+$Media+", "+$Dimensions+", "+$Location+". "+$Credit+"."
which formats the attributes and creates the text content automatically.

This is illustrated with the default values, and a badge to indicate that these writing spaces represent paintings.


To save time, I then created the sculpture prototype by duplicating the painting prototype, changing its name to sculpture and its badge, removing its $Dimensions user attribute, and removing reference to that attribute in the rule for generating its text content.


It was then time to try these prototypes out with the first artist, the painter Eugène Boudin. In view of his role as a precursor to Monet and the Impressionist style, I thought that he was a very appropriate start.

I created a new writing space, and gave it the name Eugène Boudin and set it to use the artist prototype. I dropped that onto The First Impressionist Exhibition to put it inside that as a container, and entered Boudin’s information into the key attributes. I then created a new writing space to hold his biography, copied and pasted from my original text files, and dropped that onto the artist’s writing space to place it inside that as its container. I opened the container in order to add paintings to it.



There are several options for making attractive and informative writing spaces for paintings, some of which I have explored in my previous tutorials. Here I thought it would be interesting to use the painting thumbnail image as the tile shown in the Map view. To do this, I copied the thumbnail of the first painting, Pardon of Sainte-Anne-La-Palud, from Preview, pasted it into the artist’s container, and set it to use the painting prototype.

Having looked at this example writing space, it was clear that I needed to reduce the size of its title to 9 points, and to make its subtitle fully opaque. I therefore returned to the painting and sculpture prototypes and made those adjustments there.


The last task which I want to tackle here is opening the full image using Preview, as the default image viewer, when a painting or sculpture writing space is visited. It is simplest to do this using a hard-coded folder path to the image files, and the location which we should use for this is the ~/Library/Application Support folder, so that, once installed, they are accessible to all users. I therefore created a folder there called Storyspace, into which I copied my img folder, containing the full-size images.

I then needed to add another user attribute to the painting and sculpture prototypes to contain the name of the image file in that folder which is to be opened.


Once I had done that, I quickly went back to my example painting by Boudin and pasted in the correct image filename, so that I could add the script to the prototype without causing problems. I also created an image default.jpg and added that to the img folder so that the prototypes would work correctly.


I was then ready to add the Visit script to the prototypes:
runCommand("open -b '/Library/Application Support/Storyspace/img/"+$Image+"'")
which for those prototypes will display the default image, but for correctly completed writing spaces descended from those will open the named image using Preview. Note that the single quotation marks are necessary because there is a space in the folder name Application Support: without them, the command will always fail as the pathname will be broken at that space.


The building blocks are now in place to add more artists and their works, and then to start connecting them up to help the reader explore the hypertext. That will be the focus of my next article.