Skip to content

Syllabus and course readings for Introduction to Computational Literary Analysis, a course taught at UC-Berkeley in Summer 2018, 2019, and 2020, and at Columbia University in Fall 2020.

License

Notifications You must be signed in to change notification settings

JonathanReeve/course-computational-literary-analysis-readings

Repository files navigation

Computational Literary Analysis Readings

This is the website containing course readings for the course Introduction to Computational Literary Analysis, taught at UC Berkeley in summer 2022.

Please refer to the course website for more information: https://icla2022.jonreeve.com

Technical Details

Nota bene: students need not do any of this. These are just instructions for building the website from scratch.

To build this site manually, install the Nix package manager:

bash <(curl https://nixos.org/nix/install)

Optionally, enable the Nix cache if you would like to speed up local builds:

# If you do not already have cachix, install it:
nix-env -iA cachix -f https://cachix.org/api/v1/install
# Enable nix cache for rib
cachix use srid

Running

To build and run the site:

nix-shell --run 'ghcid -T ":main -wS"'

This launches a web server at http://localhost:8080 serving the statically generated content. Changing either ./src/Main.hs or the content in ./content reloads everything.

Use a custom rib and port

You might have a local checkout of rib with certain modifications. And you might want to run ghcid with the server running at a different port. Both of this can achieved using the following command:

# Assuming rib is cloned at ../rib
nix-shell --arg rib ../rib --run 'ghcid -T ":main -ws :8081"'

Building the executable

A fully built executable can be produced using nix-build:

$ nix-build 
...
$ ./result/bin/rib-sample --help
Usage: rib-sample [--rebuild-all] [-w|--watch] [(-s|--serve [HOST]:PORT) | -S] 
                  [--quiet] [--input-dir INPUTDIR] [--output-dir OUTPUTDIR]
  Generate a static site at OUTPUTDIR using input from INPUTDIR

Available options:
  --rebuild-all            Rebuild all sources
  -w,--watch               Watch for changes and regenerate
  -s,--serve [HOST]:PORT   Run a HTTP server on the generated directory
  -S                       Like `-s 127.0.0.1:8080`
  --quiet                  Log nothing
  --input-dir INPUTDIR     Directory containing the source files (default:
                           content)
  --output-dir OUTPUTDIR   Directory where files will be generated (default:
                           dest)
  -h,--help                Show this help text

About

Syllabus and course readings for Introduction to Computational Literary Analysis, a course taught at UC-Berkeley in Summer 2018, 2019, and 2020, and at Columbia University in Fall 2020.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published