Skip to content

Commit

Permalink
Merge pull request #246 from Auden-Musulin-Papers/dev
Browse files Browse the repository at this point in the history
Major Relase 1.0.0
  • Loading branch information
linxOD authored Aug 1, 2024
2 parents c5a3398 + b1c2bca commit 0645dd5
Show file tree
Hide file tree
Showing 266 changed files with 406,795 additions and 9,615 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ name: Build and publish

on: workflow_dispatch

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build_pages:
name: Publish Edition as GitHub Pages Website
Expand Down Expand Up @@ -41,11 +53,16 @@ jobs:
- name: Build
run: |
ant -f ./build_app/ant/build.xml
- name: Build Typesense Index
run: |
python ./build_app/python/make_ts_index.py
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html
# Upload entire repository
path: "./html"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# - name: Build Typesense Index
# run: |
# python ./build_app/python/make_ts_index.py
330 changes: 278 additions & 52 deletions amp-app.xpr

Large diffs are not rendered by default.

24 changes: 3 additions & 21 deletions build_app/ant/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,22 @@
<property name="editions" value="${basedir}/data/editions"/>
<property name="index" value="${basedir}/data/meta/about.xml"/>
<property name="description" value="${basedir}/data/meta/description.xml"/>
<property name="auden_bio" value="${basedir}/data/meta/auden-biography.xml"/>
<property name="musulin_bio" value="${basedir}/data/meta/musulin-biography.xml"/>
<property name="amp_timeline" value="${basedir}/data/indices/amp-index-events.xml"/>
<property name="team" value="${basedir}/data/meta/team.xml"/>
<property name="imprint" value="${basedir}/data/imprint.xml"/>
<property name="editorial-decl" value="${basedir}/data/meta/editorial-declaration.xml"/>
<property name="target" value="${basedir}/html"/>
<!-- <property name="target_xml" value="${basedir}/html/xml-view"/> -->
<property name="xsl_analytics" value="${basedir}/xslt/analytics.xsl"/>
<property name="xsl_indices" value="${basedir}/xslt/indices.xsl"/>
<property name="xsl_entities" value="${basedir}/xslt/entities.xsl"/>
<property name="xsl_editions" value="${basedir}/xslt/editions.xsl"/>
<!-- <property name="xsl_editions_xml" value="${basedir}/xslt/editions-xml.xsl"/> -->
<property name="xsl_index" value="${basedir}/xslt/index.xsl"/>
<property name="xsl_toc" value="${basedir}/xslt/toc.xsl"/>
<!-- <property name="xsl_memoirs" value="${basedir}/xslt/memoirs.xsl"/> -->
<property name="xsl_photos" value="${basedir}/xslt/photos.xsl"/>
<property name="xsl_am" value="${basedir}/xslt/additional-materials.xsl"/>
<property name="xsl_search" value="${basedir}/xslt/search.xsl"/>
<property name="xsl_desc" value="${basedir}/xslt/description.xsl"/>
<property name="xsl_bio" value="${basedir}/xslt/biographies.xsl"/>
<property name="xsl_timeline" value="${basedir}/xslt/timeline.xsl"/>
<property name="xsl_team" value="${basedir}/xslt/team.xsl"/>
<property name="xsl_imprint" value="${basedir}/xslt/imprint.xsl"/>
<property name="xsl_edit" value="${basedir}/xslt/editorial-declaration.xsl"/>
Expand Down Expand Up @@ -98,11 +94,7 @@
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
<classpath location="${basedir}/saxon/saxon9he.jar"/>
</xslt>
<xslt in="${auden_bio}" out="${target}/auden-biography.html" style="${xsl_bio}">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
<classpath location="${basedir}/saxon/saxon9he.jar"/>
</xslt>
<xslt in="${musulin_bio}" out="${target}/musulin-biography.html" style="${xsl_bio}">
<xslt in="${amp_timeline}" out="${target}/timeline.html" style="${xsl_timeline}">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
<classpath location="${basedir}/saxon/saxon9he.jar"/>
</xslt>
Expand All @@ -123,16 +115,6 @@
<include name="*.JPG"/>
</fileset>
</copy>
<!-- <copy todir="${target}" flatten="true">
<fileset dir="data/editions">
<include name="**/*.xml"/>
</fileset>
</copy> -->
<copy todir="${target}" flatten="true">
<fileset dir="${basedir}/data/meta">
<include name="**/*-biography.xml"/>
</fileset>
</copy>
<copy todir="${target}" flatten="true">
<fileset dir="${basedir}/data">
<include name="imprint.xml"/>
Expand Down
2 changes: 2 additions & 0 deletions build_app/ant/copy-task.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
<include name="*0073.xml"/>
<include name="*0074.xml"/>
<include name="*0075.xml"/>
<include name="*0077.xml"/>
<include name="*0078.xml"/>
</fileset>
</move>

