Skip to contents
library(arttools)
options(
  arttools.repos.local = file.path(tempdir(), "temp_repos"),
  arttools.bucket.local = file.path(tempdir(), "temp_bucket")
)

So now we are at the point where we’ve finished making art and we want to wrap it all up, create a nice “curated” version of the output, and prepare it for publication. At this point we might have something that looks like this:

#> /tmp/RtmprsYQ0H/temp_repos/series-fake
#> ├── .gitignore
#> ├── .here
#> ├── LICENSE.md
#> ├── README.md
#> ├── build
#> ├── input
#> ├── output
#> │   ├── 01
#> │   │   ├── art-system_01_0001.png
#> │   │   ├── art-system_01_0002.png
#> │   │   ├── art-system_01_0003.png
#> │   │   ├── art-system_01_0004.png
#> │   │   └── art-system_01_0005.png
#> │   └── 02
#> │       ├── art-system_02_0001.png
#> │       ├── art-system_02_0002.png
#> │       ├── art-system_02_0003.png
#> │       ├── art-system_02_0004.png
#> │       └── art-system_02_0005.png
#> └── source
#>     ├── art-system_01.R
#>     ├── art-system_02.R
#>     └── common.R

Obviously, in real life you probably have more versions of the system and more outputs from each system, but this will suffice to illustrate how the process works.

Regarding curation

Curation is mostly a manual process. Generative art systems don’t always create images that I find pleasing, and I see no reason to publish the bad ones. There’s an aesthetic I want to preserve when I publish a generative art series, and I view the “human in the loop” aspect to manual curation as an important part of the artistic process. Not everyone agrees with me on this, but after some years of making generative art that’s where I’ve ended up.

Given that ethos, arttools implicitly assumes that you’re going to choose a small subset of the uncurated images in the [local-repos]/series-fake/output folder and copy them into the [local-bucket]/series-fake folder. This manually curated subset is the one that you will want to publish to the web. That being said, there’s nothing stopping you from copying every single output into your bucket and publishing the whole thing!

Creating the curated version

Okay, let’s turn to the practicalities, and assume you’ve chosen some images that you like and you’ve copied them across to the series-fake local bucket folder. So now you have something like this in your local bucket:

#> /tmp/RtmprsYQ0H/temp_bucket/series-fake
#> └── image
#>     ├── art-system_01_0002.png
#>     ├── art-system_01_0003.png
#>     ├── art-system_02_0003.png
#>     └── art-system_02_0005.png

Notice that for the curated version in the series-fake bucket, I’ve placed the images in an image folder. The reason for that is that – usually – the images you create with your generative art system are high resolution, so you’re going to want to have low-res versions of the same images that you can use as “thumbnail” previews on your generative art website.

Creating thumbnail images

The arttools package supplies a function to create all your thumbnails for you, boringly entitled create_resized_images().

create_resized_images(
  series = "series-fake",
  images_from = "image",
  images_to = "preview",
  pixels_wide = 500,
  pixels_high = 500,
  origin = bucket_local_path()
)
#>  /tmp/RtmprsYQ0H/temp_bucket/series-fake/preview/art-system_01_0002.png created
#>  /tmp/RtmprsYQ0H/temp_bucket/series-fake/preview/art-system_01_0003.png created
#>  /tmp/RtmprsYQ0H/temp_bucket/series-fake/preview/art-system_02_0003.png created
#>  /tmp/RtmprsYQ0H/temp_bucket/series-fake/preview/art-system_02_0005.png created

The bucket now contains the “full resolution” images in the image folder, and lower resolution versions of the same images in the preview folder:

#> /tmp/RtmprsYQ0H/temp_bucket/series-fake
#> ├── image
#> │   ├── art-system_01_0002.png
#> │   ├── art-system_01_0003.png
#> │   ├── art-system_02_0003.png
#> │   └── art-system_02_0005.png
#> └── preview
#>     ├── art-system_01_0002.png
#>     ├── art-system_01_0003.png
#>     ├── art-system_02_0003.png
#>     └── art-system_02_0005.png

Creating manifest files

At the moment, the series-fake bucket exists only as a local folder, and it’s easy enough to inspect its contents. However, when it goes online to the remote bucket, it’s not as easy to list all the contents automatically. To make life easier it’s helpful to write a manifest file that lists all the files in the bucket. To that end, the arttools package has a function called manifest_write() that will create the file we need:

manifest_write("series-fake")

And now we have a manifest.csv file:

#> /tmp/RtmprsYQ0H/temp_bucket/series-fake
#> ├── image
#> │   ├── art-system_01_0002.png
#> │   ├── art-system_01_0003.png
#> │   ├── art-system_02_0003.png
#> │   └── art-system_02_0005.png
#> ├── manifest.csv
#> └── preview
#>     ├── art-system_01_0002.png
#>     ├── art-system_01_0003.png
#>     ├── art-system_02_0003.png
#>     └── art-system_02_0005.png

Here’s what it looks like:

manifest_read("series-fake", origin = bucket_local_path())
#> # A tibble: 8 × 12
#>   series_name series_date path          folder file_name file_format system_name
#>   <chr>       <date>      <chr>         <chr>  <chr>     <chr>       <chr>      
#> 1 series-fake 2023-07-30  image/art-sy… image  art-syst… png         art-system 
#> 2 series-fake 2023-07-30  preview/art-… previ… art-syst… png         art-system 
#> 3 series-fake 2023-07-30  image/art-sy… image  art-syst… png         art-system 
#> 4 series-fake 2023-07-30  preview/art-… previ… art-syst… png         art-system 
#> 5 series-fake 2023-07-30  image/art-sy… image  art-syst… png         art-system 
#> 6 series-fake 2023-07-30  preview/art-… previ… art-syst… png         art-system 
#> 7 series-fake 2023-07-30  image/art-sy… image  art-syst… png         art-system 
#> 8 series-fake 2023-07-30  preview/art-… previ… art-syst… png         art-system 
#> # ℹ 5 more variables: system_version <chr>, image_id <chr>,
#> #   image_short_title <chr>, image_long_title <chr>, manifest_version <int>

At this point we have a nicely prepared folder full of curated artwork that we can upload to the remote bucket.