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

Repository name

One of the first choices you have to make when setting up a new system is to choose a name for the repository. The arttools package doesn’t enforce any naming system, but from my personal experience I’ve learned that it’s useful to adopt a consistent [prefix]-[system name] format. All my art repositories use “series” as a prefix, which makes it a lot easier for me to find them on GitHub later! For example, if my generative art system is called “cards”, the repository name would be “series-cards”. Any time a function in the arttools package takes a series argument, I’d write series = "series-cards" or something along those lines.

There’s nothing special about using “series” as the prefix though. I chose that solely because of how I think about generative art systems: to me they’re tools for creating an “art series”, so that seems to make sense to me.

Repository folder structure

You can use repo_create() to create the skeleton for a local series repository. If my generative art system is called “fake”, my series name will be "series-fake". I might use a command like this to create a skeleton:

repo_create(series = "series-fake", license = "ccby")
#>  repository folder created at /tmp/Rtmp386k6J/temp_repos/series-fake
#>  writing
#>  writing
#>  writing .gitignore
#>  writing .here
#>  creating folder 'source'
#>  creating folder 'input'
#>  creating folder 'output'
#>  creating folder 'build'
#>  writing example file 'source/common.R'
#>  writing example file 'source/art-system_01.R'
#>  writing example file 'source/art-system_02.R'

This is the file tree it creates:

#> /tmp/Rtmp386k6J/temp_repos/series-fake
#> ├── .gitignore
#> ├── .here
#> ├──
#> ├──
#> ├── build
#> ├── input
#> ├── output
#> └── source
#>     ├── art-system_01.R
#>     ├── art-system_02.R
#>     └── common.R

Note that:

  • It writes a .gitignore file to ensure git won’t commit output files
  • It writes a .here file to ensure here::here() will always work

But also note that:

  • It doesn’t create an RStudio project: use usethis::create_project() for that
  • It doesn’t initialise a git repository: use usethis::use_git() for that
  • It doesn’t create a remote on GitHub: use usethis::use_github() for that

The other two top-level files it writes are:

  • is always created
  • is created only if license is specified

There four folders in the repository:

  • source is for source code for the generative art system
  • input is for other input files used by the system (optional)
  • build is for ancillary scripts that are not part of the system (optional)
  • output is for output files generated by the system (ignored by git)

Within the source folder there are three other files:

  • source/common.R
  • source/art-system_01.R
  • source/art-system_02.R

These files define a simple generative art system that I’ll use to discuss other aspects of generative art workflow in another article.