hbz / digitalisiertedrucke

Implements http://digitalisiertedrucke.de/
0 stars 0 forks source link

Update link in source data and document update process #50

Closed fsteeg closed 7 years ago

fsteeg commented 7 years ago

Links reported via mail should go into a simple mapping file and replace the original link during transformation.

410444, http://nbn-resolving.de/urn:nbn:de:0128-1-506
fsteeg commented 7 years ago

Morph implementation is less straightforward than expected, both @acka47 and @dr0i suggested to change source data, which is not an export of some productive system, but actually our primary data.

fsteeg commented 7 years ago

I've updated the source file like this:

bzip2 -d hbz_zvdd_resource_marc.xml.bz2
sed -i 's/http:\/\/www.rlb.de\/Digitalisate\/Stolzenfels_Album\/index1.html/http:\/\/nbn-resolving.de\/urn:nbn:de:0128-1-506/g' hbz_zvdd_resource_marc.xml
bzip2 hbz_zvdd_resource_marc.xml

This works and is fine for now, see: http://beta.digitalisiertedrucke.de/resources/P410444

If we get many change requests however, I don't think this is a good way, since it involves more overhead than the morph way I had in mind:

  1. We have to get the original URL to replace from the current site
  2. We have to escape slashes in both URLs
  3. Running the commands above takes considerable time

With the morph/mapping file approach my idea was that we just have to dump the info from the mail into the file and we're done. The transformation could pick up the file from GitHub, so it would be enough to change it there (plus some periodic auto-transformation, which we have to run in either case).

No code change, and running on beta. Won't open pull request but simply push after +1 by @acka47.

acka47 commented 7 years ago

+1 If we don't get too many requests, this solution should suffice.