├── .github
└── ISSUE_TEMPLATE
│ ├── add-resource-to--where-to-find-iiif-.md
│ ├── bug_report.md
│ ├── feature_request.md
│ └── issue-template.md
├── .gitignore
├── Gemfile
├── Gemfile.lock
├── README.md
├── Rakefile
├── Vagrantfile
├── _annotation_data
└── 15fe5200-d411-11e9-a20c-88e9fe7026e8.md
├── _annotations
├── 15fe5200-d411-11e9-a20c-88e9fe7026e8.json
└── wh234bz9013-0001-list.json
├── _ansible
├── playbook.yml
└── requirements.yml
├── _config.yml
├── _config_dev.yml
├── _data
├── objects.csv
├── preload.yml
├── preloadedmanifests.yaml
└── preloadedos.yaml
├── _ranges
└── range.json
├── assets
└── images
│ └── custom
│ └── spencer-davis-7ZpvOE2psxM-unsplash.jpg
├── imageditor.md
├── index.html
├── index.md
├── listannotations.md
├── ranges.md
├── run.sh
├── search.md
├── storyboard.md
└── storyboardsingle.md
/.github/ISSUE_TEMPLATE/add-resource-to--where-to-find-iiif-.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Add resource to "Where to find IIIF"
3 | about: Add resource to "Where to find IIIF"
4 | title: ''
5 | labels: ''
6 | assignees: dnoneill
7 |
8 | ---
9 |
10 | Institution:
11 | Interface:
12 | Resource types:
13 | Notes:
14 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: dnoneill
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Additional context**
17 | Add any other context or screenshots about the feature request here.
18 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/issue-template.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Issue template
3 | about: 'Any other possible issues '
4 | title: ''
5 | labels: ''
6 | assignees: dnoneill
7 |
8 | ---
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | _site
3 | .sass-cache/
4 | ENV/
5 | _data/custom
6 | _ansible/imported_roles/
7 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | gem 'annotate-theme', :git=> "https://github.com/dnoneill/annotate-theme"
3 | gem 'wax_tasks', :git=> "https://github.com/dnoneill/wax_tasks"
4 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GIT
2 | remote: https://github.com/dnoneill/annotate-theme
3 | revision: ad2826d72a248e79c8ee6b205fde6a9a41d54f23
4 | specs:
5 | annotate-theme (0.1.0)
6 | jekyll (~> 3.8)
7 | jekyll-seo-tag (~> 2.1)
8 | rake (~> 12.0)
9 |
10 | GIT
11 | remote: https://github.com/dnoneill/wax_tasks
12 | revision: 346a2264636598e73c029b35b9ff05af682d38be
13 | specs:
14 | wax_tasks (1.0.3)
15 | progress_bar (~> 1.3)
16 | rainbow (~> 3.0)
17 | rake (~> 12.3)
18 | safe_yaml (~> 1.0)
19 | wax_iiif (>= 0.1.2, < 0.3)
20 |
21 | GEM
22 | remote: https://rubygems.org/
23 | specs:
24 | addressable (2.7.0)
25 | public_suffix (>= 2.0.2, < 5.0)
26 | colorator (1.1.0)
27 | concurrent-ruby (1.1.5)
28 | em-websocket (0.5.1)
29 | eventmachine (>= 0.12.9)
30 | http_parser.rb (~> 0.6.0)
31 | eventmachine (1.2.7)
32 | ffi (1.11.1)
33 | forwardable-extended (2.6.0)
34 | highline (2.0.2)
35 | http_parser.rb (0.6.0)
36 | i18n (0.9.5)
37 | concurrent-ruby (~> 1.0)
38 | jekyll (3.8.6)
39 | addressable (~> 2.4)
40 | colorator (~> 1.0)
41 | em-websocket (~> 0.5)
42 | i18n (~> 0.7)
43 | jekyll-sass-converter (~> 1.0)
44 | jekyll-watch (~> 2.0)
45 | kramdown (~> 1.14)
46 | liquid (~> 4.0)
47 | mercenary (~> 0.3.3)
48 | pathutil (~> 0.9)
49 | rouge (>= 1.7, < 4)
50 | safe_yaml (~> 1.0)
51 | jekyll-sass-converter (1.5.2)
52 | sass (~> 3.4)
53 | jekyll-seo-tag (2.6.1)
54 | jekyll (>= 3.3, < 5.0)
55 | jekyll-watch (2.2.1)
56 | listen (~> 3.0)
57 | kramdown (1.17.0)
58 | liquid (4.0.3)
59 | listen (3.1.5)
60 | rb-fsevent (~> 0.9, >= 0.9.4)
61 | rb-inotify (~> 0.9, >= 0.9.7)
62 | ruby_dep (~> 1.2)
63 | mercenary (0.3.6)
64 | mini_magick (4.9.5)
65 | options (2.3.2)
66 | parallel (1.17.0)
67 | pathutil (0.16.2)
68 | forwardable-extended (~> 2.6)
69 | progress_bar (1.3.0)
70 | highline (>= 1.6, < 3)
71 | options (~> 2.3.0)
72 | public_suffix (4.0.1)
73 | rainbow (3.0.0)
74 | rake (12.3.3)
75 | rb-fsevent (0.10.3)
76 | rb-inotify (0.10.0)
77 | ffi (~> 1.0)
78 | rouge (3.11.0)
79 | ruby_dep (1.5.0)
80 | safe_yaml (1.0.5)
81 | sass (3.7.4)
82 | sass-listen (~> 4.0.0)
83 | sass-listen (4.0.0)
84 | rb-fsevent (~> 0.9, >= 0.9.4)
85 | rb-inotify (~> 0.9, >= 0.9.7)
86 | wax_iiif (0.2.0)
87 | mini_magick (~> 4.9)
88 | parallel (~> 1.17)
89 | progress_bar (~> 1.3)
90 | rainbow (~> 3.0)
91 |
92 | PLATFORMS
93 | ruby
94 |
95 | DEPENDENCIES
96 | annotate-theme!
97 | wax_tasks!
98 |
99 | BUNDLED WITH
100 | 2.0.2
101 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Local IIIF Annotation server
2 |
3 | Installation instructions are found here: [https://dnoneill.github.io/annotate/help](https://dnoneill.github.io/annotate/help)
4 |
5 | ## Quickstart
6 |
7 | 1. Install Dependencies
8 | - [Vagrant](https://www.vagrantup.com/downloads.html)
9 | - [VirtualBox 6.0.x](https://www.virtualbox.org/wiki/Downloads). Note: VirtualBox 6.1.x currently does not work with Vagrant. Make sure to use 6.0.x or older.
10 | - [Git](https://git-scm.com/downloads)
11 |
12 | 2. (Optional). Fork repository and create own website. See [GitHub pages instructions](https://dnoneill.github.io/annotate/help/creating-github/) for steps. Otherwise use `https://github.com/dnoneill/annotate.git` for step 3.
13 |
14 | 3. Open Terminal(Mac/Linux)/Git Bash or Command Line(Windows). Clone this repository or clone forked repository and change directory:
15 |
16 | ```
17 | $ git clone https://github.com/[username]/annotate.git
18 | $ cd annotate
19 |
20 | ```
21 |
22 | 3. Start vagrant environment in terminal.
23 |
24 | `$ vagrant up`
25 |
26 | 4. Start Jekyll and Flask
27 | ```
28 | $ vagrant ssh
29 | [vagrant@localhost ~]$ cd /vagrant
30 | [vagrant@localhost vagrant]$ dos2unix run.sh #windows machines only
31 | [vagrant@localhost vagrant]$ ./run.sh
32 |
33 | ```
34 |
35 | Navigate to [http://localhost:5555/annotate/](http://localhost:5555/annotate/) to create annotations. **Note** Not all manifests load using Microsoft Edge. Firefox and Chrome are better alternatives.
36 |
37 |
38 | ### Requirements for Development
39 | - Ruby >=2.2
40 | - Jekyll >=3.5
41 | - Bundler >=1.12
42 | - Python
43 |
44 | ### Development
45 | - Clone this repository and navigate into it:
46 |
47 | `$ git clone https://github.com/dnoneill/annotate.git && cd annotate`
48 | - Install dependencies:
49 |
50 | `$ bundle install`
51 | - Create ENV, install Flask in ENV, start Flask and Jekyll
52 |
53 | `$ ./run.sh`
54 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | spec = Gem::Specification.find_by_name 'wax_tasks'
2 | Dir.glob("#{spec.gem_dir}/lib/tasks/*.rake").each { |r| load r }
3 |
--------------------------------------------------------------------------------
/Vagrantfile:
--------------------------------------------------------------------------------
1 | # -*- mode: ruby -*-
2 | # vi: set ft=ruby :
3 | # Verify and install required plugins
4 | if Vagrant::Util::Platform.windows?
5 | required_plugins = %s(vagrant-winnfsd vagrant-vbguest)
6 | else
7 | required_plugins = %s(vagrant-vbguest)
8 | end
9 |
10 | # TODO: Should we auto-update these?
11 | if ENV['VAGRANT_PLUGINS_UPDATED']=='true'
12 | alreadyUpdated = 'true'
13 | end
14 | if alreadyUpdated != 'true' && (ARGV[0] == "up" || ARGV[0] == "provision")
15 | system "vagrant plugin install #{required_plugins}"
16 | system "vagrant plugin update #{required_plugins}"
17 | ENV['VAGRANT_PLUGINS_UPDATED'] = 'true'
18 | # Restart vagrant after plugin updates
19 | exec "vagrant #{ARGV.join(' ')}"
20 | end
21 |
22 | # All Vagrant configuration is done below. The "2" in Vagrant.configure
23 | # configures the configuration version (we support older styles for
24 | # backwards compatibility). Please don't change it unless you know what
25 | # you're doing.
26 | Vagrant.configure("2") do |config|
27 | # The most common configuration options are documented and commented below.
28 | # For a complete reference, please see the online documentation at
29 | # https://docs.vagrantup.com.
30 |
31 | # Every Vagrant development environment requires a box. You can search for
32 | # boxes at https://vagrantcloud.com/search.
33 | config.vm.provision "ansible_local" do |ansible|
34 | ansible.playbook = "_ansible/playbook.yml"
35 | ansible.galaxy_roles_path = '_ansible/imported_roles'
36 | ansible.galaxy_role_file = "_ansible/requirements.yml"
37 | ansible.verbose = true
38 | end
39 | config.vm.box = "centos/7"
40 | config.vm.network "forwarded_port", host: 5555, guest: 5555
41 | config.vm.network "forwarded_port", host: 5000, guest: 5000
42 | config.vm.network :forwarded_port, guest: 80, host: 4567
43 | config.vm.network "private_network", type: "dhcp"
44 | config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
45 |
46 | # Disable automatic box update checking. If you disable this, then
47 | # boxes will only be checked for updates when the user runs
48 | # `vagrant box outdated`. This is not recommended.
49 | # config.vm.box_check_update = false
50 |
51 | # Create a forwarded port mapping which allows access to a specific port
52 | # within the machine from a port on the host machine. In the example below,
53 | # accessing "localhost:8080" will access port 80 on the guest machine.
54 | # NOTE: This will enable public access to the opened port
55 | # config.vm.network "forwarded_port", guest: 80, host: 8080
56 |
57 | # Create a forwarded port mapping which allows access to a specific port
58 | # within the machine from a port on the host machine and only allow access
59 | # via 127.0.0.1 to disable public access
60 | # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
61 |
62 | # Create a private network, which allows host-only access to the machine
63 | # using a specific IP.
64 | # config.vm.network "private_network", ip: "192.168.33.10"
65 |
66 | # Create a public network, which generally matched to bridged network.
67 | # Bridged networks make the machine appear as another physical device on
68 | # your network.
69 | # config.vm.network "public_network"
70 |
71 | # Share an additional folder to the guest VM. The first argument is
72 | # the path on the host to the actual folder. The second argument is
73 | # the path on the guest to mount the folder. And the optional third
74 | # argument is a set of non-required options.
75 | # config.vm.synced_folder "../data", "/vagrant_data"
76 |
77 | # Provider-specific configuration so you can fine-tune various
78 | # backing providers for Vagrant. These expose provider-specific options.
79 | # Example for VirtualBox:
80 | #
81 | # config.vm.provider "virtualbox" do |vb|
82 | # # Display the VirtualBox GUI when booting the machine
83 | # vb.gui = true
84 | #
85 | # # Customize the amount of memory on the VM:
86 | # vb.memory = "1024"
87 | # end
88 | #
89 | # View the documentation for the provider you are using for more
90 | # information on available options.
91 |
92 | # Enable provisioning with a shell script. Additional provisioners such as
93 | # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
94 | # documentation for more information about their specific syntax and use.
95 | # config.vm.provision "shell", inline: <<-SHELL
96 | # apt-get update
97 | # apt-get install -y apache2
98 | # SHELL
99 | end
100 |
--------------------------------------------------------------------------------
/_annotation_data/15fe5200-d411-11e9-a20c-88e9fe7026e8.md:
--------------------------------------------------------------------------------
1 | ---
2 | datecreated: '2019-09-10T21:22:25.978Z'
3 | datemodified: ''
4 | imagescr:
Giraffe
", "@type": "dctypes:Text", "format": "text/html"}], "@context": "http://iiif.io/api/presentation/2/context.json", "@id": "https://dnoneill.github.io/annotate/annotations/15fe5200-d411-11e9-a20c-88e9fe7026e8.json", "@type": "oa:Annotation", "oa:annotatedAt": "2019-09-10T21:22:25.978Z"} -------------------------------------------------------------------------------- /_annotations/wh234bz9013-0001-list.json: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | {"@context": "http://iiif.io/api/presentation/2/context.json", "@id": "https://dnoneill.github.io/annotate/annotations/15fe5200-d411-11e9-a20c-88e9fe7026e8.json-list.json", "@type": "sc:AnnotationList", "resources": [{"on": [{"within": {"@id": "https://purl.stanford.edu/wh234bz9013/iiif/manifest", "@type": "sc:Manifest"}, "full": "https://purl.stanford.edu/wh234bz9013/iiif/canvas/0001", "@type": "oa:SpecificResource", "selector": {"default": {"@type": "oa:FragmentSelector", "value": "xywh=3680,2045,1011,1274"}, "item": {"@type": "oa:SvgSelector", "value": ""}, "@type": "oa:Choice"}}], "motivation": ["oa:commenting"], "resource": [{"chars": "Giraffe
", "@type": "dctypes:Text", "format": "text/html"}], "@context": "http://iiif.io/api/presentation/2/context.json", "@id": "https://dnoneill.github.io/annotate/annotations/15fe5200-d411-11e9-a20c-88e9fe7026e8.json", "@type": "oa:Annotation", "oa:annotatedAt": "2019-09-10T21:22:25.978Z"}], "oa:annotatedAt": "2019-09-10T21:22:25.978Z"} -------------------------------------------------------------------------------- /_ansible/playbook.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | become: yes 3 | become_user: root 4 | roles: 5 | - role: rvm.ruby 6 | tags: ruby 7 | rvm1_rubies: ['ruby-2.5.1'] 8 | rvm1_install_flags: '--auto-dotfiles --user-install' 9 | rvm1_user: vagrant 10 | rvm1_bundler_install: True 11 | tasks: 12 | - name: upgrade all packages 13 | yum: 14 | name: '*' 15 | state: latest 16 | - name: centos release 17 | yum: 18 | name: centos-release-scl 19 | state: latest 20 | - name: git 21 | yum: 22 | name: git 23 | state: latest 24 | - name: epel-release 25 | yum: 26 | name: epel-release 27 | state: latest 28 | - name: rubygems 29 | yum: 30 | name: rubygems 31 | state: latest 32 | - name: ImageMagick 33 | yum: 34 | name: ImageMagick 35 | state: latest 36 | - name: dos2unix 37 | yum: 38 | name: dos2unix 39 | state: latest 40 | - name: pip 41 | yum: 42 | name: python-pip 43 | state: latest 44 | - name: pip install 45 | easy_install: 46 | name: pip 47 | state: latest 48 | - name: Flask 49 | pip: 50 | name: Flask 51 | state: latest 52 | - name: flask_cors 53 | pip: 54 | name: flask_cors 55 | state: latest 56 | 57 | -------------------------------------------------------------------------------- /_ansible/requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - src: rvm.ruby -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | title: Local Annotation Server 2 | description: "Local annotation server that allows for easy annotation creation." 3 | baseurl: "/annotate" 4 | 5 | markdown: kramdown 6 | permalink: pretty 7 | 8 | plugins: 9 | - jekyll-seo-tag 10 | 11 | exclude: [Rakefile, Gemfile*, vendor, ENV, imported_roles] 12 | include: [feed.xml] 13 | 14 | theme: annotate-theme 15 | remote_theme: dnoneill/annotate-theme 16 | 17 | collections: 18 | annotations: 19 | output: true 20 | permalink: /annotations/:name 21 | ranges: 22 | output: true 23 | permalink: /ranges/:name 24 | annotation_data: 25 | output: true 26 | permalink: /annotations/:name 27 | custom_images: 28 | metadata: 29 | source: 'objects.csv' # path to the metadata file, must be within '_data' 30 | images: 31 | source: 'custom' # path to the directory of source images, must be within '_data' 32 | 33 | webrick: 34 | headers: 35 | "Access-Control-Allow-Origin": "*" 36 | 37 | api_server: http://localhost:5000/ 38 | endpoint: http://localhost:5000/write_annotation/ 39 | 40 | lunr_settings: 41 | collections: [annotation_data] 42 | atozsortfield: slug 43 | displayfields: 44 | - {field: slug, headerfield: true, highlight: false} 45 | - {field: imagescr, headerimage: true, highlight: false} 46 | fields: 47 | - boost: 10 48 | jekyllfields: [content] 49 | searchfield: content 50 | - boost: 10 51 | jekyllfields: [tags] 52 | searchfield: tags 53 | facetfield: true 54 | 55 | fuzzysearchfields: [content] 56 | -------------------------------------------------------------------------------- /_config_dev.yml: -------------------------------------------------------------------------------- 1 | api_server: http://localhost:5000/ 2 | 3 | -------------------------------------------------------------------------------- /_data/objects.csv: -------------------------------------------------------------------------------- 1 | pid,attribution,original image link,label,wikipedia link,order,collection,thumbnail,full,manifest 2 | spencer-davis-7ZpvOE2psxM-unsplash,Photo by Spencer Davis on Unsplash,https://unsplash.com/photos/7ZpvOE2psxM,Cattedrale di Santa Maria del Fiore,https://en.wikipedia.org/wiki/Florence_Cathedral,1,custom_images,"/img/derivatives/iiif/images/spencer-davis-7ZpvOE2psxM-unsplash/full/250,/0/default.jpg",/img/derivatives/iiif/images/spencer-davis-7ZpvOE2psxM-unsplash/full/full/0/default.jpg,/img/derivatives/iiif/spencer-davis-7ZpvOE2psxM-unsplash/manifest.json 3 | -------------------------------------------------------------------------------- /_data/preload.yml: -------------------------------------------------------------------------------- 1 | images: [] 2 | settings: 3 | tempuser: notenabled 4 | viewer: default 5 | widgets: comment-with-purpose, tag, geotagging 6 | version: '2.0' 7 | -------------------------------------------------------------------------------- /_data/preloadedmanifests.yaml: -------------------------------------------------------------------------------- 1 | - https://d.lib.ncsu.edu/collections/catalog/mc00084-001-te0159-000-001_0001/manifest.json 2 | - https://d.lib.ncsu.edu/collections/catalog/mc00336-1911Bldg-May2017/manifest.json 3 | - https://d.lib.ncsu.edu/collections/catalog/mc00240-001-ff0093-001-001_0010/manifest.json 4 | - https://d.lib.ncsu.edu/collections/catalog/0002386/manifest.json 5 | - https://d.lib.ncsu.edu/collections/catalog/nubian-message-2002-04-18/manifest.json 6 | - https://d.lib.ncsu.edu/collections/catalog/segIns_004/manifest 7 | - https://damsssl.llgc.org.uk/iiif/2.0/4665992/manifest.json 8 | - https://purl.stanford.edu/wh234bz9013/iiif/manifest 9 | -------------------------------------------------------------------------------- /_data/preloadedos.yaml: -------------------------------------------------------------------------------- 1 | - https://repository.duke.edu/iipsrv/iipsrv.fcgi?IIIF=/srv/perkins/repo_deriv/multires_image/40/58/a6/28/4058a628-c593-463e-9736-8a821e178fee/full/full/0/default.jpg 2 | - https://libimages.princeton.edu/loris/pudl0076/map_pownall/00000001.jp2/full/full/0/default.jpg 3 | - https://dlcs.io/iiif-img/3/2/04fbbb28-d5a7-4408-b7da-800c4e65eda3/full/full/0/default.jpg 4 | - https://cdm16028.contentdm.oclc.org/digital/iiif/p16028coll4/35582/full/full/0/default.jpg 5 | - https://libimages1.princeton.edu/loris/pudl0001%2F4609321%2Fs42%2F00000004.jp2/full/full/0/default.jpg 6 | -------------------------------------------------------------------------------- /_ranges/range.json: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | {"@id": "https://dnoneill.github.io/annotate/ranges/range.json", "label": "Manuscrit reconstitu\u00e9 : Ch\u00e2teauroux, Biblioth\u00e8que municipale, ms. 5 (Grandes Chroniques de France)", "canvases": [], "viewingDirection": "left-to-right", "contentLayer": {"otherContent": [{"@id": "https://dnoneill.github.io/annotate/annotations/4490-canvas-981394-list.json", "description": "", "label": "f. 033v - 034"}, {"@id": "https://dnoneill.github.io/annotate/annotations/4490-canvas-981395-list.json", "description": "", "label": "f. 034v - 035"}]}, "@type": "sc:Range"} 5 | -------------------------------------------------------------------------------- /assets/images/custom/spencer-davis-7ZpvOE2psxM-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnoneill/annotate/e3292562604a925538107d0dbbeb0aaaac6f7eec/assets/images/custom/spencer-davis-7ZpvOE2psxM-unsplash.jpg -------------------------------------------------------------------------------- /imageditor.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Create annotations any image 4 | weight: 2 5 | --- 6 | This editor works on any JPEG/JPG, PNG, GIF or SVG images. **Make sure the file ends with the file extension or the JavaScript library will not be able to load the images. The JavaScript library does not support GIFs so any annotations done with GIF should be for own purposes.**. 7 | 8 | ### To use `embed tags` copy tag and feed into [html escape](https://www.freeformatter.com/html-escape.html). Click `escape` button and copy output into text box. 9 | 10 | {% include imageeditor.html %} 11 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | {% assign images = site.static_files | where_exp: 'item', 'item.path contains "/images/"' | sort_natural | map: 'path' %} 5 | {% assign collections = site.pages | where_exp: 'item', 'item.dir == "/collections/"' | sort_natural %} 6 | {% assign manifests = site.pages | where_exp: 'item', 'item.name contains "manifest.json"' %} 7 | {% assign customviews = site.pages | where_exp: 'item', 'item.dir contains "customviews"' | sort_natural %} 8 | {% assign imagearray = '' | split: "" %} 9 | {% for image in images %} 10 | {% unless image contains 'assets' or image contains 'derivatives'%} 11 | {% assign item = image | prepend: site.baseurl | prepend: site.url %} 12 | {% assign imagearray = imagearray | push: item %} 13 | {% endunless %} 14 | {% endfor %} 15 | {"annotations": [{% for file in site.annotations %}{ 16 | {{'filename' | jsonify}}:{{site.url | append: site.baseurl | append: file.url| append: file.ext | jsonify}},{{'order' | jsonify}}:{{file.order | jsonify}}, {{'json' | jsonify}}:{{file.content | replace: "<", "<" | replace: ">", ">"}} 17 | }{% unless forloop.last %},{% endunless %}{% endfor %}], 18 | "manifests": [{% for manifest in manifests %}{ 19 | {{'url' | jsonify}}:{{site.url | append: site.baseurl | append: manifest.url| append: manifest.ext | jsonify}}, {{'iiif' | jsonify}}: {{true | jsonify}}, {{'upload' | jsonify}}: {{true | jsonify}},{{'added' | jsonify}}: {{manifest.added | jsonify}},{%if manifest.thumbnail%}{{'thumbnail' | jsonify }}: {{manifest.thumbnail | jsonify}}, {{'title' | jsonify }}: {{manifest.title | jsonify}}{% else %}{{'json' | jsonify}}:{{manifest.content | jsonify}}{%endif%} 20 | }{% unless forloop.last %},{% endunless %}{% endfor %}], "images": {{imagearray| jsonify}}, 21 | "preloadedcontent": {{site.data.preload | jsonify}}, 22 | "customviews": [{% for customview in customviews %}{ 23 | {{'filename' | jsonify}}:{{site.url | append: site.baseurl | append: customview.url| jsonify}}, {{'editurl' | jsonify}}:{{customview.tagurl| jsonify}},{{'json' | jsonify}}:{{customview.content | replace: '', '' | replace: '', '' | replace: "<", "<" | replace: ">", ">" | jsonify}} 24 | }{% unless forloop.last %},{% endunless %}{% endfor %}], 25 | "collections": [{% for collection in collections %}{ 26 | {{'filename' | jsonify}}:{{site.url | append: site.baseurl | append: collection.url| jsonify}},{{'json' | jsonify}}:{{collection.content | replace: "<", "<" | replace: ">", ">"}} 27 | }{% unless forloop.last %},{% endunless %}{% endfor %}] 28 | } -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Create Annotations 4 | weight: 1 5 | --- 6 | 7 | Annotations can be viewed and created by toggling the button on the top left of the viewer. 8 | 9 | New objects can be loaded by hovering over and choosing " Replace Object" and putting the url to the manifest in the "Add new object from URL" input box (i.e. https://d.lib.ncsu.edu/collections/catalog/0052574/manifest.json) 10 | 11 | 12 | {% include iiif_presentation.html %} 13 | -------------------------------------------------------------------------------- /listannotations.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: annotationlist 3 | title: List of Annotations 4 | permalink: "/annotations" 5 | weight: 3 6 | --- 7 | -------------------------------------------------------------------------------- /ranges.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: rangelist 3 | title: List of Ranges 4 | permalink: "/ranges" 5 | weight: 6 6 | --- 7 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | bundle install 2 | bundle update 3 | bundle exec jekyll build -d _site 4 | wait 5 | ln -s $PWD/assets/images/custom $PWD/_data 6 | bundle exec jekyll serve --force_polling --host='0.0.0.0' --config _config.yml,_config_dev.yml --port='5555' & 7 | python -m pip install --upgrade --user pip 8 | python -m venv ENV 9 | python pyvenv ENV 10 | echo source ENV/bin/activate 11 | cd _site/assets/python 12 | python -m pip install --user -r requirements.txt 13 | export FLASK_APP=flaskserver.py 14 | python -m flask run --host=0.0.0.0 --port=5000 15 | pkill -f jekyll 16 | -------------------------------------------------------------------------------- /search.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Search Annotations 4 | weight: 8 5 | --- 6 | 14 | 15 | 16 | 17 | 18 | 19 |