Expand Down
7 changes: 5 additions & 2 deletions build_app/python/make_ts_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ def get_entities(ent_type, ent_node, ent_name):
for x in tqdm(files, total=len(files)):
doc = TeiReader(xml=x, xsl='./xslt/preprocess_typesense.xsl')
try:
corresp = doc.any_xpath('.//tei:text[@type="letter"]')[0]
corresp = doc.any_xpath('.//tei:div[@type="transcription"]/tei:div[1][@type="letter" or @type="envelope"]')[0]
except IndexError:
corresp = False
try:
photo = doc.any_xpath('.//tei:text[@type="photograph"]')[0]
photo = doc.any_xpath('.//tei:div[@type="transcription"]/tei:div[1][@type="photograph"]')[0]
except IndexError:
photo = False
facs = doc.any_xpath('.//tei:body/tei:div//tei:pb')
Expand All @@ -153,6 +153,9 @@ def get_entities(ent_type, ent_node, ent_name):
facs_type = v.attrib['type']
p_group = f""".//tei:body/tei:div/tei:p[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:lg[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:div[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:div/tei:p[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:div/tei:lg[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:div/tei:ab[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:div/tei:div[preceding-sibling::tei:pb[1]/@facs='{facs_id}']"""
body = doc.any_xpath(p_group)
Expand Down
3 changes: 3 additions & 0 deletions build_app/python/make_ts_index_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ def get_comments():
facs_type = v.attrib['type']
p_group = f""".//tei:body/tei:div/tei:p[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:lg[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:div[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:div/tei:p[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:div/tei:lg[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:div/tei:ab[preceding-sibling::tei:pb[1]/@facs='{facs_id}']|
.//tei:body/tei:div/tei:div/tei:div[preceding-sibling::tei:pb[1]/@facs='{facs_id}']"""
body = doc.any_xpath(p_group)
Expand Down
3 changes: 2 additions & 1 deletion build_app/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lxml
acdh-tei-pyutils==0.32
python-slugify>=8.0.1
acdh-tei-pyutils>=1.4
acdh-cfts-pyutils==0.2
2 changes: 0 additions & 2 deletions build_app/shell/attributes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
echo "add attributes"
add-attributes -g "./data/editions/correspondence/*.xml" -b "https://amp.acdh.oeaw.ac.at"
add-attributes -g "./data/editions/photos/*.xml" -b "https://amp.acdh.oeaw.ac.at"
# add-attributes -g "./data/editions/memoirs/*.xml" -b "https://amp.acdh.oeaw.ac.at"
# add-attributes -g "./data/editions/additional-materials/*.xml" -b "https://amp.acdh.oeaw.ac.at"
7 changes: 7 additions & 0 deletions build_app/shell/fetch_data_entities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ unzip main
mkdir ./data/indices
mv amp-entities-main/out/*.xml ./data/indices
mv amp-entities-main/out/*.geojson ./data/indices
mv amp-entities-main/json_dumps/person_person.json ./html/js/json/analytics
mv amp-entities-main/json_dumps/person_org.json ./html/js/json/analytics
mv amp-entities-main/json_dumps/merged_relationships.json ./html/js/json/analytics
mv amp-entities-main/json_dumps/persons.json ./html/js/json/analytics
mv amp-entities-main/json_dumps/places.json ./html/js/json/analytics
mv amp-entities-main/json_dumps/organizations.json ./html/js/json/analytics
mv amp-entities-main/json_dumps/events.json ./html/js/json/analytics
rm -rf amp-entities-main
rm main.zip
46 changes: 33 additions & 13 deletions html/css/micro-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,30 +98,33 @@ input:checked + .i-slider:before {
text-decoration: line-through;
}

.whitespace {
}

/* .underline {
text-decoration: underline;
} */
/*.whitespace {
}*/

.italic {
font-style: italic;
}

.italic.underline {
.underline {
text-decoration: underline;
font-style: normal;
}

.orange {
background-color: #ffdbb8;
}

.brown {
background-color: #ffdd81;
}

.red {
background-color: #ffe6e6;
}

/*.red {
background-image: linear-gradient(to right, #ffe6e6, #B1FFBC);
}*/

.blue {
background-color: #e1d4ff;
}
Expand All @@ -142,6 +145,11 @@ input:checked + .i-slider:before {
background-color: #b59890;
}


.i-slider.red {
background-image: linear-gradient(to right, #FF9D9D, #B1FFBC);
}

.i-slider.orange {
background-color: #ffdbb8;
}
Expand Down Expand Up @@ -239,6 +247,13 @@ input:checked + .i-slider:before {
padding: 0.05em;
}

.g::before {
content: url("../images/icons/alphabet.svg");
background-color: #ffdd81;
border-radius: 0.5rem;
padding: 0.05em;
}

.slider-number::after {
content: "(" attr(data) ")";
color: #444;
Expand Down Expand Up @@ -443,6 +458,15 @@ annotation-slider label {
border-right: 1px solid lightgrey;
}

/*.choice.reg {
display: none;
}*/

.rev.add.strikethrough {
background-color: #B1FFBC;
text-decoration: none;
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 992px) {
.aot-list {
Expand All @@ -453,8 +477,4 @@ annotation-slider label {
padding: 1em 0;
border-bottom: 2px dashed lightgrey;
}
}

.choice.reg {
display: none;
}
}
6 changes: 1 addition & 5 deletions html/css/network.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.highcharts-data-table table {
min-width: 320px;
max-width: 100%;
margin: 1em auto;
margin: 4em auto;
}

.highcharts-data-table table {
Expand Down Expand Up @@ -40,7 +40,3 @@
.highcharts-data-table tr:hover {
background: #f1f7ff;
}

.container-fluid {
max-width: 60% !important;
}
Loading

0 comments on commit 0645dd5

Please sign in to comment.