Skip to content

OneZoom/tours

Repository files navigation

OneZoom Tours

Tour JSON documents that can be inserted into an instance's database.

The JSON format is described in https://github.com/OneZoom/OZtree/blob/main/controllers/tour.py

Uploading tours

You can insert a single tour or multiple tours into a OneZoom instance with the upload.py script:

./upload.py http://localhost:8000/ *.json

You can also use CURL directly:

curl -X PUT -H "Content-Type: application/json" --user admin \
    http://localhost:8000/tour/data.json/edge_species \
    -d @edge_species.json

Fetch it back again with:

curl http://localhost:8000/tour/data.json/edge_species

Or as HTML with:

curl http://localhost:8000/tour/data.html/edge_species

Adding bespoke images / audio to tours

  1. Add the source image to this repository, in a directory with the same name as your tour. Note that it's filename will be used as an alt tag (with _ replaced with " "), so a descriptive name is sensible.
  2. Next to the image, add a .md file which at least contains a link to your image and the source of the image, e.g:
[![Various frogs and toads](Various_frogs_and_toads.jpeg)](https://commons.wikimedia.org/wiki/File:Anoures.jpg)

* *source*: https://commons.wikimedia.org/wiki/File:Anoures.jpg

Commit and push to github. You can now refer to it in a tour with "frogs/Various_frogs_and_toads.jpeg", e.g.

Playing a tour

Once uploaded you can trigger a tour manually in the javascript console with:

onezoom.controller.tour_start('/tour/data.html/edge_species')

Or trigger it on load (although be warned that autoplaying will not trigger before a click):

/life?tour=/tour/data.html/superpowers

Creating a user to add tours via.

See the Creating auth users & groups section of README.markdown

Summary being:

  • Specify an admin password on web2py startup with -a pass
  • Go to /appadmin/insert/db/auth_user
  • Enter at least a first & last name, username & password

Then use the username / password with the curl command above.

Other documentation

Licensing of tours material for reuse.

  • Except in the case where individual images are explicitly labelled with licenses for reuse, permission is not currently granted to reuse tours content for any purpose. We are open to being contacted with requests for permission to reuse.

About

scripts for populating the OneZoom database with tour data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published