Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cantaloupe updates #203

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions dhsi/day-one/cantaloupe.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,34 @@ We will modify some properties here later, but the default properties should be

In vscode go to the terminal and run:

Mac
`$ java -Dcantaloupe.config=./cantaloupe.properties -Xmx2g -jar Cantaloupe-5.0.6.jar`

Windows
`$ java -Dcantaloupe.config=.\cantaloupe.properties -Xmx2g -jar cantaloupe-5.0.6.jar`

Now navigate to [http://127.0.0.1:8182](http://127.0.0.1:8182) in your browser.

<!-- ### Running Cantaloupe in Code Spaces
### Running Cantaloupe in Code Spaces

Via github code spaces, I've configured a computer that already has Cantaloupe downloaded and installed.

So all you have to do is launch this computer in your browser here.
You can find that link here [https://github.com/jeffreycwitt/cantaloupe-container](https://github.com/jeffreycwitt/cantaloupe-container)

Click the "Launch in Code Space" button and give the Code Space time to set up.

And then run cantaloupe.

In the browser based vscode, go to the terminal and run:

In this folder, there should be a file called `cantaloupe.properties.sample`. Create a copy of this, called `cantaloupe.properties`

Then in the terminal run

`$ java -Dcantaloupe.config=./cantaloupe.properties -Xmx2g -jar Cantaloupe-5.0.6.jar`

Follow the Code Space prompts to view your working instance in browser. -->
Change the port visibility to "public" and then follow the Code Space prompts to view your working instance in browser.


## Configuring Cantaloupe

Expand All @@ -78,6 +89,8 @@ We've already created this configuration file, called `cantaloupe.properties`

Let's hook up cantaloupe to your own images.

#### On your local computer

Find or create a new directory of images somewhere on your computer and call it `myImages`.

Now you just need to get the full path to this image directory.
Expand All @@ -93,7 +106,21 @@ Now in the `FilesystemSource` section of the properties file, we want to change

As the comments note, make sure there is a trailing slash.

Restart your Cantaloupe server. Your images should now be available and responsive to the IIIF Image API parameters.
http://localhost:8182/iiif/3/<filename-of-your-image>/full/max/0/default.jpg

#### In Code Space

In Code Space, I've already created an images folder with a demo images, so you should change this to...

`FilesystemSource.BasicLookupStrategy.path_prefix = ./images/`

As the comments note, make sure there is a trailing slash.

In Code Space you should be able to see your sample image here:

<github-public-url>/iiif/3/vangough.jpg/full/max/0/default.jpg

To add your own images right click on `images` and select `upload`

### Enabling the admin dashboard

Expand Down
Loading