Skip to content

Commit

Permalink
Merge branch 'main' into make-banner-clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
mnyrop authored Jul 7, 2023
2 parents bcb8e3f + bb12cdf commit 417a626
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 83 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on: [push, pull_request]

jobs:
test:
if: github.repository_owner == 'minicomp'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
42 changes: 10 additions & 32 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
FROM ubuntu:20.04
FROM ruby:2.7.2

MAINTAINER Andrew Woods <awoods01@gmail.com>

ARG DEBIAN_FRONTEND=noninteractive

# Install apt dependencies
RUN apt-get update
RUN apt-get install build-essential -y
RUN apt-get install software-properties-common -y
RUN apt-get install git -y
RUN apt-get install ghostscript -y
RUN apt-get install imagemagick -y
RUN apt-get update -y
RUN apt-get install -y build-essential
RUN apt-get install -y software-properties-common
RUN apt-get install -y git
RUN apt-get install -y ghostscript
RUN apt-get install -y imagemagick
RUN apt-get install -y libvips

# Add imagemagick PDF fix
RUN sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml
Expand All @@ -20,30 +19,9 @@ RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/*
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8

# Install RVM
RUN apt-add-repository -y ppa:rael-gc/rvm
RUN apt-get update
RUN apt-get install rvm -y

# Install Ruby and Gems
RUN /bin/bash -l rvm install ruby-2.6.3
RUN /bin/bash -l -c ". ~/.profile && rvm --default use ruby-2.6.3"

RUN /bin/bash -l -c ". ~/.profile && gem update --system"
RUN /bin/bash -l -c ". ~/.profile && gem install bundler -v 2.0.2"
RUN /bin/bash -l -c ". ~/.profile && gem install rake -v 12.3.3"

# Working directory
RUN mkdir /wax
COPY Gemfile* *.gemspec ./wax
WORKDIR /wax
RUN bundle

# Prepare for Wax build
COPY Gemfile* *.gemspec ./
RUN ls
RUN /bin/bash -l -c ". ~/.profile && bundle install"

# Pass through commands from start terminal
ENTRYPOINT ["/bin/bash", "-l", "-c"]

# Make port available
EXPOSE 4000
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
source 'https://rubygems.org'
gemspec

# Temporarily pin jekyll to avoid absolute_url bug in 4.2
gem 'jekyll', '4.1'

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'kramdown-parser-gfm'
96 changes: 51 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ It's comprised of: __a few Ruby gems__ for processing image data and associated
<br>

<a href="https://minicomp.github.io/wax/">
<img src="https://github.com/minicomp/wiki/raw/main/assets/wax_screen.gif?raw=true"/>
<img src="https://raw.githubusercontent.com/minicomp/wiki/main/src/assets/wax_screen.gif?raw=true"/>
</a>

<br>
Expand All @@ -33,66 +33,72 @@ It's comprised of: __a few Ruby gems__ for processing image data and associated


You'll need `git` and `ruby >= 2.4` with `bundler` installed.
These dependencies can either be installed natively on your system or within a [Docker environment](#Using-Docker). For instructions, check the Wiki's [Installation Guide](https://minicomp.github.io/wiki/wax/system-requirements/installation-guide/).
These dependencies can either be installed natively on your system or within a [Docker environment](#Using-Docker). For instructions, check the Wiki's [Setting up your system page](https://minicomp.github.io/wiki/wax/setting-up-your-system/).

Check your versions with:

```bash
$ ruby -v
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin18]
```sh
ruby -v
```

$ bundler -v
Bundler version 2.0.1
``` sh
bundler -v
```

To process images, you will also need to have ImageMagick and Ghostscript installed and functional. You can check to see if you have ImageMagick by running:

```bash
$ convert -version
Version: ImageMagick 6.9.9-20 Q16 x86_64 2017-10-15 http://www.imagemagick.org
Copyright: (c) 1999-2017 ImageMagick Studio LLC
```sh
convert -version
```

... and check Ghostscript with:
```bash
$ gs -version
GPL Ghostscript 9.21 (2017-03-16)
Copyright (C) 2017 Artifex Software, Inc. All rights reserved.
``` sh
gs -version
```

Vips will soon replace ImageMagick for Wax's image processing. If you're ahead of the curve, you can check your version with

``` sh
vips -v
```

# Getting Started

__There are a few ways to get started with Wax, depending on your needs.__ Downloading the demo is suggested for new users so you can see how a full Wax site would work. __Advanced Jekyllers__ can start from a clean Jekyll install. To start with the demo:
__There are a few ways to get started with Wax, depending on your needs.__ Copyin the demo template is suggested for new users so you can see how a full Wax site would work. __Advanced Jekyllers__ can start from a clean Jekyll install. To start with the demo:

1. Log into your [GitHub account](https://github.com/). (Or sign up if you don't have one!)

2. Head to the [Wax demo page](https://github.com/) and click **"Use this Template"** button. It will prompt you to create a copy of the repository in your own account. You should name it after the collection or exhibition you'll make, since this name will inform your free URL for the project with GitHub. For this example, our repository is called **"my-wax-site"**.

1. Change directory into where you'd like your site, e.g., your Desktop:
```sh
cd ~/Desktop
```
2. Download the zip file from the [wax github repository](https://github.com/minicomp/wax/). The option to download the zip file should be on the button labeled "Code." Your browser will save the file where it normally saves downloads.
3. On your own, new Wax repository page, click the Green **"Code"** button and copy the URL it provides to your clipboard, e.g,
```sh
git@github.com:mnyrop/my-wax-site.git
```

3. Move the zip file to the location you will use. In our example, to the Desktop.
4. Open your Terminal/Shell application and change directory into where you'd like to work on your project, e.g., your Desktop:
```sh
cd ~/Desktop
```
4. Unzip the file. This can be done through your operating system graphic user interface, or in the terminal:
```sh
unzip wax-master.zip
```
You can delete the zip file once you're done.
5. Run the `git clone` command plus the link you copied on your clipboard in one line, e.g.,
```sh
git clone git@github.com:mnyrop/my-wax-site.git
```
5. Rename the directory and go inside the project folder:
```sh
mv wax-master my-project
cd wax-master
```
6. When the clone is complete, change directory into your newly cloned project folder, in our case:
```sh
cd my-wax-site
```
6. Install the gems (not required if using Docker):
```sh
bundle install
```
7. Install the project-specific Ruby dependencies by running the command
```sh
bundle install
```
7. Run the demo site:
```sh
bundle exec jekyll serve
```
8. Run the demo site:
```sh
bundle exec jekyll serve
```
After the last step, the terminal will provide you with a localhost URL for you to see your local copy of the site on your browser. This is the template site you will make changes to in order to make your own exhibition. For more, check out the [Minicomp/Wax Wiki](https://minicomp.github.io/wiki/wax/).
Expand All @@ -101,21 +107,21 @@ After the last step, the terminal will provide you with a localhost URL for you
To use Wax in a container, make sure you are familiar with Docker and have [Docker installed](https://docs.docker.com/get-docker/).
Run the "Getting Started" steps 1-5 above to copy and `cd` into the repo.
Run the "Getting Started" steps 1-6 above to copy and `cd` into the repo.
Next, build the `wax_image` base image:
Next, build the `minicomp/wax` base image:
```
$ docker build -t ubuntu/wax .
docker build -t minicomp/wax .
```
You will run all of the Wax tasks and commands within an interactive bash container, which you can create and access by running:
```
$ docker run -it --rm -v "$PWD":/wax --name wax -p 4000:4000 ubuntu/wax bash
docker run -it --rm -v "$PWD":/wax --name wax -p 4000:4000 minicomp/wax bash
```
To serve the site, you can run the following command in the guest container and view it in your host browser:
```
$ bundle exec jekyll serve --host 0.0.0.0 --incremental --force-polling
bundle exec jekyll serve --host 0.0.0.0
```
You can exit the container at any time with `$ exit`, which will automatically stop and remove the container.
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ exclude:
- vendor
- spec
- README.md
incremental: true
webrick:
headers:
'Access-Control-Allow-Origin': '*'
Expand Down
11 changes: 7 additions & 4 deletions _includes/osd_iiif_image_viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
var manifestUrl = "{{ include.manifest | absolute_url }}";
$.getJSON(manifestUrl, function(data) {
var tileSources = [];
$.each(data.sequences[0].canvases, function(k, val) {
tileSources.push(val.images[0].resource.service['@id'] + '/info.json');
$.each(data.sequences[0].canvases, function(_k, val) {
tileSources.push({
tileSource: val.images[0].resource.service['@id'] + '/info.json',
referenceStripThumbnailUrl: val.thumbnail
});
});
OpenSeadragon({
id: "osd",
preload: true,
sequenceMode: true,
prefixUrl: "{{ '/assets/openseadragon/images/' | absolute_url }}",
tileSources: tileSources,
homeFillsViewer: false,
showReferenceStrip: true
showReferenceStrip: true,
});
});
});
Expand Down
3 changes: 2 additions & 1 deletion _sass/_wax.scss
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ item pages (iiif + metadata)

.item-full-image {
max-width: $max-width;
max-height: 100%;
height: $viewer-height;
}
}
Expand Down Expand Up @@ -500,7 +501,7 @@ search box
display: table-cell;
padding: .4rem;
vertical-align: center;
}
}

// .info {
// text-decoration: none;
Expand Down
Binary file modified img/wax_workflow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pages/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ For beginners, Wax has a relatively high, but general-purpose learning curve. To
- Using file-naming conventions and best practices.
- Editing HTML, CSS, and some JavaScript.

**However, Wax is also great for teaching or learning the skills above!** For examples of digital pedagogy via the creation of Wax exhibitions, check out [this workshop](https://www.columbia.edu/content/events/introduction-minimal-computing-humanities-building-exhibit-primary-sources-using-wax), [this GitHub repository](https://github.com/stylerevolution/stylerevolution.github.io), and [this custom Wax site](https://stylerevolution.github.io/).
**However, Wax is also great for teaching or learning the skills above!** For examples of digital pedagogy via the creation of Wax exhibitions, check out [this workshop](https://studentcouncil.college.columbia.edu/events/introduction-minimal-computing-humanities-building-exhibit-primary-sources-using-wax), [this GitHub repository](https://github.com/stylerevolution/stylerevolution.github.io), and [this custom Wax site](https://stylerevolution.github.io/).

**Wax is also phenomenal for professionals who play a facilitating role**, such as Digital Scholarship Librarians or Coordinators. With some practice, Wax substantially reduces the time to production and post-production maintenance costs for you and your team. In the most common scenario, students, faculty, colleagues or any other collaborators just have to provide you with a properly formatted spreadsheet and the text for the exhibits. The extras are up to you.

Expand Down

0 comments on commit 417a626

Please sign in to comment.