Skip to content

Commit dbb7a3a

Browse files
authored
Initial commit
0 parents  commit dbb7a3a

File tree

11 files changed

+251
-0
lines changed

11 files changed

+251
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: github pages deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- 'docs/**'
9+
- 'README.md'
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 1
18+
- name: deploy
19+
uses: peaceiris/actions-gh-pages@v4
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
publish_dir: ./build/html

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
aperitiiif-cli
2+
.env
3+
.DS_Store
4+
tmp
5+
build/image
6+
build/presentation
7+
notes*

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.3.5

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ruby 3.3.5

Gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'aperitiiif', github: 'migrants-and-the-state/aperitiiif-cli', branch: 'main'
4+
gem 'og_tasks', github: 'migrants-and-the-state/og_tasks', branch: 'main'
5+
6+
group :development do
7+
gem 'aws-sdk-s3', '~> 1'
8+
gem 'dotenv'
9+
gem 'pdf-reader'
10+
end

Gemfile.lock

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
GIT
2+
remote: https://github.com/migrants-and-the-state/aperitiiif-cli.git
3+
revision: 6288820d0986f090004456546a7573dacc5fc756
4+
branch: main
5+
specs:
6+
aperitiiif (0.1.2)
7+
colorize
8+
csv
9+
iiif-presentation (= 1.1)
10+
liquid
11+
mimemagic
12+
ostruct
13+
parallel
14+
ruby-progressbar
15+
ruby-vips
16+
safe_yaml
17+
thor
18+
19+
GIT
20+
remote: https://github.com/migrants-and-the-state/og_tasks.git
21+
revision: 6c404a92eb070ff5cae56be9cbac387e1de077fa
22+
branch: main
23+
specs:
24+
og_tasks (0.1.0)
25+
26+
GEM
27+
remote: https://rubygems.org/
28+
specs:
29+
Ascii85 (1.1.1)
30+
activesupport (7.2.1)
31+
base64
32+
bigdecimal
33+
concurrent-ruby (~> 1.0, >= 1.3.1)
34+
connection_pool (>= 2.2.5)
35+
drb
36+
i18n (>= 1.6, < 2)
37+
logger (>= 1.4.2)
38+
minitest (>= 5.1)
39+
securerandom (>= 0.3)
40+
tzinfo (~> 2.0, >= 2.0.5)
41+
afm (0.2.2)
42+
aws-eventstream (1.3.0)
43+
aws-partitions (1.988.0)
44+
aws-sdk-core (3.209.1)
45+
aws-eventstream (~> 1, >= 1.3.0)
46+
aws-partitions (~> 1, >= 1.651.0)
47+
aws-sigv4 (~> 1.9)
48+
jmespath (~> 1, >= 1.6.1)
49+
aws-sdk-kms (1.94.0)
50+
aws-sdk-core (~> 3, >= 3.207.0)
51+
aws-sigv4 (~> 1.5)
52+
aws-sdk-s3 (1.167.0)
53+
aws-sdk-core (~> 3, >= 3.207.0)
54+
aws-sdk-kms (~> 1)
55+
aws-sigv4 (~> 1.5)
56+
aws-sigv4 (1.10.0)
57+
aws-eventstream (~> 1, >= 1.0.2)
58+
base64 (0.2.0)
59+
bigdecimal (3.1.8)
60+
colorize (1.1.0)
61+
concurrent-ruby (1.3.4)
62+
connection_pool (2.4.1)
63+
csv (3.3.0)
64+
dotenv (3.1.4)
65+
drb (2.2.1)
66+
faraday (2.12.0)
67+
faraday-net_http (>= 2.0, < 3.4)
68+
json
69+
logger
70+
faraday-net_http (3.3.0)
71+
net-http
72+
ffi (1.17.0-aarch64-linux-gnu)
73+
ffi (1.17.0-aarch64-linux-musl)
74+
ffi (1.17.0-arm-linux-gnu)
75+
ffi (1.17.0-arm-linux-musl)
76+
ffi (1.17.0-arm64-darwin)
77+
ffi (1.17.0-x86-linux-gnu)
78+
ffi (1.17.0-x86-linux-musl)
79+
ffi (1.17.0-x86_64-darwin)
80+
ffi (1.17.0-x86_64-linux-gnu)
81+
ffi (1.17.0-x86_64-linux-musl)
82+
hashery (2.1.2)
83+
i18n (1.14.6)
84+
concurrent-ruby (~> 1.0)
85+
iiif-presentation (1.1.0)
86+
activesupport (>= 3.2.18)
87+
faraday (>= 0.9)
88+
json
89+
jmespath (1.6.2)
90+
json (2.7.2)
91+
liquid (5.5.1)
92+
logger (1.6.1)
93+
mimemagic (0.4.3)
94+
nokogiri (~> 1)
95+
rake
96+
minitest (5.25.1)
97+
net-http (0.4.1)
98+
uri
99+
nokogiri (1.16.7-aarch64-linux)
100+
racc (~> 1.4)
101+
nokogiri (1.16.7-arm-linux)
102+
racc (~> 1.4)
103+
nokogiri (1.16.7-arm64-darwin)
104+
racc (~> 1.4)
105+
nokogiri (1.16.7-x86-linux)
106+
racc (~> 1.4)
107+
nokogiri (1.16.7-x86_64-darwin)
108+
racc (~> 1.4)
109+
nokogiri (1.16.7-x86_64-linux)
110+
racc (~> 1.4)
111+
ostruct (0.6.0)
112+
parallel (1.26.3)
113+
pdf-reader (2.12.0)
114+
Ascii85 (~> 1.0)
115+
afm (~> 0.2.1)
116+
hashery (~> 2.0)
117+
ruby-rc4
118+
ttfunk
119+
racc (1.8.1)
120+
rake (13.2.1)
121+
ruby-progressbar (1.13.0)
122+
ruby-rc4 (0.1.5)
123+
ruby-vips (2.2.2)
124+
ffi (~> 1.12)
125+
logger
126+
safe_yaml (1.0.5)
127+
securerandom (0.3.1)
128+
thor (1.3.2)
129+
ttfunk (1.8.0)
130+
bigdecimal (~> 3.1)
131+
tzinfo (2.0.6)
132+
concurrent-ruby (~> 1.0)
133+
uri (0.13.1)
134+
135+
PLATFORMS
136+
aarch64-linux
137+
aarch64-linux-gnu
138+
aarch64-linux-musl
139+
arm-linux
140+
arm-linux-gnu
141+
arm-linux-musl
142+
arm64-darwin
143+
x86-linux
144+
x86-linux-gnu
145+
x86-linux-musl
146+
x86_64-darwin
147+
x86_64-linux
148+
x86_64-linux-gnu
149+
x86_64-linux-musl
150+
151+
DEPENDENCIES
152+
aperitiiif!
153+
aws-sdk-s3 (~> 1)
154+
dotenv
155+
og_tasks!
156+
pdf-reader
157+
158+
BUNDLED WITH
159+
2.5.16

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# og-template
2+
3+
template repository for aperitiiif batches of a files for migrants and the state neh grant project 🥂
4+
5+
## description
6+
7+
this is a modified aperitiiif batch repo. because of the size, images are not stored cannonically in the repo and processed by the github `publish-batch` action.
8+
9+
instead, cannonical pdfs and images are stored in an NYU Research Workspace (RW) volume. the rake tasks in `lib` process the files from the volume mounted locally and sync the generated image and json resources for the IIIF APIs directly to AWS S3 using credentials stored (and gitignored) in `.env`.
10+
11+
the github action is used to deploy the results to github pages only.
12+
13+
## owner(s)
14+
- [@mnyrop](https://github.com/mnyrop)
15+
16+
## set up
17+
18+
### prerequisites
19+
- git
20+
- asdf
21+
22+
### steps
23+
1. connect to m/s [research workspace mount](https://github.com/Migrants-and-The-State/playbook/blob/main/docs/research-workspace.md)
24+
2. clone repo and `cd` into it
25+
3. install ruby version and gems
26+
``` sh
27+
asdf install ruby
28+
bundle install
29+
```
30+
4. check for available tasks
31+
``` sh
32+
bundle exec rake --tasks
33+
```

Rakefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
require 'og_tasks'
2+
3+
spec = Gem::Specification.find_by_name 'og_tasks'
4+
Dir.glob("#{spec.gem_dir}/lib/**/*.rake").each { |r| load r }

build/.gitkeep

Whitespace-only changes.

config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# batch config
2+
3+
label: '' # TO DO
4+
description: 'NARA A-Files for Migrants and the State Project'
5+
attribution: ''
6+
source_dir: '' # TO DO
7+
8+
presentation_api_url: 'https://mats-aperitiiif-presenation-api-store-v1.s3.us-east-1.amazonaws.com'
9+
image_api_url: 'https://dctn4zjpwgdwdiiy5odjv7o2se0bqgjb.lambda-url.us-east-1.on.aws/iiif/3'
10+
11+
records:
12+
file: 'src/records.csv'
13+
14+

0 commit comments

Comments
 (0)