Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to identify RPB ZSS in ALMA #42

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ libraryDependencies ++= Seq(
"org.metafacture" % "metafacture-flux" % "5.7.0-rc1",
"org.metafacture" % "metafacture-triples" % "5.7.0-rc1",
"org.metafacture" % "metafacture-formatting" % "5.7.0-rc1",
"org.metafacture" % "metafix" % "0.6.0-rc3",
"org.metafacture" % "metafix" % "0.6.0-SNAPSHOT",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes the build to fail.

@TobiasNx Did you need something specific in the SNAPSHOT, or was this just to make it work for you locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, it was just to make it work locally. The new release should be good.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I'll revert to 0.6.0-rc3 for now, which is configured in the GitHub CI action.

"org.elasticsearch" % "elasticsearch" % "1.7.5" withSources(),
"com.github.jsonld-java" % "jsonld-java" % "0.5.0",
"org.apache.commons" % "commons-rdf-jena" % "0.5.0",
Expand Down
1,666 changes: 1,666 additions & 0 deletions conf/RPB-Export_HBZ_ZSS.txt

Large diffs are not rendered by default.

18,682 changes: 18,682 additions & 0 deletions conf/lobidOrganisationsMapping.tsv

Large diffs are not rendered by default.

1,666 changes: 1,666 additions & 0 deletions conf/output/zss.json

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions conf/rpb-7-ZSS-mapping.fix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
do once("maps")
put_filemap("./lobidOrganisationsMapping.tsv","sigel2idMap", sep_char:"\t",key_column:"2",value_column:"0",expected_columns:"-1")
end

# Remove empty fields

vacuum()

copy_field("f00_","id")
copy_field("f7na","title")
replace_all("title", "[,.:;/=]", "")

copy_field("f7ns","organisationId")
replace_all("organisationId","(.*) / .*","$1")
lookup("organisationId","sigel2idMap")

copy_field("f7ns","callNumber")
replace_all("callNumber",".* / (.*)","$1")

retain( "id", "title", "organisationId","callNumber")

vacuum()
8 changes: 8 additions & 0 deletions conf/rpb-7-ZSS-mapping.flux
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FLUX_DIR + "RPB-Export_HBZ_ZSS.txt"
| open-file(encoding="IBM437")
| as-lines
| rpb.Decode
| fix(FLUX_DIR + "rpb-7-ZSS-mapping.fix")
| encode-json(prettyPrinting="false")
| write(FLUX_DIR + "output/zss.json")
;