Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
295 commits
Select commit Hold shift + click to select a range
a1bfea2
Update abstract for Thomais
wlpotter May 6, 2026
2cefdcc
Fix typo
wlpotter May 6, 2026
663b180
Fix typo in person name
wlpotter May 14, 2026
ea9f734
Fix https that should be http for editor URIs
wlpotter May 14, 2026
9f1d126
Ingest Louis updates manually
wlpotter May 14, 2026
a596fa0
Create new place record from Louis data
wlpotter May 14, 2026
ce9bc0f
Fix typo in xml:id for place names
wlpotter May 14, 2026
d3f8608
Add cross-ref between Korea (region) and Korea (state)
wlpotter May 14, 2026
4cc5d11
Deprecate duplicate place 4380 and merge into 2538
wlpotter May 14, 2026
7a1794f
Add deprecated record to redirects file
wlpotter May 14, 2026
e48bcdc
Clean up GEDSH-derived abstracts
wlpotter May 14, 2026
a764a28
Update citedRange units
wlpotter May 21, 2026
93ebe39
Remove respStmt from seriesStmt
wlpotter May 21, 2026
c9cbf7f
Delete general editors from titleStmt
wlpotter May 21, 2026
7fa2cb1
Remove empty lines
wlpotter May 21, 2026
97e19d1
Split seriesStmt for NHSL and Guide to the Bible
wlpotter May 21, 2026
65c7671
Replace bibl/lang element with a bibl/textLang element
wlpotter May 21, 2026
f8a6f56
Delete bibl/pubPlace and publisher as extraneous
wlpotter May 21, 2026
b910123
Fix dct namespace to dcterms
wlpotter May 21, 2026
e366988
Use `relation/@ref` rather than `relation/@name`
wlpotter May 21, 2026
0e77faf
Remove the relation connecting digital to print catalogue
wlpotter May 21, 2026
239b08d
Delete empty listRelation elements
wlpotter May 21, 2026
32675f2
Convert lawd:hasCitation relations to `@source` attributes
wlpotter May 21, 2026
8191688
Remove empty listRelation elements
wlpotter May 21, 2026
d51da58
Reorder work bibl children, create listBibls and noteGrps
wlpotter May 22, 2026
bbb8b79
Associate files with new schema and update title of NHSL
dlschwartz May 22, 2026
96abb18
Add @resp on <note> where there was no @resp or @source
dlschwartz May 22, 2026
e9b1f9c
remove @type attribute from note inside listBibl
dlschwartz May 22, 2026
ad8eefc
index 12 places json
emgeier May 25, 2026
b9c811a
Persons json to opensearch
emgeier May 25, 2026
e8d61cb
works to json
emgeier May 25, 2026
e7781e7
Update S3 upload path in cbss_batch_load.yml
emgeier May 25, 2026
4f721d6
Update 315.xml
davidamichelson May 26, 2026
4b6b200
Removed syriaca:sometimesCirculatesWith
davidamichelson May 26, 2026
45a4923
comment out a lawd:embodies
dlschwartz May 26, 2026
eba85e0
Changed skos:broadMatch to skos:broader
davidamichelson May 26, 2026
b556662
delete relations with ref="lawd:embodies", plus resulting empty listR…
dlschwartz May 26, 2026
d7c2a8f
fix ref attribute
dlschwartz May 26, 2026
6291257
comment out the extent element
dlschwartz May 26, 2026
e028771
Add seriesStmt for Scientific and Philosophical Lit
dlschwartz May 27, 2026
6ada89b
change relation "syriaca:commemorated" to "syriaca:commemorates"
dlschwartz May 27, 2026
dd2996b
Fix #1302
wlpotter May 27, 2026
638fc86
Convert cross-references to works from bibls to title elements
wlpotter May 27, 2026
4b711c9
Fix a duplicated bibl ID
wlpotter May 27, 2026
34ab8f2
Normalize BHSE seriesStmts
wlpotter May 27, 2026
d54e4ef
Delete empty lines
wlpotter May 27, 2026
c4a5da7
Add n attribute for BHSE volume number
wlpotter May 27, 2026
258670e
Add missing work URI to record
wlpotter May 27, 2026
83515ed
Restructure BHSE records to follow new NHSL data model
wlpotter May 27, 2026
50849af
Replace lang element with textLang in BHSE bibls
wlpotter May 27, 2026
b248e03
Add corresp attributes to abstracts for series
wlpotter May 27, 2026
31a1fa1
Clean up excerpt note edge case
wlpotter May 27, 2026
94d810d
And another edge case #1299
wlpotter May 27, 2026
d0ff06b
Add quote for excerpt notes, source quote instead
wlpotter May 27, 2026
9cf7a0a
Update dcterms:source to use URIs rather than bibl IDs
wlpotter May 27, 2026
7f3eba5
Remove non a-level titles from the titleStmt (should be in seriesStmt…
wlpotter May 27, 2026
dee46f0
move URI from ptr to title @ref attribute
dlschwartz May 28, 2026
7664f35
remove @ref attribute on editor
dlschwartz May 28, 2026
1a6670f
remove @ref attribute from editor
dlschwartz May 28, 2026
3be69fd
add xml:lang to desc
dlschwartz May 28, 2026
300ae1f
Delete 221
dlschwartz May 28, 2026
98773a7
remove unnecessary note
dlschwartz May 28, 2026
906b932
Fix bibls that should be titles
wlpotter May 28, 2026
ae72451
change noteGrp type to "contents"
dlschwartz May 28, 2026
41bd212
Redoing bibls with msIdentifiers #1295
wlpotter May 28, 2026
7f04ca3
change listBibl "versions" to "ancientVersions"
dlschwartz May 28, 2026
33395c7
change listBibl "translations" to "modernTranslations"
dlschwartz May 28, 2026
4a95607
Remove the last bibl/msIdentifier #1295
wlpotter May 28, 2026
57287c7
change syriaca-computed to srophe:computed
dlschwartz May 28, 2026
109b58b
fix ana on body/bibl and type/subtype on idno
dlschwartz May 28, 2026
2dc6d06
fix type value on idno
dlschwartz May 28, 2026
016c950
add some xml:lang to title
dlschwartz May 28, 2026
c327bca
https://github.com/srophe/syriaca-data/issues/1293
davidamichelson May 28, 2026
24546e4
Done with first round of title to label
davidamichelson May 28, 2026
84a22c2
fix attribute on idno
dlschwartz May 29, 2026
72d4a4a
change "proglogue" to "prolog" and "secondary-literature" to "seconda…
dlschwartz May 29, 2026
5e2b5f8
Reorder bibl elements in listBibl #1295
wlpotter Jun 2, 2026
10337a7
Clean up text nodes in listBibl/bibl #1312
wlpotter Jun 2, 2026
2a56356
Move licence note under listBibl/bibl
wlpotter Jun 2, 2026
ba8f573
Delete top-level licence note
wlpotter Jun 2, 2026
988b44f
Add licence note to each listBibl/bibl #1313
wlpotter Jun 2, 2026
f257271
Delete top-level licence note in persons and places #1313
wlpotter Jun 2, 2026
34523ba
Delete empty titles
wlpotter Jun 2, 2026
3ee21a9
Add xml:lang attributes to titles in listBibl/bibl #1318
wlpotter Jun 2, 2026
16a202c
add standalone schematron schema association
dlschwartz Jun 2, 2026
6aa49ab
fix title in note
dlschwartz Jun 3, 2026
39723d8
add missing @unit on citedRange
dlschwartz Jun 3, 2026
9418c70
change "Shelfmark" to "shelfmark"
dlschwartz Jun 3, 2026
7ab27f6
change "Accession-number" to "accession-number"
dlschwartz Jun 3, 2026
367fdee
change "folio" to "fol" and "column" to "col"
dlschwartz Jun 3, 2026
c6e1fae
Delete attribute on second Syriac headword
wlpotter Jun 4, 2026
5de7a4b
Update all records' titles to match en and syr headwords
wlpotter Jun 4, 2026
606a304
Clean up a duplicate editor element (related to #1317 )
wlpotter Jun 4, 2026
487358f
Change citedRange to biblScope for ms bibls #1311
wlpotter Jun 4, 2026
3cca2b8
Fix #1322
wlpotter Jun 4, 2026
46c87e0
Fix a few incorrect source attributes
wlpotter Jun 4, 2026
fe6abc7
Replace ibid titles with correct title #1308
wlpotter Jun 4, 2026
650cffa
Normalize author children to use person record title
wlpotter Jun 4, 2026
bb2dae7
Final fixes for #1311
wlpotter Jun 4, 2026
5e0a5ba
Fixes for #1326
wlpotter Jun 4, 2026
024ca12
update "folio" to "fol"
dlschwartz Jun 4, 2026
9bc01ba
Replace title with label in ms bibls
wlpotter Jun 4, 2026
21df125
update xml:lang
dlschwartz Jun 4, 2026
d31dc34
removed unnecessary citedRange
dlschwartz Jun 4, 2026
ac76175
delete author @role="anonymous"
dlschwartz Jun 4, 2026
625e3e8
change documentation url at editor/@role to "translator"
dlschwartz Jun 4, 2026
051d80d
fix type and subtype on idno
dlschwartz Jun 4, 2026
627fe3a
fix lang typo
dlschwartz Jun 4, 2026
952b8c5
fix HMML idno @type/@subtype
dlschwartz Jun 4, 2026
db1fa71
update @type on note and noteGrp
dlschwartz Jun 5, 2026
202dfd5
add @ana="#syriaca-biblical" to bible records
dlschwartz Jun 5, 2026
b2d15ad
add @ana="#syriaca-scientific" to science records without @ana
dlschwartz Jun 5, 2026
3bcca3a
add @ana to bible records missed earlier
dlschwartz Jun 5, 2026
f25649c
fix ana atts in scientific/philosophical works
dlschwartz Jun 5, 2026
c0e9ef1
Fix errors in generation of record titles #1316
wlpotter Jun 9, 2026
cd87bd4
Update syriaca:part-of-tradition to skos:broader
wlpotter Jun 9, 2026
3e9db19
Remove extraneous bibls #1303
wlpotter Jun 9, 2026
bfa8839
Fix #1334
wlpotter Jun 9, 2026
cd934ee
Add source for French notes from BHSE #1332
wlpotter Jun 9, 2026
173a9f7
Removing bib905-11 as empty
davidamichelson Jun 9, 2026
8633638
Move corresp attributes to be listRelation/relation #1335
wlpotter Jun 9, 2026
0934555
Merging nhsl sub-directory into single works directory
wlpotter Jun 9, 2026
342f783
Update bibl types to follow final list #1310
wlpotter Jun 9, 2026
bcd681b
Fix #700
wlpotter Jun 9, 2026
afca6b3
Remove empty lines
wlpotter Jun 9, 2026
5266675
Changes to update all but three authors in Issue #1321
davidamichelson Jun 9, 2026
3e5b41b
Merge pull request #1338 from srophe/Testing-Issue-1321
davidamichelson Jun 9, 2026
d9ca71f
Issue 1321
davidamichelson Jun 9, 2026
b1ff170
Updates related to https://github.com/srophe/syriaca-data/issues/1339
davidamichelson Jun 9, 2026
cefdead
More on https://github.com/srophe/syriaca-data/issues/1339
davidamichelson Jun 9, 2026
5e52efa
Fix incorrect bibl reference
wlpotter Jun 11, 2026
a2a7c71
Fix #1340
wlpotter Jun 11, 2026
96672b4
Fix reference to ms source for edition #1331
wlpotter Jun 11, 2026
2daf3db
Fix passives to now deleted bibls (Unidentified witnesses) #1331
wlpotter Jun 11, 2026
cb39bb5
Remove additional person URI from deprecated person
wlpotter Jun 11, 2026
124d32f
Fix missing dcterms:source for CAL #1331
wlpotter Jun 11, 2026
d8ee7ab
Fix DSC bibls with dcterms:source error #1331
wlpotter Jun 11, 2026
900619b
Fix #1342
wlpotter Jun 11, 2026
5c7ccbf
Remove msItem ID frags from ms URIs #1341
wlpotter Jun 11, 2026
00b8386
Remove isPartOf relations that pointed to mss #1341
wlpotter Jun 11, 2026
bfe1879
Adding whitespace before idno inside label
davidamichelson Jun 11, 2026
f95870c
minor data edits
dlschwartz Jun 13, 2026
1a1edfa
remove xml:lang="en" from editor element
dlschwartz Jun 13, 2026
7bc0a9b
minor edits
dlschwartz Jun 13, 2026
f441b9e
fix xml:lang value
dlschwartz Jun 13, 2026
4d69ab1
Fix #1343
wlpotter Jun 16, 2026
943b918
Fix #1344
wlpotter Jun 16, 2026
d46eebd
#1339 Update roles to 'attributed'
wlpotter Jun 16, 2026
a0cbc5b
fix duplicate xmi:id values
dlschwartz Jun 16, 2026
fba7d32
fix duplicate xml:id value
dlschwartz Jun 16, 2026
7a4d3cd
remove citedRange note containing only ?
dlschwartz Jun 16, 2026
ae73a85
remove persName from title
dlschwartz Jun 16, 2026
73f3323
Remove persName from title #1351
wlpotter Jun 16, 2026
3df26b4
Replace "und" titles with the CBSS version and update lang codes
wlpotter Jun 16, 2026
69329c6
Update idno types #1348
wlpotter Jun 16, 2026
e7627b8
Update zotero indos to CBSS URIs #1348
wlpotter Jun 16, 2026
093092f
remove name parts from author and editor
dlschwartz Jun 16, 2026
4fc7289
Move notes out of citedRange #1352
wlpotter Jun 16, 2026
9ce6ddd
Merge branch 'nhsl-model-updates-2026' of https://github.com/srophe/s…
wlpotter Jun 16, 2026
1380bac
two minor data edits
dlschwartz Jun 16, 2026
6249d60
Fix issues in author and editor ref attrs
wlpotter Jun 16, 2026
bdcb088
Merge branch 'nhsl-model-updates-2026' of https://github.com/srophe/s…
dlschwartz Jun 16, 2026
074bc10
Update author and editor headwords from SBD #1317
wlpotter Jun 16, 2026
541a31b
Commenting out author with URI but no record
wlpotter Jun 16, 2026
99f0461
Remove "#syriaca-anglicized" #1349
wlpotter Jun 16, 2026
98b963e
Merge branch 'nhsl-model-updates-2026' of https://github.com/srophe/s…
dlschwartz Jun 16, 2026
a9f49f8
Fix sources with "#" #1331
wlpotter Jun 16, 2026
9f9d679
Merge branch 'nhsl-model-updates-2026' of https://github.com/srophe/s…
wlpotter Jun 16, 2026
f8e902f
Fix remaining missing source attrs #1331
wlpotter Jun 16, 2026
350d83c
add xml:lang to note
dlschwartz Jun 16, 2026
7c00037
fix note
dlschwartz Jun 16, 2026
e5e7048
remove unnecessary xml:lang attributes from editor
dlschwartz Jun 16, 2026
13d012c
Fix by hand mss with multiple labels lacking idnos in a single bibl
wlpotter Jun 16, 2026
e3cca48
Merge branch 'nhsl-model-updates-2026' of https://github.com/srophe/s…
wlpotter Jun 16, 2026
257a364
Remove locus from work title #1359
wlpotter Jun 18, 2026
9da6f51
Fixes for #1358
wlpotter Jun 18, 2026
e6c783d
Ingest cleaned ms labels and idnos #1329 and #1293
wlpotter Jun 18, 2026
419a89c
Auto-generate descs for relation elements #1327
wlpotter Jun 18, 2026
7b14cce
remove unnecessary xml:lang tags
dlschwartz Jun 23, 2026
e19841e
clean up indents
dlschwartz Jun 23, 2026
af8a43b
Fixed #1356 (add sources to notes)
wlpotter Jun 23, 2026
b9504c2
Add type attributes to idno
dlschwartz Jun 23, 2026
aa7ad80
Fixed idno without type
davidamichelson Jun 23, 2026
6ef3eb5
Changed source="bib to source="#bib
davidamichelson Jun 23, 2026
2db0ec4
Changed catalog number to shelfmark
davidamichelson Jun 23, 2026
be59b5e
Update 10510.xml
davidamichelson Jun 23, 2026
9d85865
Added unit of p to cited range
davidamichelson Jun 23, 2026
19ea02d
added .col
davidamichelson Jun 23, 2026
a18e64d
added fol
davidamichelson Jun 23, 2026
f32af00
deleted series number
davidamichelson Jun 23, 2026
ca129cc
Added ptr to CBSS
davidamichelson Jun 23, 2026
256917c
remove transliterated titles
dlschwartz Jun 23, 2026
8046d18
Merge branch 'nhsl-model-updates-2026' of https://github.com/srophe/s…
dlschwartz Jun 23, 2026
6512d6a
removed transliterated title
dlschwartz Jun 23, 2026
9c8a8e3
Changed to MSS using label
davidamichelson Jun 23, 2026
7b7ebeb
Merge branch 'nhsl-model-updates-2026' of https://github.com/srophe/s…
davidamichelson Jun 23, 2026
0fba749
fixed unit of col
davidamichelson Jun 23, 2026
d3fd1bd
Remove choice from title #1355
wlpotter Jun 23, 2026
b67d59f
deleted @prev
davidamichelson Jun 23, 2026
0d44c67
add @resp on title where missing
dlschwartz Jun 23, 2026
4a836ad
Merge branch 'nhsl-model-updates-2026' of https://github.com/srophe/s…
dlschwartz Jun 23, 2026
901a090
change redactor to scribe
dlschwartz Jun 23, 2026
2f08cea
Added URI http://syriaca.org/cbss/A7GJZHJ9
davidamichelson Jun 23, 2026
2e962d8
Split relations by passive, re-generate descs #1327
wlpotter Jun 23, 2026
59d0814
Delete planned change elements #1365
wlpotter Jun 23, 2026
06f3d5f
Update data for #1367
wlpotter Jun 23, 2026
5c5794d
Revert "Split relations by passive, re-generate descs #1327"
wlpotter Jun 24, 2026
891afcd
Re-do splitting relations by passive, and regen descs #1327
wlpotter Jun 24, 2026
30b1bc1
Delete xml:ids in relation elements (related to #1327 )
wlpotter Jun 24, 2026
7a0b6d1
Add missing text lang for Garshuni version
wlpotter Jun 24, 2026
a42c38c
Update listBibl descriptions #1372
wlpotter Jun 24, 2026
a391fad
Remove unknown author, #1353
wlpotter Jun 24, 2026
18b0e3e
Added change log for data model updates, bumped version to 2.0
wlpotter Jun 24, 2026
2f0a93f
Change desc/title to desc/ref for CBSS in #1372
wlpotter Jun 24, 2026
b1f39d4
Related to https://github.com/srophe/syriaca-data/issues/1377
davidamichelson Jun 24, 2026
ebf27b4
Merge pull request #1371 from srophe/nhsl-model-updates-2026
wsalesky Jun 25, 2026
d71978d
Updates to NHSL page view
wsalesky Jun 26, 2026
a17c9fc
Updates to NHSL display
wsalesky Jun 26, 2026
f818b80
Add vscode settings to gitignore
wlpotter Jun 29, 2026
1833807
run all works through new xslt to html conversion
emgeier Jun 29, 2026
1a561a3
Update citations. https://github.com/srophe/Gaddel/issues/304
wsalesky Jun 29, 2026
0855b8f
Update batch_loading.yml
emgeier Jun 30, 2026
46162c4
Updates for citations display
wsalesky Jun 30, 2026
741475b
Merge pull request #1379 from srophe/display
wsalesky Jun 30, 2026
05bafef
Trigger HTML update
wsalesky Jun 30, 2026
97fdd4b
Trigger display update
wsalesky Jun 30, 2026
6477dab
Fix whitespace issues
wlpotter Jun 30, 2026
1f49a47
Move source to child note
wlpotter Jun 30, 2026
15cfc61
Delete xml:lang from bibl
wlpotter Jun 30, 2026
14a9222
Delete xml:lang from dates
wlpotter Jun 30, 2026
acc37e2
Remove extraneous editor elements from listBibl/bibl
wlpotter Jun 30, 2026
5796d89
Fix author that should be editor
wlpotter Jun 30, 2026
8acfd07
Trigger display update
wsalesky Jul 1, 2026
c0ed888
Trigger display update
wsalesky Jul 1, 2026
43c9e1f
Update 1000.xml
wsalesky Jul 1, 2026
2cbb300
Add resp to unsourced author, edtior and date
wlpotter Jul 1, 2026
dfd9fd0
Add xml:lang to work editor elements
wlpotter Jul 1, 2026
2fd9e02
Merge pull request #1381 from srophe/2026-tei-workshop-base
wlpotter Jul 1, 2026
a7d199c
Added a name
davidamichelson Jul 1, 2026
7caf52d
Revert "Added a name"
davidamichelson Jul 1, 2026
4caa3f8
Merge pull request #1382 from srophe/nhsl-model-updates-2026
wlpotter Jul 1, 2026
16413ec
Merge pull request #1383 from srophe/gaddel_development
wlpotter Jul 1, 2026
4fba3fa
Bump display.
wsalesky Jul 1, 2026
6fae3c3
Update xslt for NHSL display
wsalesky Jul 1, 2026
386f432
Updates to trigger display update.
wsalesky Jul 1, 2026
0adbd51
Merge pull request #1385 from srophe/gaddel_development
wlpotter Jul 2, 2026
d405e5d
Added sources to Joshua
zmjsaunders Jul 2, 2026
b0c4ffa
Create 5505.xml
mjsaunders-jhu Jul 7, 2026
4c50b0c
Created 5505.xml
mjsaunders-jhu Jul 7, 2026
b062e7d
Completed 5505.xml
mjsaunders-jhu Jul 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
283 changes: 141 additions & 142 deletions .github/workflows/batch_loading.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/cbss_batch_load.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Upload JSON to S3
run: |
TIMESTAMP=$(date +%Y%m%d%H%M%S)
aws s3 cp bulk_data.json s3://srophe-syriaca-front-end/json-data/advancedsearchfields/index_12_batch_${{ matrix.batch_start }}_$TIMESTAMP.json
aws s3 cp bulk_data.json s3://srophe-syriaca-front-end/json-data/advancedsearchfields/cbss_batch_${{ matrix.batch_start }}_$TIMESTAMP.json

# - name: Transform XML to HTML (Parallel)
# run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/joe_persons_to_html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
# Step 7: Upload only the johnofephesus HTML files to S3
- name: Upload HTML to S3 (johnofephesus/)
run: |
# find data-html/johnofephesus/perss -name '*.html' -print0 | xargs -0 -P $(nproc) -I {} sh -c '
# find data-html/johnofephesus/pers -name '*.html' -print0 | xargs -0 -P $(nproc) -I {} sh -c '
# html_file="$1"
# filename=$(basename "$html_file")
# # s3_path="s3://srophe-syriaca-front-end/johnofephesus/persons/$filename"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/tei_to_html_data_updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@ jobs:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_REGION: ${{ secrets.AWS_REGION }}

- name: Invalidate CloudFront Cache
run: |
aws cloudfront create-invalidation \
--distribution-id ${{ secrets.GADDEL_CLOUDFRONT_DISTRIBUTION_ID}} \
--paths "/*"
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}

# Step 6: Upload error logs as an artifact for debugging
- name: Upload Logs to GitHub Artifacts
if: always()
Expand Down
169 changes: 169 additions & 0 deletions .github/workflows/test_xml_html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
name: Process XML to JSON and/or HTML For Full Data Set in Batches including JoE HTML and TEI

on:
push:
branches:
- 'gaddel_development' # current data branch
paths:
- '.github/workflows/test_xml_html.yml' # Trigger action only on changes to this file

permissions:
id-token: write
contents: read

jobs:
process_and_transform:
runs-on: ubuntu-latest
steps:

# Step 1: Checkout repositories
- name: Checkout repository
uses: actions/checkout@v3

- name: Checkout Gaddel repository (production code repo)
uses: actions/checkout@v3
with:
repository: srophe/Gaddel
ref: main
path: syriaca

# Step 2: Install Java and Saxon for XSLT
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

- name: Check cache for Saxon JAR
id: cache-saxon
uses: actions/cache@v3
with:
path: saxon.jar
key: saxon-10.6

- name: Download Saxon if not cached
if: steps.cache-saxon.outputs.cache-hit != 'true'
run: wget https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/10.6/Saxon-HE-10.6.jar -O saxon.jar

# Step 3: Identify XML files for processing: Decide which subset of the data you want to process
- name: Identify XML files
run: |
# Find each section of data for processing one at a time, or target files
# Example test case: echo "./data/persons/tei/2449.xml" > xml_files.txt
echo "./data/persons/tei/2449.xml" > xml_files.txt
echo "Processing $(wc -l < xml_files.txt) XML files"

# Step 7: Convert XML to HTML in Parallel For Website pages
- name: Convert XML to HTML in Parallel (with syriacadata path)
run: |
mkdir -p logs

cat xml_files.txt | xargs -P $(nproc) -I {} sh -c '
file="$1"
filename=$(basename "${file%.xml}")

# Final output path
out_dir="data-html/syriacadata/$(dirname "$filename")"
mkdir -p "$out_dir"

echo "Converting $file → $out_dir/$filename.html"
if ! java -jar saxon.jar -s:"$file" -xsl:html-stylesheet.xsl -o:"$out_dir/$filename.html" 2>> logs/errors.log; then
echo "::warning:: HTML transformation failed for $file"
echo "Error processing $file" >> logs/errors.log
fi
' sh {}

# Step 8: Upload HTML files to S3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_SROPHE_ROLE }}
aws-region: us-east-1
role-session-name: GitHub-OIDC-data
role-duration-seconds: 14400


- name: Upload HTML files to S3 in parallel(Strip before syriacadata, Map Prefixes, Strip .html)
run: |
mkdir -p logs
> logs/uploaded_files.txt
html_count=$(find ./data-html -path "*/syriacadata/*.html" | wc -l)
echo "$html_count" > logs/html_created_count.log

find ./data-html -path "*/syriacadata/*.html" -print0 | \
xargs -0 -P $(nproc) -I {} sh -c '
set +e
html_file="$1"
# Extract the part of the path after "syriacadata/"
s3_key=$(echo "$html_file" | sed -E "s|^.*?/syriacadata/||" | sed "s/\.html$//")
# Map top-level dir if needed, for joe files
top_dir=$(echo "$s3_key" | cut -d/ -f1)
case "$top_dir" in
bibl) mapped_dir="cbss" ;;
subject) mapped_dir="taxonomy" ;;
*) mapped_dir="$top_dir" ;;
esac

