relaton / relaton-iso

RelatonIso: ISO Standards metadata using the BibliographicItem model
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

(URGENT) Unable to fetch correct Amd identifiers (e.g. `ISO 19115-1:2014/Amd 2:2020`) #122

Closed ronaldtse closed 2 years ago

ronaldtse commented 2 years ago

Relaton-ISO is unable to locate dated Amd identifiers due to failure in parsing dates: e.g. ISO 19115-1:2014/Amd 2:2020.

[relaton-iso] ("ISO 19115-1:2014/Amd 2:2020") fetching...
[relaton-iso] Attempting ISO/IEC retrieval
[relaton-iso] WARNING: no match found online for ISO 19115-1:2014/Amd 2:2020:2014. The code must be exactly like it is on the standards website.
[relaton-iso] (There was no match for 2014, though there were matches found for 2020.)
[relaton-iso] The provided document part may not exist, or the document may no longer be published in parts.
[relaton-iso] ("ISO 19115-2:2019/Amd 2:2022") fetching...
[relaton-iso] Attempting ISO/IEC retrieval
[relaton-iso] WARNING: no match found online for ISO 19115-2:2019/Amd 2:2022:2019. The code must be exactly like it is on the standards website.
[relaton-iso] The provided document part may not exist, or the document may no longer be published in parts.

https://www.iso.org/standard/78888.html

Screenshot 2022-07-04 at 1 24 23 PM

https://www.iso.org/standard/80275.html

Screenshot 2022-07-04 at 1 24 41 PM
ronaldtse commented 2 years ago

This issue can be further mitigated by using pubid-iso.

ronaldtse commented 2 years ago

This is blocking ISO 19115-3.

andrew2net commented 2 years ago

@ronaldtse I'm unable to reproduce the issue

relaton fetch "ISO 19115-1:2014/Amd 2:2020"
[relaton-iso] ("ISO 19115-1:2014/Amd 2:2020") fetching...
[relaton-iso] ("ISO 19115-1:2014/Amd 2:2020") found ISO 19115-1:2014/Amd 2:2020
<bibitem id="ISO19115-1-2014/Amd2-2020" type="standard">
...

Do you use the latest relaton version?

ronaldtse commented 2 years ago

I can confirm that this works:

$ bundle exec relaton fetch "ISO 19115-1:2014/Amd 2:2020"
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
[relaton-iso] ("ISO 19115-1:2014/Amd 2:2020") fetching...
[relaton-iso] ("ISO 19115-1:2014/Amd 2:2020") found ISO 19115-1:2014/Amd 2:2020
<bibitem id="ISO19115-1-2014/Amd2-2020" type="standard">
  <fetched>2022-07-15</fetched>
  <title type="title-intro" format="text/plain" language="en" script="Latn">Geographic information</title>
  <title type="title-main" format="text/plain" language="en" script="Latn">Metadata</title>
  <title type="title-part" format="text/plain
$ bundle exec relaton fetch "ISO 19115-2:2019/Amd 1:2022"
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
[relaton-iso] ("ISO 19115-2:2019/Amd 1:2022") fetching...
[relaton-iso] ("ISO 19115-2:2019/Amd 1:2022") found ISO 19115-2:2019/Amd 1:2022
<bibitem id="ISO19115-2-2019/Amd1-2022" type="standard">
  <fetched>2022-07-15</fetched>

Thanks @andrew2net !