rest_of_path=$(echo "$s3_key" | cut -d/ -f2-)
if [ "$rest_of_path" = "$s3_key" ]; then
new_key="$mapped_dir"
else
new_key="${mapped_dir}/${rest_of_path}"
fi

# Get the filename (last segment, like "2")
filename=$(basename "$s3_key")
echo "filename: ${filename}"
# Get the type (first segment after johnofephesus/ if present)
if echo "$s3_key" | grep -q "^johnofephesus/"; then
type=$(echo "$s3_key" | sed -E "s|^johnofephesus/([^/]+).*|\1|")
elif echo "$s3_key" | grep -q "^cbss/"; then
type="bibl"
else
type=$(echo "$s3_key" | cut -d/ -f1)
type="${type}s"
fi

# Determine path to original XML (always from canonical path)
xml_path="./data/${type}/tei/${filename}.xml"
s3_path="s3://srophe-syriaca-front-end/${new_key}"
tei_s3_path="s3://srophe-syriaca-front-end/${new_key}.xml"

echo "Uploading $html_file to $s3_path"
if aws s3 cp "$html_file" "$s3_path"; then
echo "$s3_path" >> logs/uploaded_files.txt
else
echo "::warning:: Failed to upload $html_file to $s3_path" >> logs/errors.log
fi
echo "Uploading $xml_path to $tei_s3_path"
if aws s3 cp "$xml_path" "$tei_s3_path"; then
echo "$tei_s3_path" >> logs/uploaded_files.txt
else
echo "::warning:: Failed to upload $xml_path to $tei_s3_path" >> logs/errors.log
fi
set -e
' sh {}
echo "HTML files created: $(cat logs/html_created_count.log)"
echo "HTML files uploaded: $(grep -v '\.xml$' logs/uploaded_files.txt | wc -l)"
env:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_REGION: ${{ secrets.AWS_REGION }}

- name: Invalidate CloudFront Cache
run: |
aws cloudfront create-invalidation \
--distribution-id ${{ secrets.GADDEL_CLOUDFRONT_DISTRIBUTION_ID}} \
--paths "/*"
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}


# Step 9: Upload error logs as an artifact for debugging
- name: Upload Logs to GitHub Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: error-logs
path: logs/errors.log
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
git-sync.xql
.vscode/*
Loading