pubid 2.0.0.pre.alpha.8 → 2.0.0.pre.alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/bipm/update_codes.yaml +9 -0
- data/data/iec/update_codes.yaml +3 -0
- data/data/ieee/update_codes.yaml +107 -1
- data/data/nist/series.yaml +155 -0
- data/data/nist/update_codes.yaml +8 -0
- data/lib/pubid/adobe/builder.rb +52 -0
- data/lib/pubid/adobe/identifier.rb +49 -0
- data/lib/pubid/adobe/identifiers/publication.rb +31 -0
- data/lib/pubid/adobe/identifiers/tech_note.rb +32 -0
- data/lib/pubid/adobe/identifiers.rb +10 -0
- data/lib/pubid/adobe/parser.rb +128 -0
- data/lib/pubid/adobe/renderer.rb +39 -0
- data/lib/pubid/adobe/urn_generator.rb +42 -0
- data/lib/pubid/adobe/urn_parser.rb +69 -0
- data/lib/pubid/adobe.rb +60 -0
- data/lib/pubid/amca/builder.rb +2 -2
- data/lib/pubid/amca/identifier.rb +1 -3
- data/lib/pubid/amca/identifiers/base.rb +1 -6
- data/lib/pubid/amca/identifiers/interpretation.rb +1 -1
- data/lib/pubid/amca/identifiers/publication.rb +1 -1
- data/lib/pubid/amca/identifiers/standard.rb +1 -1
- data/lib/pubid/amca/identifiers.rb +0 -1
- data/lib/pubid/amca/single_identifier.rb +1 -1
- data/lib/pubid/amca.rb +3 -3
- data/lib/pubid/ashrae/builder.rb +22 -22
- data/lib/pubid/ashrae/identifier.rb +3 -4
- data/lib/pubid/ashrae/identifiers/addenda_package.rb +1 -1
- data/lib/pubid/ashrae/identifiers/addendum.rb +1 -1
- data/lib/pubid/ashrae/identifiers/base.rb +14 -8
- data/lib/pubid/ashrae/identifiers/combined_addenda.rb +1 -1
- data/lib/pubid/ashrae/identifiers.rb +0 -1
- data/lib/pubid/ashrae/parser.rb +14 -9
- data/lib/pubid/ashrae/renderer.rb +19 -19
- data/lib/pubid/ashrae/single_identifier.rb +1 -1
- data/lib/pubid/ashrae/supplement_identifier.rb +6 -6
- data/lib/pubid/ashrae.rb +3 -3
- data/lib/pubid/bipm/builder.rb +107 -0
- data/lib/pubid/bipm/identifier.rb +160 -0
- data/lib/pubid/bipm/identifiers/committee_document.rb +24 -0
- data/lib/pubid/bipm/identifiers/guide.rb +24 -0
- data/lib/pubid/bipm/identifiers/meeting.rb +41 -0
- data/lib/pubid/bipm/identifiers/mep.rb +21 -0
- data/lib/pubid/bipm/identifiers/metrologia_article.rb +24 -0
- data/lib/pubid/bipm/identifiers/si_brochure.rb +20 -0
- data/lib/pubid/bipm/identifiers.rb +15 -0
- data/lib/pubid/bipm/parser.rb +184 -0
- data/lib/pubid/bipm/renderer.rb +110 -0
- data/lib/pubid/bipm/urn_generator.rb +58 -0
- data/lib/pubid/bipm/urn_parser.rb +52 -0
- data/lib/pubid/bipm.rb +86 -0
- data/lib/pubid/bsi/builder.rb +14 -14
- data/lib/pubid/bsi/identifier.rb +0 -1
- data/lib/pubid/bsi/identifiers/addendum_document.rb +2 -2
- data/lib/pubid/bsi/identifiers/amendment.rb +4 -4
- data/lib/pubid/bsi/identifiers/consolidated_identifier.rb +6 -0
- data/lib/pubid/bsi/identifiers/corrigendum.rb +4 -4
- data/lib/pubid/bsi/identifiers/expert_commentary.rb +5 -5
- data/lib/pubid/bsi/identifiers/supplement_document.rb +2 -2
- data/lib/pubid/bsi/identifiers/value_added_publication.rb +6 -6
- data/lib/pubid/bsi/renderer.rb +8 -8
- data/lib/pubid/bsi/single_identifier.rb +48 -0
- data/lib/pubid/builder/base.rb +5 -3
- data/lib/pubid/bundled_identifier.rb +3 -3
- data/lib/pubid/calconnect/builder.rb +38 -0
- data/lib/pubid/calconnect/identifier.rb +117 -0
- data/lib/pubid/calconnect/identifiers/standard.rb +29 -0
- data/lib/pubid/calconnect/identifiers.rb +9 -0
- data/lib/pubid/calconnect/parser.rb +54 -0
- data/lib/pubid/calconnect/renderer.rb +36 -0
- data/lib/pubid/calconnect/urn_generator.rb +33 -0
- data/lib/pubid/calconnect/urn_parser.rb +34 -0
- data/lib/pubid/calconnect.rb +77 -0
- data/lib/pubid/ccsds/builder.rb +1 -1
- data/lib/pubid/ccsds/identifier.rb +1 -1
- data/lib/pubid/ccsds/identifiers/corrigendum.rb +2 -2
- data/lib/pubid/ccsds/supplement_identifier.rb +6 -6
- data/lib/pubid/ccsds/urn_generator.rb +3 -3
- data/lib/pubid/cen_cenelec/builder.rb +46 -12
- data/lib/pubid/cen_cenelec/identifiers/amendment.rb +2 -2
- data/lib/pubid/cen_cenelec/identifiers/consolidated_identifier.rb +6 -0
- data/lib/pubid/cen_cenelec/identifiers/corrigendum.rb +2 -2
- data/lib/pubid/cen_cenelec/identifiers/european_norm.rb +60 -3
- data/lib/pubid/cen_cenelec/identifiers/fragment.rb +2 -2
- data/lib/pubid/cen_cenelec/renderer.rb +5 -5
- data/lib/pubid/cen_cenelec/supplement_identifier.rb +5 -5
- data/lib/pubid/cen_cenelec/urn_generator.rb +1 -1
- data/lib/pubid/cen_cenelec.rb +76 -72
- data/lib/pubid/cie/builder.rb +139 -24
- data/lib/pubid/cie/identifier.rb +7 -3
- data/lib/pubid/cie/identifiers/bundle.rb +32 -4
- data/lib/pubid/cie/identifiers/code_attributes.rb +52 -0
- data/lib/pubid/cie/identifiers/conference.rb +9 -4
- data/lib/pubid/cie/identifiers/corrigendum.rb +17 -23
- data/lib/pubid/cie/identifiers/dual_published.rb +4 -4
- data/lib/pubid/cie/identifiers/identical.rb +7 -7
- data/lib/pubid/cie/identifiers/joint_published.rb +8 -8
- data/lib/pubid/cie/identifiers/proceedings.rb +39 -0
- data/lib/pubid/cie/identifiers/standard.rb +33 -7
- data/lib/pubid/cie/identifiers/supplement.rb +24 -22
- data/lib/pubid/cie/identifiers/tutorial_bundle.rb +6 -2
- data/lib/pubid/cie/identifiers.rb +2 -0
- data/lib/pubid/cie/parser.rb +54 -5
- data/lib/pubid/cie/single_identifier.rb +40 -1
- data/lib/pubid/cie/supplement_identifier.rb +29 -16
- data/lib/pubid/cie/urn_generator.rb +11 -8
- data/lib/pubid/cie.rb +0 -1
- data/lib/pubid/components/date.rb +21 -5
- data/lib/pubid/csa/builder.rb +1 -1
- data/lib/pubid/csa/composite_identifier.rb +17 -1
- data/lib/pubid/csa/identifier.rb +48 -3
- data/lib/pubid/csa/identifiers/bundled.rb +6 -0
- data/lib/pubid/csa/identifiers/combined.rb +6 -0
- data/lib/pubid/csa/identifiers/package.rb +2 -2
- data/lib/pubid/csa/parser.rb +6 -6
- data/lib/pubid/csa/wrapper_identifier.rb +17 -0
- data/lib/pubid/doi/builder.rb +18 -0
- data/lib/pubid/doi/identifier.rb +46 -0
- data/lib/pubid/doi/identifiers/resource.rb +30 -0
- data/lib/pubid/doi/identifiers.rb +9 -0
- data/lib/pubid/doi/parser.rb +52 -0
- data/lib/pubid/doi/renderer.rb +13 -0
- data/lib/pubid/doi.rb +55 -0
- data/lib/pubid/easc/builder.rb +55 -0
- data/lib/pubid/easc/identifier.rb +61 -0
- data/lib/pubid/easc/identifiers/pmg.rb +20 -0
- data/lib/pubid/easc/identifiers/rmg.rb +19 -0
- data/lib/pubid/easc/identifiers.rb +10 -0
- data/lib/pubid/easc/parser.rb +80 -0
- data/lib/pubid/easc/renderer.rb +48 -0
- data/lib/pubid/easc/urn_generator.rb +46 -0
- data/lib/pubid/easc/urn_parser.rb +57 -0
- data/lib/pubid/easc.rb +52 -0
- data/lib/pubid/ecma/builder.rb +31 -0
- data/lib/pubid/ecma/identifier.rb +76 -0
- data/lib/pubid/ecma/identifiers/memento.rb +30 -0
- data/lib/pubid/ecma/identifiers/standard.rb +31 -0
- data/lib/pubid/ecma/identifiers/technical_report.rb +31 -0
- data/lib/pubid/ecma/identifiers.rb +11 -0
- data/lib/pubid/ecma/parser.rb +41 -0
- data/lib/pubid/ecma/renderer.rb +46 -0
- data/lib/pubid/ecma/urn_generator.rb +25 -0
- data/lib/pubid/ecma/urn_parser.rb +35 -0
- data/lib/pubid/ecma.rb +67 -0
- data/lib/pubid/etsi/builder.rb +7 -3
- data/lib/pubid/etsi/identifier.rb +1 -3
- data/lib/pubid/etsi/identifiers/base.rb +28 -10
- data/lib/pubid/etsi/identifiers/etsi_standard.rb +128 -4
- data/lib/pubid/etsi/identifiers/supplement_identifier.rb +35 -3
- data/lib/pubid/etsi/identifiers.rb +0 -1
- data/lib/pubid/etsi/parser.rb +8 -2
- data/lib/pubid/etsi/renderer.rb +8 -2
- data/lib/pubid/etsi.rb +5 -5
- data/lib/pubid/export/exporter.rb +2 -1
- data/lib/pubid/export/flavor_exporter.rb +18 -3
- data/lib/pubid/gb/builder.rb +45 -0
- data/lib/pubid/gb/identifier.rb +64 -0
- data/lib/pubid/gb/identifiers/standard.rb +34 -0
- data/lib/pubid/gb/identifiers.rb +9 -0
- data/lib/pubid/gb/parser.rb +63 -0
- data/lib/pubid/gb/renderer.rb +35 -0
- data/lib/pubid/gb.rb +87 -0
- data/lib/pubid/gost/builder.rb +148 -0
- data/lib/pubid/gost/identifier.rb +49 -0
- data/lib/pubid/gost/identifiers/foreign_reference.rb +25 -0
- data/lib/pubid/gost/identifiers/harmonized.rb +39 -0
- data/lib/pubid/gost/identifiers/identical_adoption.rb +39 -0
- data/lib/pubid/gost/identifiers/interstate_standard.rb +20 -0
- data/lib/pubid/gost/identifiers/national_standard.rb +19 -0
- data/lib/pubid/gost/identifiers.rb +13 -0
- data/lib/pubid/gost/parser.rb +97 -0
- data/lib/pubid/gost/renderer.rb +48 -0
- data/lib/pubid/gost/urn_generator.rb +46 -0
- data/lib/pubid/gost/urn_parser.rb +52 -0
- data/lib/pubid/gost.rb +49 -0
- data/lib/pubid/iala/builder.rb +22 -27
- data/lib/pubid/iala/identifier.rb +27 -2
- data/lib/pubid/iala/identifiers/advice.rb +1 -1
- data/lib/pubid/iala/identifiers/annex.rb +10 -10
- data/lib/pubid/iala/identifiers/general_assembly.rb +5 -2
- data/lib/pubid/iala/identifiers/guideline.rb +3 -1
- data/lib/pubid/iala/identifiers/letter.rb +1 -1
- data/lib/pubid/iala/identifiers/manual.rb +3 -1
- data/lib/pubid/iala/identifiers/model_course.rb +3 -1
- data/lib/pubid/iala/identifiers/recommendation.rb +3 -1
- data/lib/pubid/iala/identifiers/report.rb +1 -1
- data/lib/pubid/iala/identifiers/resolution.rb +1 -1
- data/lib/pubid/iala/identifiers/standard.rb +3 -1
- data/lib/pubid/iala/identifiers.rb +0 -1
- data/lib/pubid/iala/renderer.rb +1 -1
- data/lib/pubid/iala/urn_generator.rb +1 -1
- data/lib/pubid/iala/urn_parser.rb +19 -2
- data/lib/pubid/iala.rb +4 -4
- data/lib/pubid/iana/builder.rb +20 -0
- data/lib/pubid/iana/identifier.rb +72 -0
- data/lib/pubid/iana/identifiers/registry.rb +33 -0
- data/lib/pubid/iana/identifiers.rb +9 -0
- data/lib/pubid/iana/parser.rb +38 -0
- data/lib/pubid/iana/renderer.rb +29 -0
- data/lib/pubid/iana/urn_generator.rb +15 -0
- data/lib/pubid/iana/urn_parser.rb +24 -0
- data/lib/pubid/iana.rb +69 -0
- data/lib/pubid/identifier.rb +210 -23
- data/lib/pubid/idf/builder.rb +1 -1
- data/lib/pubid/idf/parser.rb +2 -2
- data/lib/pubid/idf/renderer.rb +1 -1
- data/lib/pubid/idf/supplement_identifier.rb +3 -3
- data/lib/pubid/iec/builder.rb +35 -25
- data/lib/pubid/iec/identifier.rb +47 -2
- data/lib/pubid/iec/identifiers/base.rb +2 -2
- data/lib/pubid/iec/identifiers/consolidated_identifier.rb +6 -0
- data/lib/pubid/iec/identifiers/fragment_identifier.rb +11 -11
- data/lib/pubid/iec/identifiers/international_standard.rb +8 -5
- data/lib/pubid/iec/identifiers/sheet_identifier.rb +12 -12
- data/lib/pubid/iec/identifiers/technical_group.rb +30 -0
- data/lib/pubid/iec/identifiers/technical_report.rb +1 -1
- data/lib/pubid/iec/identifiers/technical_specification.rb +1 -1
- data/lib/pubid/iec/identifiers/vap_identifier.rb +12 -12
- data/lib/pubid/iec/identifiers.rb +1 -0
- data/lib/pubid/iec/parser.rb +51 -10
- data/lib/pubid/iec/renderer.rb +18 -8
- data/lib/pubid/iec/single_identifier.rb +1 -1
- data/lib/pubid/iec/supplement_identifier.rb +32 -19
- data/lib/pubid/iec.rb +1 -6
- data/lib/pubid/ieee/aiee/builder.rb +17 -3
- data/lib/pubid/ieee/aiee/identifier.rb +45 -61
- data/lib/pubid/ieee/builder.rb +341 -68
- data/lib/pubid/ieee/compaction.rb +121 -0
- data/lib/pubid/ieee/components/draft.rb +47 -7
- data/lib/pubid/ieee/identifier.rb +1 -3
- data/lib/pubid/ieee/identifiers/adopted_standard.rb +30 -5
- data/lib/pubid/ieee/identifiers/amendment.rb +40 -0
- data/lib/pubid/ieee/identifiers/base.rb +106 -13
- data/lib/pubid/ieee/identifiers/code_number.rb +82 -0
- data/lib/pubid/ieee/identifiers/conformance_identifier.rb +6 -2
- data/lib/pubid/ieee/identifiers/corrigendum.rb +17 -2
- data/lib/pubid/ieee/identifiers/csa_dual_published.rb +3 -3
- data/lib/pubid/ieee/identifiers/dual_identifier.rb +3 -3
- data/lib/pubid/ieee/identifiers/dual_published.rb +3 -3
- data/lib/pubid/ieee/identifiers/iec_ieee_copublished.rb +102 -5
- data/lib/pubid/ieee/identifiers/interpretation_identifier.rb +2 -1
- data/lib/pubid/ieee/identifiers/joint_development.rb +56 -11
- data/lib/pubid/ieee/identifiers/multi_numbered_identifier.rb +1 -1
- data/lib/pubid/ieee/identifiers/nesc/base.rb +90 -19
- data/lib/pubid/ieee/identifiers/nesc/draft.rb +20 -5
- data/lib/pubid/ieee/identifiers/nesc/edition.rb +32 -0
- data/lib/pubid/ieee/identifiers/nesc/handbook.rb +16 -5
- data/lib/pubid/ieee/identifiers/nesc/redline.rb +11 -2
- data/lib/pubid/ieee/identifiers/nesc/standard.rb +18 -3
- data/lib/pubid/ieee/identifiers/nesc.rb +1 -0
- data/lib/pubid/ieee/identifiers/parenthetical_identifier.rb +3 -3
- data/lib/pubid/ieee/identifiers/project_draft_identifier.rb +14 -6
- data/lib/pubid/ieee/identifiers/redlined_standard.rb +4 -4
- data/lib/pubid/ieee/identifiers/si_standard.rb +4 -1
- data/lib/pubid/ieee/identifiers/standard.rb +4 -1
- data/lib/pubid/ieee/identifiers/supplement_identifier.rb +26 -7
- data/lib/pubid/ieee/identifiers.rb +2 -1
- data/lib/pubid/ieee/ire/builder.rb +7 -6
- data/lib/pubid/ieee/ire/identifier.rb +48 -33
- data/lib/pubid/ieee/nesc/builder.rb +33 -20
- data/lib/pubid/ieee/nesc/parser.rb +15 -14
- data/lib/pubid/ieee/parser.rb +461 -43
- data/lib/pubid/ieee/pre_parser.rb +1 -1
- data/lib/pubid/ieee/renderer.rb +154 -57
- data/lib/pubid/ieee/typed_stages.rb +12 -1
- data/lib/pubid/ieee/urn_generator.rb +3 -5
- data/lib/pubid/ieee.rb +56 -3
- data/lib/pubid/ietf/builder.rb +62 -0
- data/lib/pubid/ietf/identifier.rb +5 -0
- data/lib/pubid/ietf/identifiers/base.rb +75 -0
- data/lib/pubid/ietf/identifiers/bcp.rb +25 -0
- data/lib/pubid/ietf/identifiers/fyi.rb +25 -0
- data/lib/pubid/ietf/identifiers/internet_draft.rb +29 -0
- data/lib/pubid/ietf/identifiers/rfc.rb +25 -0
- data/lib/pubid/ietf/identifiers/std.rb +25 -0
- data/lib/pubid/ietf/identifiers.rb +13 -0
- data/lib/pubid/ietf/parser.rb +43 -0
- data/lib/pubid/ietf/renderer.rb +26 -0
- data/lib/pubid/ietf/urn_generator.rb +23 -0
- data/lib/pubid/ietf/urn_parser.rb +35 -0
- data/lib/pubid/ietf.rb +76 -0
- data/lib/pubid/iho/identifier.rb +1 -3
- data/lib/pubid/iho/identifiers/base.rb +1 -7
- data/lib/pubid/iho/identifiers/bibliographic.rb +1 -1
- data/lib/pubid/iho/identifiers/circular_letter.rb +1 -1
- data/lib/pubid/iho/identifiers/miscellaneous.rb +1 -1
- data/lib/pubid/iho/identifiers/publication.rb +1 -1
- data/lib/pubid/iho/identifiers/standard.rb +1 -1
- data/lib/pubid/iho/identifiers.rb +0 -1
- data/lib/pubid/iho.rb +7 -7
- data/lib/pubid/isbn/builder.rb +44 -0
- data/lib/pubid/isbn/check_digit.rb +53 -0
- data/lib/pubid/isbn/identifier.rb +63 -0
- data/lib/pubid/isbn/identifiers/book.rb +30 -0
- data/lib/pubid/isbn/identifiers.rb +9 -0
- data/lib/pubid/isbn/parser.rb +45 -0
- data/lib/pubid/isbn/renderer.rb +16 -0
- data/lib/pubid/isbn.rb +52 -0
- data/lib/pubid/iso/builder.rb +9 -4
- data/lib/pubid/iso/combined_identifier.rb +2 -2
- data/lib/pubid/iso/identifier.rb +17 -1
- data/lib/pubid/iso/identifiers/directives_supplement.rb +8 -8
- data/lib/pubid/iso/normalizer.rb +2 -2
- data/lib/pubid/iso/parser.rb +16 -12
- data/lib/pubid/iso/supplement_identifier.rb +19 -6
- data/lib/pubid/iso/urn_generator.rb +4 -1
- data/lib/pubid/iso/urn_parser.rb +1 -1
- data/lib/pubid/itu/builder.rb +230 -29
- data/lib/pubid/itu/components/code.rb +48 -5
- data/lib/pubid/itu/components/designation.rb +35 -0
- data/lib/pubid/itu/components.rb +1 -0
- data/lib/pubid/itu/identifier.rb +1 -3
- data/lib/pubid/itu/identifiers/addendum.rb +15 -0
- data/lib/pubid/itu/identifiers/amendment.rb +6 -28
- data/lib/pubid/itu/identifiers/annex.rb +13 -2
- data/lib/pubid/itu/identifiers/annex_of_recommendation.rb +87 -0
- data/lib/pubid/itu/identifiers/appendix_of_recommendation.rb +92 -0
- data/lib/pubid/itu/identifiers/base.rb +341 -23
- data/lib/pubid/itu/identifiers/combined_identifier.rb +99 -23
- data/lib/pubid/itu/identifiers/corrigendum.rb +16 -23
- data/lib/pubid/itu/identifiers/errata.rb +15 -0
- data/lib/pubid/itu/identifiers/handbook.rb +38 -0
- data/lib/pubid/itu/identifiers/question.rb +63 -0
- data/lib/pubid/itu/identifiers/recommendation.rb +3 -2
- data/lib/pubid/itu/identifiers/report.rb +39 -0
- data/lib/pubid/itu/identifiers/special_publication.rb +3 -1
- data/lib/pubid/itu/identifiers/standard_serialization.rb +58 -0
- data/lib/pubid/itu/identifiers/supplement.rb +119 -14
- data/lib/pubid/itu/identifiers.rb +10 -1
- data/lib/pubid/itu/model.rb +1 -1
- data/lib/pubid/itu/parser.rb +480 -26
- data/lib/pubid/itu/urn_generator.rb +36 -6
- data/lib/pubid/itu/urn_parser.rb +8 -0
- data/lib/pubid/itu.rb +11 -3
- data/lib/pubid/jcgm/builder.rb +23 -13
- data/lib/pubid/jcgm/identifiers/amendment.rb +0 -2
- data/lib/pubid/jcgm/identifiers/corrigendum.rb +34 -0
- data/lib/pubid/jcgm/identifiers/gum_guide.rb +3 -3
- data/lib/pubid/jcgm/identifiers/meeting.rb +47 -0
- data/lib/pubid/jcgm/identifiers.rb +2 -0
- data/lib/pubid/jcgm/parser.rb +66 -6
- data/lib/pubid/jcgm/renderer.rb +26 -12
- data/lib/pubid/jcgm/single_identifier.rb +74 -5
- data/lib/pubid/jcgm/supplement_identifier.rb +39 -4
- data/lib/pubid/jcgm/urn_generator.rb +21 -13
- data/lib/pubid/jcgm/urn_parser.rb +15 -3
- data/lib/pubid/jis/identifier.rb +52 -0
- data/lib/pubid/nist/builder.rb +29 -9
- data/lib/pubid/nist/caster.rb +7 -45
- data/lib/pubid/nist/circular_supplement_builder.rb +7 -5
- data/lib/pubid/nist/components/supplement.rb +5 -2
- data/lib/pubid/nist/configuration.rb +7 -1
- data/lib/pubid/nist/identifier.rb +1 -3
- data/lib/pubid/nist/identifiers/base.rb +121 -37
- data/lib/pubid/nist/identifiers/circular.rb +1 -1
- data/lib/pubid/nist/identifiers/commercial_standard.rb +1 -1
- data/lib/pubid/nist/identifiers/commercial_standard_emergency.rb +1 -1
- data/lib/pubid/nist/identifiers/commercial_standards_monthly.rb +1 -1
- data/lib/pubid/nist/identifiers/crpl_report.rb +1 -1
- data/lib/pubid/nist/identifiers/dated_document.rb +1 -1
- data/lib/pubid/nist/identifiers/federal_information_processing_standards.rb +1 -1
- data/lib/pubid/nist/identifiers/grant_contractor_report.rb +1 -1
- data/lib/pubid/nist/identifiers/handbook.rb +1 -1
- data/lib/pubid/nist/identifiers/internal_report.rb +1 -1
- data/lib/pubid/nist/identifiers/letter_circular.rb +1 -1
- data/lib/pubid/nist/identifiers/miscellaneous_publication.rb +1 -1
- data/lib/pubid/nist/identifiers/monograph.rb +1 -1
- data/lib/pubid/nist/identifiers/ncstar.rb +2 -2
- data/lib/pubid/nist/identifiers/nsrds.rb +1 -1
- data/lib/pubid/nist/identifiers/owmwp.rb +1 -1
- data/lib/pubid/nist/identifiers/report.rb +1 -1
- data/lib/pubid/nist/identifiers/special_publication.rb +10 -1
- data/lib/pubid/nist/identifiers/technical_note.rb +1 -1
- data/lib/pubid/nist/identifiers.rb +0 -1
- data/lib/pubid/nist/parser.rb +26 -3
- data/lib/pubid/nist/preprocessor.rb +15 -0
- data/lib/pubid/nist/router.rb +2 -2
- data/lib/pubid/nist/series/ir.rb +0 -3
- data/lib/pubid/nist/supplement_identifier.rb +9 -9
- data/lib/pubid/nist.rb +12 -12
- data/lib/pubid/oasis/builder.rb +77 -0
- data/lib/pubid/oasis/identifier.rb +82 -0
- data/lib/pubid/oasis/identifiers/standard.rb +29 -0
- data/lib/pubid/oasis/identifiers.rb +9 -0
- data/lib/pubid/oasis/parser.rb +34 -0
- data/lib/pubid/oasis/renderer.rb +29 -0
- data/lib/pubid/oasis/urn_generator.rb +25 -0
- data/lib/pubid/oasis/urn_parser.rb +22 -0
- data/lib/pubid/oasis.rb +74 -0
- data/lib/pubid/ogc/builder.rb +33 -0
- data/lib/pubid/ogc/identifier.rb +77 -0
- data/lib/pubid/ogc/identifiers/document.rb +26 -0
- data/lib/pubid/ogc/identifiers.rb +10 -0
- data/lib/pubid/ogc/parser.rb +40 -0
- data/lib/pubid/ogc/renderer.rb +33 -0
- data/lib/pubid/ogc/urn_generator.rb +14 -0
- data/lib/pubid/ogc/urn_parser.rb +22 -0
- data/lib/pubid/ogc.rb +71 -0
- data/lib/pubid/oiml/builder.rb +31 -7
- data/lib/pubid/oiml/identifier.rb +9 -1
- data/lib/pubid/oiml/parser.rb +11 -12
- data/lib/pubid/oiml/renderer.rb +13 -13
- data/lib/pubid/oiml/single_identifier.rb +20 -0
- data/lib/pubid/oiml/supplement_identifier.rb +9 -9
- data/lib/pubid/oiml/urn_parser.rb +23 -6
- data/lib/pubid/oiml.rb +4 -0
- data/lib/pubid/omg/builder.rb +19 -0
- data/lib/pubid/omg/identifier.rb +44 -0
- data/lib/pubid/omg/identifiers/specification.rb +32 -0
- data/lib/pubid/omg/identifiers.rb +9 -0
- data/lib/pubid/omg/parser.rb +40 -0
- data/lib/pubid/omg/renderer.rb +19 -0
- data/lib/pubid/omg.rb +51 -0
- data/lib/pubid/parsers/mr_string.rb +101 -7
- data/lib/pubid/plateau/builder.rb +8 -4
- data/lib/pubid/plateau/identifier.rb +1 -3
- data/lib/pubid/plateau/identifiers/base.rb +1 -6
- data/lib/pubid/plateau/identifiers/handbook.rb +1 -1
- data/lib/pubid/plateau/identifiers/technical_report.rb +1 -1
- data/lib/pubid/plateau/identifiers.rb +0 -1
- data/lib/pubid/plateau/parser.rb +15 -5
- data/lib/pubid/plateau/renderer.rb +1 -1
- data/lib/pubid/plateau/supplement_identifier.rb +11 -11
- data/lib/pubid/plateau.rb +4 -4
- data/lib/pubid/renderers/human_readable.rb +3 -1
- data/lib/pubid/renderers/mr_string.rb +46 -4
- data/lib/pubid/renderers/supplement_renderer.rb +1 -1
- data/lib/pubid/rendering/supplement.rb +4 -4
- data/lib/pubid/sae/builder.rb +1 -1
- data/lib/pubid/sae/identifier.rb +1 -3
- data/lib/pubid/sae/identifiers/base.rb +10 -7
- data/lib/pubid/sae/identifiers.rb +0 -1
- data/lib/pubid/sae.rb +3 -3
- data/lib/pubid/tgpp/builder.rb +41 -0
- data/lib/pubid/tgpp/identifier.rb +91 -0
- data/lib/pubid/tgpp/identifiers/technical_report.rb +32 -0
- data/lib/pubid/tgpp/identifiers/technical_specification.rb +33 -0
- data/lib/pubid/tgpp/identifiers.rb +11 -0
- data/lib/pubid/tgpp/parser.rb +62 -0
- data/lib/pubid/tgpp/renderer.rb +36 -0
- data/lib/pubid/tgpp/urn_generator.rb +20 -0
- data/lib/pubid/tgpp/urn_parser.rb +28 -0
- data/lib/pubid/tgpp.rb +78 -0
- data/lib/pubid/type_resolver.rb +59 -0
- data/lib/pubid/un/builder.rb +42 -0
- data/lib/pubid/un/identifier.rb +37 -0
- data/lib/pubid/un/identifiers/document.rb +24 -0
- data/lib/pubid/un/identifiers.rb +9 -0
- data/lib/pubid/un/parser.rb +25 -0
- data/lib/pubid/un/renderer.rb +11 -0
- data/lib/pubid/un.rb +46 -0
- data/lib/pubid/version.rb +1 -1
- data/lib/pubid/w3c/builder.rb +55 -0
- data/lib/pubid/w3c/identifier.rb +101 -0
- data/lib/pubid/w3c/identifiers/candidate_recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/candidate_recommendation_draft.rb +31 -0
- data/lib/pubid/w3c/identifiers/draft_note.rb +31 -0
- data/lib/pubid/w3c/identifiers/note.rb +30 -0
- data/lib/pubid/w3c/identifiers/obsolete_recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/proposed_edited_recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/proposed_recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/standard.rb +12 -0
- data/lib/pubid/w3c/identifiers/superseded_recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/working_draft.rb +30 -0
- data/lib/pubid/w3c/identifiers.rb +25 -0
- data/lib/pubid/w3c/parser.rb +43 -0
- data/lib/pubid/w3c/renderer.rb +35 -0
- data/lib/pubid/w3c/urn_generator.rb +18 -0
- data/lib/pubid/w3c/urn_parser.rb +36 -0
- data/lib/pubid/w3c.rb +67 -0
- data/lib/pubid/xsf/builder.rb +17 -0
- data/lib/pubid/xsf/identifier.rb +62 -0
- data/lib/pubid/xsf/identifiers/xep.rb +31 -0
- data/lib/pubid/xsf/identifiers.rb +9 -0
- data/lib/pubid/xsf/parser.rb +25 -0
- data/lib/pubid/xsf/renderer.rb +23 -0
- data/lib/pubid/xsf/urn_generator.rb +13 -0
- data/lib/pubid/xsf/urn_parser.rb +18 -0
- data/lib/pubid/xsf.rb +76 -0
- data/lib/pubid.rb +25 -1
- metadata +205 -4
- data/lib/pubid/cie/components/code.rb +0 -80
- data/lib/pubid/iala/identifiers/base.rb +0 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6d61c7856e3a399a750ea5d73de7d370f32970f68a8dd66cda45a4ea4acc3f9d
|
|
4
|
+
data.tar.gz: de8c106c766b93318efde9b250d30b1eb4229d73124bb04741c3503a330c0b50
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8a6e510b3344464c39a245057f0c9dd8819245e8f0dd8d391d814949ba22b678c1942586cb801d831c1c37bc4cadc30549d035ffcb0b148128628861678dfa1
|
|
7
|
+
data.tar.gz: af562497969b162c2c4d5a99591eb03c5cc86d3588d487c5ef84407eb6726e53edab78c0e09f090cc1c39386e5113c4b4032ab725f85ed7d881b752d6f358bf0
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Legacy / docnumber-style BIPM identifier spellings normalized to a canonical,
|
|
2
|
+
# parseable Pubid::Bipm form before parsing. Keys are full-line-anchored plain
|
|
3
|
+
# strings (Regexp.escaped) or /regex/ literals — see lib/pubid/core/update_codes.rb.
|
|
4
|
+
#
|
|
5
|
+
# CIPM MRA:2005 interpretation document (relaton-data-bipm docnumber
|
|
6
|
+
# "CIPM/2005-06(REV)"): strip the slash and the "(REV)" revision marker so both
|
|
7
|
+
# the docnumber and docidentifier spellings map onto the bare "CIPM 2005-06" form.
|
|
8
|
+
"CIPM/2005-06(REV)": CIPM 2005-06
|
|
9
|
+
"CIPM 2005-06(REV)": CIPM 2005-06
|
data/data/iec/update_codes.yaml
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
IECEx TRF 60079-11v3-4:2002: IECEx TRF 60079-11v4C:2002
|
|
2
|
+
# IECEE TRF data-source anomaly: the OD-010-1 ampersand separator (&) was
|
|
3
|
+
# mistyped as a semicolon (;) in IEC's source data. See pubid/pubid#239.
|
|
4
|
+
IECEE TRF 60335-2-4;7F:2012: IECEE TRF 60335-2-4&7F:2012
|
|
2
5
|
IECEE TRF cispr 15N:2022: IECEE TRF CISPR 15N:2022
|
|
3
6
|
IECEE TRF cispr 15M:2021: IECEE TRF CISPR 15M:2021
|
|
4
7
|
IECEE TRF cispr 15L:2020: IECEE TRF CISPR 15L:2020
|
data/data/ieee/update_codes.yaml
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
IEEE Unapproved Draft Std PC37.110/D911Oct 07: IEEE Unapproved Draft Std PC37.110/D711, Oct 07
|
|
2
|
+
# Issue #206: "IEEE Unapproved Draft Std P15289, 06" — the ", 06" suffix
|
|
3
|
+
# has no clear meaning in IEEE's own grammar. Treating it as a draft
|
|
4
|
+
# iteration number (D6) gives a parseable form. Conservative targeted
|
|
5
|
+
# normalization rather than a general rule; revisit if more cases surface.
|
|
6
|
+
IEEE Unapproved Draft Std P15289, 06: IEEE Unapproved Draft Std P15289/D6
|
|
2
7
|
IEEE C57.139/D14June 2010: IEEE C57.139/D14, June 2010
|
|
3
8
|
IEEE P1653.5/D7d1 November, 2019: IEEE P1653.5/D7.1 November, 2019
|
|
4
9
|
IEEE P1017/D062012: P1017/D062012, Jun 2012
|
|
@@ -32,7 +37,13 @@ ISO/IEC/IEEE P26515 FDIS, May 2018: ISO/IEC/IEEE FDIS P26515, May 2018
|
|
|
32
37
|
IEEE Std Std 1139-2008: IEEE Std 1139-2008
|
|
33
38
|
IEC/IEEE P60214-2, FDIS 2018: IEC/IEEE FDIS P60214-2-2018(E)
|
|
34
39
|
IEC/IEEE P62582-6, FDIS 2018: IEC/IEEE FDIS P62582-6-2018(E)
|
|
35
|
-
ISO/IEC DIS P26511.2
|
|
40
|
+
# ISO/IEC DIS P26511.2 (May 2017) is an IEEE-style citation of an ISO/IEC
|
|
41
|
+
# DIS draft — ".2" is a draft version, not a part, so the prior mapping
|
|
42
|
+
# to "ISO/IEC DIS P26511-2" produced a phantom document that doesn't exist
|
|
43
|
+
# (ISO/IEC 26511 has no part 2). The ISO parser doesn't yet support the
|
|
44
|
+
# IEEE-style "P" prefix or the ", Month Year" date suffix on ISO/IEC DIS
|
|
45
|
+
# citations, so normalize to the bare DIS base + year. See pubid/pubid#212.
|
|
46
|
+
ISO/IEC DIS P26511.2, May 2017: ISO/IEC DIS 26511.2:2017
|
|
36
47
|
ISO/IEC/IEEE P90003_FDIS, August 2018: ISO/IEC/IEEE FDIS P90003, August 2018
|
|
37
48
|
ISO/IEC/IEEE P29119-1/FDIS, September 2021: ISO/IEC/IEEE FDIS P29119-1, September 2021
|
|
38
49
|
ISO/IEC/IEEE/ P12207-2/D3_FDIS, July 2020: ISO/IEC/IEEE FDIS P12207-2/D3, July 2020
|
|
@@ -102,3 +113,98 @@ IEEE Unapproved Draft Std P1635/ASHRAE 21_D4, Jan 2010: IEEE Unapproved Draft St
|
|
|
102
113
|
IEC/IEEE 62582-1:2011 Edition 1.0 2011-08: IEC/IEEE 62582-1-2011 Edition 1.0 2011-08
|
|
103
114
|
ISO/IEC/IEEE CD P26513/D1, August 2015: ISO/IEC/IEEE P26513/D1, August 2015
|
|
104
115
|
/C37.0I0d-1984/: C37.010d-1984
|
|
116
|
+
|
|
117
|
+
# --- month spellings pubid rejects -> canonical (relaton-ieee normtitles) ---
|
|
118
|
+
# Surgical, case-sensitive: only forms the grammar genuinely REJECTS. Do NOT
|
|
119
|
+
# add full-name->abbr rules (pubid accepts "June"/"September") or a blanket
|
|
120
|
+
# underscore rule — a broader ruleset regressed 12 already-parsing normtitles.
|
|
121
|
+
# Validated over relaton's 8,767 normtitles: +33 gained, 0 regressions.
|
|
122
|
+
# 4-letter abbreviation
|
|
123
|
+
/\bSept\b/: Sep
|
|
124
|
+
# OCR typos seen in the IEEE rawbib feed
|
|
125
|
+
/\bFeburary\b/: Feb
|
|
126
|
+
/\bNovemer\b/: Nov
|
|
127
|
+
/\bOctobor\b/: Oct
|
|
128
|
+
/\bJanurary\b/: Jan
|
|
129
|
+
# lowercase-only month words -> proper case (case-sensitive: leaves correct case alone)
|
|
130
|
+
/\bjanuary\b/: January
|
|
131
|
+
/\bfebruary\b/: February
|
|
132
|
+
/\bmarch\b/: March
|
|
133
|
+
/\bapril\b/: April
|
|
134
|
+
/\bjune\b/: June
|
|
135
|
+
/\bjuly\b/: July
|
|
136
|
+
/\baugust\b/: August
|
|
137
|
+
/\bseptember\b/: September
|
|
138
|
+
/\boctober\b/: October
|
|
139
|
+
/\bnovember\b/: November
|
|
140
|
+
/\bdecember\b/: December
|
|
141
|
+
|
|
142
|
+
# --- one-off IEEE normtitles migrated from relaton-ieee RawbibIdParser ---
|
|
143
|
+
# Exact-match, anchored (plain keys compile to /^…$/), zero-regression: each
|
|
144
|
+
# maps a specific malformed catalog string to relaton's canonical id, which
|
|
145
|
+
# pubid parses losslessly. (hand-off: ieee-update-codes-oneoffs.) Group 1
|
|
146
|
+
# parses on its own; the "dotted-draft" group relies on the verbatim-draft fix.
|
|
147
|
+
"IEEE Std P1073.1.3.4/D3.0": "IEEE Std P11073.00101"
|
|
148
|
+
"IEEE P802.1Qbu/03.0, July 2015": "IEEE P802.1Qbu/D-3.0-2015"
|
|
149
|
+
"IEEE P802.11aqTM/013.0 October 2017": "IEEE P802.11aqTM/D-13.0-2017"
|
|
150
|
+
"IEC/IEEE P62271-37-013:2015 D13.4": "IEC/IEEE P62271.37-013/D-13.4-2015"
|
|
151
|
+
"ISO/IEC/IEEE DIS P42020:201x(E), June 2017": "ISO/IEC/IEEE DIS P42020-2017-06"
|
|
152
|
+
"ISO/IEC/IEEE DIS P16326/201x, December 2018": "ISO/IEC/IEEE DIS P16326-2018-12"
|
|
153
|
+
"ISO/IEC/IEEE/P21839, 2019(E)": "ISO/IEC/IEEE P21839-2019"
|
|
154
|
+
"ISO/IEC/IEEE CD2 P12207-2: 201x(E), February 2019": "ISO/IEC/IEEE CD2 P12207.2-2019-02"
|
|
155
|
+
"ISO/IEC/IEEE P42010.WD4:2019(E)": "ISO/IEC/IEEE P42010/D-4-2019"
|
|
156
|
+
"IEC/IEEE P63195_CDV/V3, February 2020": "IEC/IEEE CDV P63195-2020-02"
|
|
157
|
+
"ISO/IEC/IEEE/P16085_DIS, March 2020": "ISO/IEC/IEEE DIS P16085-2020-03"
|
|
158
|
+
"ANSI/IEEE Std: Outdoor Apparatus Bushings": "ANSI/IEEE Std 21-1976-11"
|
|
159
|
+
"Draft National Electrical Safety Code, January 2016": "IEEE PC2-2016-01"
|
|
160
|
+
"International Standard ISO/IEC 8802-9: 1996(E) ANSI/IEEE Std 802.9, 1996 Edition": "ISO/IEC/IEEE Std 802.9-1996"
|
|
161
|
+
"ISO/IEC13210: 1994 (E) ANSI/IEEE Std 1003.3-1991": "ISO/IEC/IEEE 13210-1994"
|
|
162
|
+
"J-STD-016-1995": "IEEE 016-1995"
|
|
163
|
+
"Nuclear EQ Sourcebook and Supplement": "IEEE 7438946"
|
|
164
|
+
"PC37.30.2/D043 Rev 18, May 2015": "IEEE PC37.30-2/D-043/R-18-2015"
|
|
165
|
+
"IEEE/IEC P62582 CD2 proposal, May 2017": "IEEE/IEC CD2 P62582-2017-05"
|
|
166
|
+
"ISO/IEC/IEEE P16326:201x WD.4a, July 2017": "ISO/IEC/IEEE P16326/D-4a-2017-07"
|
|
167
|
+
"ISO/IEC/IEEE CD.1 P21839, October 2017": "ISO/IEC/IEEE CD1 P21839-2017-10"
|
|
168
|
+
"ISO/IEC/IEEE P16326:201x WD5, December 2017": "ISO/IEC/IEEE P16326/D-5-2017-12"
|
|
169
|
+
"IEEE/ISO/IEC P42010.CD1-V1.0, April 2020": "IEEE/ISO/IEC CD1 P42010-2020-04"
|
|
170
|
+
"Unapproved Draft Std ISO/IEC FDIS 15288:2007(E) IEEE P15288/D3,": "ISO/IEC/IEEE FDIS Std P15288/D-3-2007"
|
|
171
|
+
"IS0/IEC/IEEE 8802-11:2012/Amd.5:2015(E) (Adoption of IEEE Std 802.11af-2014)": "ISO/IEC/IEEE 802.11/Amd5-2012"
|
|
172
|
+
# `/D-` corrupted IEEE draft docids — malformed draft designations emitted by
|
|
173
|
+
# relaton-ieee's RawbibIdParser fallback rendering (the `/D-`, `_CDV_`, `.pdf`,
|
|
174
|
+
# `201x`, stray dots/spaces). Each maps to a canonical parseable form that
|
|
175
|
+
# retains number/part/draft/stage/date in the hash (the relaton index-v2 gate
|
|
176
|
+
# is the hash round-trip + non-empty root.number, not `to_s == input`).
|
|
177
|
+
# Interim measure; the durable fix is upstream in RawbibIdParser. See
|
|
178
|
+
# HANDOFFS/metanorma__pubid__ieee-update-codes-dashD-drafts.md.
|
|
179
|
+
# --- 8 pre-verified ---
|
|
180
|
+
"IEEE Approved Std P1609.3/D-23.pdf-2007-02": "IEEE Approved Std P1609.3/D23, 02 2007"
|
|
181
|
+
"IEEE P3004.5/D-6.2.": "IEEE P3004.5/D6.2"
|
|
182
|
+
"IEEE P730/D-0.16.-2025": "IEEE P730/D0.16-2025"
|
|
183
|
+
"IEEE PC37.107/D-4.-2023-11": "IEEE PC37.107/D4, 11 2023"
|
|
184
|
+
"IEEE PC37.113/D-8.0.-2015-08": "IEEE PC37.113/D8.0, 08 2015"
|
|
185
|
+
"IEEE PC37.98/D-5.1D-2013": "IEEE PC37.98/D5.1D-2013"
|
|
186
|
+
"IEEE PC57.637/D-6.2.-2014-03": "IEEE PC57.637/D6.2, 03 2014"
|
|
187
|
+
"IEEE Std P650/D-9.-2006": "IEEE Std P650/D9-2006"
|
|
188
|
+
# --- 21 derived (revision markers dropped, corrigendum reordered, joint
|
|
189
|
+
# stage+draft repositions year onto number with stage moved front) ---
|
|
190
|
+
"IEC/IEEE P63198.2775/D-6.1_CDV_March-2022": "IEC/IEEE CDV P63198.2775/D6.1, March 2022"
|
|
191
|
+
"IEEE 3.Rev.B/D-4.0-2023-01": "IEEE P3/D4.0, 01 2023"
|
|
192
|
+
"IEEE 3.Rev.B/D-5.0-2023-03": "IEEE P3/D5.0, 03 2023"
|
|
193
|
+
"IEEE P1003.1/D-5/Cor1-201x-2012-04": "IEEE P1003.1/Cor 1/D5, 04 2012"
|
|
194
|
+
"IEEE P1003.1/D-5/Cor1-201x-2012-08": "IEEE P1003.1/Cor 1/D5, 08 2012"
|
|
195
|
+
"IEEE P1127/D-4.1_July-2023": "IEEE P1127/D4.1, July 2023"
|
|
196
|
+
"IEEE P2660_1/D-2-2020-06": "IEEE P2660.1/D2, 06 2020"
|
|
197
|
+
"IEEE P802.1AE/D-1.0/R-/Cor1": "IEEE P802.1AE/Cor 1/D1.0"
|
|
198
|
+
"IEEE P802.1AE_Rev/D-1.2-2018": "IEEE P802.1AE/D1.2-2018"
|
|
199
|
+
"IEEE P802.1AE_Rev/D-1.3-2018": "IEEE P802.1AE/D1.3-2018"
|
|
200
|
+
"IEEE Unapproved Std P802.16Rev2/D-9-2009-01": "IEEE Unapproved Std P802.16Rev2/D9-2009"
|
|
201
|
+
"IEEE Unapproved Std P802.1X_REV/D-4.5-2009": "IEEE Unapproved Std P802.1X/D4.5-2009"
|
|
202
|
+
"IEEE Unapproved Std PC37.91/D-8-2007-20": "IEEE Unapproved Std PC37.91/D8-2007"
|
|
203
|
+
"IEEEE P1243/D-3-2023-02": "IEEE P1243/D3, 02 2023"
|
|
204
|
+
"ISO/IEC/IEEE FDIS P15289./E-3/D-2-2016": "ISO/IEC/IEEE FDIS P15289-2016/D2"
|
|
205
|
+
"ISO/IEC/IEEE P24641/D-2_CD-2020": "ISO/IEC/IEEE CD P24641-2020/D2"
|
|
206
|
+
"ISO/IEC/IEEE P24641/D-3_CD2": "ISO/IEC/IEEE CD2 P24641/D3"
|
|
207
|
+
"ISO/IEC/IEEE P24748.3/D-3_FDIS-2020": "ISO/IEC/IEEE FDIS P24748.3-2020/D3"
|
|
208
|
+
"ISO/IEC/IEEE/ P12207.2/D-3_FDIS-2020": "ISO/IEC/IEEE FDIS P12207.2-2020/D3"
|
|
209
|
+
"ISO/IEC/IEEE/ P24748.3/D-IS-2019": "ISO/IEC/IEEE DIS P24748.3-2019"
|
|
210
|
+
"P1635/D10/ASHARE 21/D-10-2016": "IEEE P1635/D10-2016"
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
long:
|
|
2
|
+
AMS: Advanced Manufacturing Series
|
|
3
|
+
BSS: Building Science Series
|
|
4
|
+
BMS: Building Material Structures Report
|
|
5
|
+
NBS BRPD-CRPL-D: Basic Radio Propagation Predictions Series
|
|
6
|
+
BH: Building and Housing
|
|
7
|
+
CRPL: Central Radio Propagation Laboratory Reports
|
|
8
|
+
NBS CRPL-F-A: CRPL Ionospheric Data
|
|
9
|
+
NBS CRPL-F-B: CRPL Solar-Geophysical Data
|
|
10
|
+
NBS IP: CRPL Ionospheric Predictions
|
|
11
|
+
CIRC: Circulars
|
|
12
|
+
NBS CIS: Consumer Information Series
|
|
13
|
+
CS: Commercial Standards
|
|
14
|
+
NBS CS-E: Commercial Standards (emergency)
|
|
15
|
+
CSM: Commercial Standards Monthly
|
|
16
|
+
FIPS: Federal Information Processing Standards Publication
|
|
17
|
+
GCR: Grant/Contract Reports
|
|
18
|
+
HB: Handbooks
|
|
19
|
+
NBS HR: Hydraulic Research in the United States
|
|
20
|
+
NBS IRPL: Interservice Radio Propagation Laboratory
|
|
21
|
+
ITL Bulletin: ITL Bulletin
|
|
22
|
+
NIST LC: Letter Circular
|
|
23
|
+
NBS LC: Letter Circular
|
|
24
|
+
MONO: Monograph
|
|
25
|
+
MP: Miscellaneous Publications
|
|
26
|
+
NCSTAR: National Construction Safety Team Act Reports
|
|
27
|
+
NSRDS: National Standard Reference Data Series
|
|
28
|
+
NSRDS-NBS: National Standard Reference Data Series
|
|
29
|
+
IR: IR
|
|
30
|
+
OWMWP: Office of Weights and Measures White Papers
|
|
31
|
+
PC: Photographic Laboratory Circulars
|
|
32
|
+
RPT: Reports
|
|
33
|
+
NIST PS: Voluntary Product Standards
|
|
34
|
+
SIBS: Special Interior Ballistics Studies
|
|
35
|
+
NBS PS: Voluntary Product Standards
|
|
36
|
+
SP: Special Publication
|
|
37
|
+
TN: Technical Notes
|
|
38
|
+
TIBM: Technical Information on Building Materials for Use in the Design of Low Cost Housing
|
|
39
|
+
TTB: Technology Transfer Briefs
|
|
40
|
+
NIST DCI: Data Collection Instruments
|
|
41
|
+
EAB: Economic Analysis Brief
|
|
42
|
+
NIST Other: Other
|
|
43
|
+
CSWP: Cybersecurity White Papers
|
|
44
|
+
CSRC Book: Cybersecurity Resource Center Book
|
|
45
|
+
CSRC Use Case: Cybersecurity Resource Center Use Case
|
|
46
|
+
CSRC Building Block: Cybersecurity Resource Center Building Block
|
|
47
|
+
JPCRD: Journal of Physical and Chemical Reference Data
|
|
48
|
+
JRES: Journal of Research of NIST
|
|
49
|
+
VTS: Voting Technology Series
|
|
50
|
+
AI: NIST Trustworthy and Responsible AI
|
|
51
|
+
abbrev:
|
|
52
|
+
AMS: Adv. Man. Ser
|
|
53
|
+
BSS: Bldg. Sci. Ser.
|
|
54
|
+
FIPS: Federal Inf. Process. Stds.
|
|
55
|
+
HB: Handb.
|
|
56
|
+
MONO: Monogr.
|
|
57
|
+
NCSTAR: Natl. Constr. Tm. Act Rpt.
|
|
58
|
+
NSRDS: Natl. Stand. Ret. Data Ser.
|
|
59
|
+
NSRDS-NBS: Natl. Stand. Ret. Data Ser.
|
|
60
|
+
NIST PS: Prod. Stand.
|
|
61
|
+
NBS PS: Prod. Stand.
|
|
62
|
+
SP: Spec. Publ.
|
|
63
|
+
TN: Tech. Note
|
|
64
|
+
NIST DCI: Data Collect. Instr.
|
|
65
|
+
NIST Other: Other
|
|
66
|
+
CSWP: CSWP
|
|
67
|
+
CSRC Book: CSRC Book
|
|
68
|
+
CSRC Use Case: CSRC Use Case
|
|
69
|
+
CSRC Building Block: CSRC Building Block
|
|
70
|
+
JPCRD: J. Phys. & Chem. Ref. Data
|
|
71
|
+
JRES: J. Res. Natl. Inst. Stan.
|
|
72
|
+
# Issue #150: abbreviated descriptions for series that previously had
|
|
73
|
+
# none. Convention follows existing entries (shortened, period-suffixed).
|
|
74
|
+
# Ronald Tse should review and refine as needed.
|
|
75
|
+
AI: AI
|
|
76
|
+
BH: Bldg. & Hous.
|
|
77
|
+
BMS: Bldg. Mat. Struct.
|
|
78
|
+
CIRC: Circ.
|
|
79
|
+
CRPL: CRPL
|
|
80
|
+
CS: Commer. Stand.
|
|
81
|
+
CSM: Commer. Stand. Mo.
|
|
82
|
+
EAB: Econ. Anal. Br.
|
|
83
|
+
GCR: Grant/Contract Rpt.
|
|
84
|
+
IR: Interag. Rep.
|
|
85
|
+
ITL Bulletin: ITL Bull.
|
|
86
|
+
MP: Misc. Publ.
|
|
87
|
+
NBS BRPD-CRPL-D: Bas. Radio Prop. Pred.
|
|
88
|
+
NBS CIS: Consum. Inf. Ser.
|
|
89
|
+
NBS CRPL-F-A: CRPL Ionos. Data
|
|
90
|
+
NBS CRPL-F-B: CRPL Solar-Geophys. Data
|
|
91
|
+
NBS CS-E: Commer. Stand. (Emerg.)
|
|
92
|
+
NBS HR: Hydraul. Res.
|
|
93
|
+
NBS IP: CRPL Ionos. Pred.
|
|
94
|
+
NBS IRPL: Interserv. Radio Prop. Lab.
|
|
95
|
+
NBS LC: Lett. Circ.
|
|
96
|
+
NIST LC: Lett. Circ.
|
|
97
|
+
OWMWP: Off. Weights Meas. WP
|
|
98
|
+
PC: Photo. Lab. Circ.
|
|
99
|
+
RPT: Rpt.
|
|
100
|
+
SIBS: Spec. Inter. Ball. Stud.
|
|
101
|
+
TIBM: Tech. Inf. Bldg. Mat.
|
|
102
|
+
TTB: Tech. Transf. Br.
|
|
103
|
+
VTS: Voting Tech. Ser.
|
|
104
|
+
JPCRD: J. Phys. & Chem. Ref. Data
|
|
105
|
+
JRES: J. Res. Natl. Inst. Stan.
|
|
106
|
+
mr:
|
|
107
|
+
AMS: AMS
|
|
108
|
+
BSS: BSS
|
|
109
|
+
BMS: BMS
|
|
110
|
+
NBS BRPD-CRPL-D: NBS.BRPD-CRPL-D
|
|
111
|
+
BH: BH
|
|
112
|
+
CRPL: CRPL
|
|
113
|
+
NBS CRPL-F-A: NBS.CRPL-F-A
|
|
114
|
+
NBS CRPL-F-B: NBS.CRPL-F-B
|
|
115
|
+
NBS IP: NBS.IP
|
|
116
|
+
CIRC: CIRC
|
|
117
|
+
NBS CIS: NBS.CIS
|
|
118
|
+
CS: CS
|
|
119
|
+
NBS CS-E: NBS.CS-E
|
|
120
|
+
CSM: CSM
|
|
121
|
+
FIPS: FIPS
|
|
122
|
+
GCR: GCR
|
|
123
|
+
HB: HB
|
|
124
|
+
NBS HR: NBS.HR
|
|
125
|
+
NBS IRPL: NBS.IRPL
|
|
126
|
+
ITL Bulletin: NIST.ITLB
|
|
127
|
+
NIST LC: NIST.LC
|
|
128
|
+
NBS LC: NBS.LC
|
|
129
|
+
MONO: MN
|
|
130
|
+
MP: MP
|
|
131
|
+
NCSTAR: NCSTAR
|
|
132
|
+
NSRDS: NSRDS
|
|
133
|
+
NSRDS-NBS: NBS.NSRDS
|
|
134
|
+
IR: IR
|
|
135
|
+
OWMWP: OWMWP
|
|
136
|
+
PC: PC
|
|
137
|
+
RPT: RPT
|
|
138
|
+
NIST PS: NIST.PS
|
|
139
|
+
SIBS: SIBS
|
|
140
|
+
NBS PS: NBS.PS
|
|
141
|
+
SP: SP
|
|
142
|
+
TN: TN
|
|
143
|
+
TIBM: TIBM
|
|
144
|
+
TTB: TTB
|
|
145
|
+
NIST DCI: NIST.DCI
|
|
146
|
+
EAB: EAB
|
|
147
|
+
NIST Other: NIST.O
|
|
148
|
+
CSWP: CSWP
|
|
149
|
+
CSRC Book: NIST.CSB
|
|
150
|
+
CSRC Use Case: NIST.CSUC
|
|
151
|
+
CSRC Building Block: NIST.CSBB
|
|
152
|
+
JPCRD: JPCRD
|
|
153
|
+
JRES: NIST.JRES
|
|
154
|
+
VTS: VTS
|
|
155
|
+
AI: AI
|
data/data/nist/update_codes.yaml
CHANGED
|
@@ -25,8 +25,16 @@
|
|
|
25
25
|
# by earlier ones. Run `bundle exec rspec spec/pubid/nist/` after edits.
|
|
26
26
|
NBS MN: NBS MONO
|
|
27
27
|
NIST MN: NIST MONO
|
|
28
|
+
# Long-form series names — normalize to the abbreviated form the parser expects.
|
|
29
|
+
/\bMonograph\b/: MONO
|
|
30
|
+
# Citation-form comma before long parameter prefixes — strip so the parser's
|
|
31
|
+
# " Rev. " / " Part. " / " Vol. " prefix rules match (issue #197).
|
|
32
|
+
'/,\s+(Rev\.|Part\.|Vol\.|Revision|Volume|Part)(?=\s|\d)/': ' \1'
|
|
28
33
|
NIST MP: NBS MP
|
|
29
34
|
NIST SP 260-162 2006ed.: NIST SP 260-162e2006
|
|
35
|
+
# Doubled publisher+series prefix — an error in the NIST Tech Pubs source data
|
|
36
|
+
# (pubid/pubid#152). Collapse the repeated "NIST AI" so the remainder parses.
|
|
37
|
+
NIST AI NIST AI 100-2e2023 ipd: NIST AI 100-2e2023 ipd
|
|
30
38
|
NBS CIRC 154suprev: NBS CIRC 154r1sup
|
|
31
39
|
NBS CIRC supJun1925-Jun1926: NBS CIRC 24e7sup2
|
|
32
40
|
NBS CIRC supJun1925-Jun1927: NBS CIRC 24e7sup3
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Adobe
|
|
5
|
+
# Builds an Adobe identifier object from the Parslet parse tree.
|
|
6
|
+
class Builder
|
|
7
|
+
def build(parsed)
|
|
8
|
+
return build_tech_note(parsed[:tech_note]) if parsed[:tech_note]
|
|
9
|
+
return build_tech_note_bare(parsed[:tech_note_bare]) if parsed[:tech_note_bare]
|
|
10
|
+
return build_publication_version(parsed[:publication_version]) if parsed[:publication_version]
|
|
11
|
+
return build_publication(parsed[:slug]) if parsed[:slug]
|
|
12
|
+
|
|
13
|
+
raise ArgumentError, "Unrecognized Adobe parse tree: #{parsed.inspect}"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.build(parsed)
|
|
17
|
+
new.build(parsed)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
private
|
|
21
|
+
|
|
22
|
+
def build_tech_note(hash)
|
|
23
|
+
Identifiers::TechNote.new(
|
|
24
|
+
number: stringify(hash[:number]),
|
|
25
|
+
slug: stringify(hash[:slug]),
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def build_tech_note_bare(number_hash)
|
|
30
|
+
Identifiers::TechNote.new(number: stringify(number_hash))
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def build_publication(slug_value)
|
|
34
|
+
Identifiers::Publication.new(slug: stringify(slug_value))
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def build_publication_version(hash)
|
|
38
|
+
Identifiers::Publication.new(
|
|
39
|
+
slug: stringify(hash[:slug]),
|
|
40
|
+
version: stringify(hash[:version]),
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def stringify(value)
|
|
45
|
+
return nil if value.nil?
|
|
46
|
+
|
|
47
|
+
str = value.to_s
|
|
48
|
+
str.empty? ? nil : str
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Adobe
|
|
5
|
+
# Base class for all Adobe identifiers. Canonical name
|
|
6
|
+
# Pubid::Adobe::Identifier; every concrete Adobe identifier
|
|
7
|
+
# (Identifiers::*) descends from it.
|
|
8
|
+
#
|
|
9
|
+
# Adobe identifiers come in two shapes:
|
|
10
|
+
#
|
|
11
|
+
# * TechNote — `Adobe Technical Note #<number>` / `ATN<number>`
|
|
12
|
+
# e.g. `Adobe Technical Note #5014`, `ATN5014`.
|
|
13
|
+
# * Publication — slug-keyed named specs that have no number
|
|
14
|
+
# e.g. `adobe-glyph-list`, `adobe-japan1-7`.
|
|
15
|
+
class Identifier < ::Pubid::Identifier
|
|
16
|
+
# Parse an Adobe identifier string into an identifier object.
|
|
17
|
+
# @param identifier [String]
|
|
18
|
+
# @return [Pubid::Adobe::Identifier]
|
|
19
|
+
# @raise [Parslet::ParseFailed] If parsing fails
|
|
20
|
+
def self.parse(identifier)
|
|
21
|
+
parsed = Parser.parse(identifier)
|
|
22
|
+
Builder.build(parsed)
|
|
23
|
+
rescue Parslet::ParseFailed => e
|
|
24
|
+
raise "Failed to parse Adobe identifier '#{identifier}': #{e.message}"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
attribute :publisher, :string, default: "Adobe"
|
|
28
|
+
|
|
29
|
+
ADOBE_TYPE_MAP = {
|
|
30
|
+
"pubid:adobe:tech-note" => "Pubid::Adobe::Identifiers::TechNote",
|
|
31
|
+
"pubid:adobe:publication" => "Pubid::Adobe::Identifiers::Publication",
|
|
32
|
+
}.freeze
|
|
33
|
+
|
|
34
|
+
key_value do
|
|
35
|
+
map "_type", to: :_type, polymorphic_map: ADOBE_TYPE_MAP
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def to_urn
|
|
39
|
+
UrnGenerator.new(self).generate
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Short type code (e.g. "ATN", nil for Publication) — convenience
|
|
43
|
+
# accessor used by Renderer and UrnGenerator.
|
|
44
|
+
def type_short
|
|
45
|
+
self.class.type[:short]
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Adobe
|
|
5
|
+
module Identifiers
|
|
6
|
+
# Adobe named publication. Slug-keyed specs that have no tech-note
|
|
7
|
+
# number — Adobe Glyph List, PostScript Language, character
|
|
8
|
+
# collections, etc.
|
|
9
|
+
#
|
|
10
|
+
# Surface forms:
|
|
11
|
+
# * slug `adobe-glyph-list`, `adobe-postscript-language`
|
|
12
|
+
# * versioned character collections: `adobe-japan1` + version `7`
|
|
13
|
+
# * human render is the slug title-cased (`Adobe Glyph List`,
|
|
14
|
+
# `Adobe-Japan1-7`); the full publication title lives in the
|
|
15
|
+
# data repo's title attribute, not here.
|
|
16
|
+
class Publication < Identifier
|
|
17
|
+
attribute :slug, :string # "adobe-glyph-list", "adobe-japan1"
|
|
18
|
+
attribute :version, :string # "7", "3", nil
|
|
19
|
+
|
|
20
|
+
key_value do
|
|
21
|
+
map "slug", to: :slug
|
|
22
|
+
map "version", to: :version
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.type
|
|
26
|
+
{ key: :publication, title: "Publication", short: nil }
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Adobe
|
|
5
|
+
module Identifiers
|
|
6
|
+
# Adobe Technical Note. Numbered 4-digit (5xxx series observed).
|
|
7
|
+
#
|
|
8
|
+
# Surface forms:
|
|
9
|
+
# * `Adobe Technical Note #5014` — formal citation form
|
|
10
|
+
# * `ATN5014` — short alias used in Metanorma
|
|
11
|
+
# anchor ids ([[atn5014,…]])
|
|
12
|
+
# * filename `5014.CIDFont_Spec.pdf` (data repo splits filename
|
|
13
|
+
# into number + slug before calling the parser)
|
|
14
|
+
#
|
|
15
|
+
# The optional `slug` carries the filename's title segment
|
|
16
|
+
# (`CIDFont_Spec`) so round-trip through the data repo is lossless.
|
|
17
|
+
class TechNote < Identifier
|
|
18
|
+
attribute :number, :string # "5014", "5902"
|
|
19
|
+
attribute :slug, :string # "CIDFont_Spec", "AFM_Spec", nil
|
|
20
|
+
|
|
21
|
+
key_value do
|
|
22
|
+
map "number", to: :number
|
|
23
|
+
map "slug", to: :slug
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.type
|
|
27
|
+
{ key: :"tech-note", title: "Technical Note", short: "ATN" }
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "parslet"
|
|
4
|
+
|
|
5
|
+
module Pubid
|
|
6
|
+
module Adobe
|
|
7
|
+
# Parslet grammar for Adobe identifiers.
|
|
8
|
+
#
|
|
9
|
+
# Canonical citation forms (what the renderer produces):
|
|
10
|
+
#
|
|
11
|
+
# Adobe TN 5014 (tech note; replaces the older
|
|
12
|
+
# "Adobe Technical Note #5014")
|
|
13
|
+
# Adobe Publication adobe-glyph-list
|
|
14
|
+
# Adobe Publication adobe-japan1-7
|
|
15
|
+
#
|
|
16
|
+
# The parser also accepts these legacy forms for back-compat:
|
|
17
|
+
#
|
|
18
|
+
# Adobe Technical Note #5014
|
|
19
|
+
# Adobe Technical Note 5014
|
|
20
|
+
# Adobe TN5014 (no space)
|
|
21
|
+
# ATN5014 (short alias)
|
|
22
|
+
# 5014 (bare number; data-repo context)
|
|
23
|
+
# adobe-glyph-list (bare slug)
|
|
24
|
+
class Parser < Parslet::Parser
|
|
25
|
+
include ::Pubid::Parser::CommonParseRules
|
|
26
|
+
|
|
27
|
+
root :identifier
|
|
28
|
+
|
|
29
|
+
rule(:space) { str(" ") }
|
|
30
|
+
rule(:space?) { space.maybe }
|
|
31
|
+
rule(:hash) { str("#") }
|
|
32
|
+
rule(:dot) { str(".") }
|
|
33
|
+
rule(:dash) { str("-") }
|
|
34
|
+
|
|
35
|
+
# Canonical short prefix: "Adobe TN" with optional trailing space.
|
|
36
|
+
# Matches both "Adobe TN 5014" and "Adobe TN5014".
|
|
37
|
+
rule(:tech_note_tn_prefix) do
|
|
38
|
+
str("Adobe") >> space >> str("TN") >> space?.maybe
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Legacy long prefix: "Adobe Technical Note" with optional "#".
|
|
42
|
+
rule(:tech_note_long_prefix) do
|
|
43
|
+
str("Adobe") >> space >> str("Technical") >> space >> str("Note") >>
|
|
44
|
+
(space? >> hash.maybe >> space?).maybe
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Legacy short alias: "ATN" with optional trailing space.
|
|
48
|
+
rule(:tech_note_atn_prefix) do
|
|
49
|
+
str("ATN") >> space?.maybe
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
rule(:tech_note_prefix) do
|
|
53
|
+
tech_note_tn_prefix | tech_note_long_prefix | tech_note_atn_prefix
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
rule(:digits) do
|
|
57
|
+
match("[0-9]").repeat(1)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# 4-digit tech note number, optionally followed by ".<Slug>" from
|
|
61
|
+
# the filename form. The slug is captured but not required.
|
|
62
|
+
rule(:slug_chars) do
|
|
63
|
+
match("[A-Za-z0-9_]").repeat(1)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
rule(:tech_note) do
|
|
67
|
+
(tech_note_prefix >>
|
|
68
|
+
digits.as(:number) >>
|
|
69
|
+
(dot >> slug_chars.as(:slug)).maybe).as(:tech_note)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Bare number form (e.g. when the data repo passes just "5014"
|
|
73
|
+
# extracted from a filename). Not advertised in user docs; used
|
|
74
|
+
# internally by AdobeFetcher::Docid.
|
|
75
|
+
rule(:bare_number) do
|
|
76
|
+
digits.as(:number).as(:tech_note_bare)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# "Adobe Publication " prefix. Matched literally then discarded —
|
|
80
|
+
# the publication slug/version is parsed by the inner rule.
|
|
81
|
+
rule(:publication_prefix) do
|
|
82
|
+
str("Adobe") >> space >> str("Publication") >> space
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Publication slug. Lowercase ASCII letters and digits joined by `-`.
|
|
86
|
+
# Each segment starts with a letter (so a trailing `-<digits>` is
|
|
87
|
+
# unambiguously a version suffix, not part of the slug).
|
|
88
|
+
rule(:slug_segment) do
|
|
89
|
+
match("[a-z]") >> match("[a-z0-9]").repeat
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
rule(:slug_inner) do
|
|
93
|
+
slug_segment >> (dash >> slug_segment).repeat
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
rule(:publication_with_version) do
|
|
97
|
+
(slug_inner.as(:slug) >> dash >> digits.as(:version)).as(:publication_version)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
rule(:publication_slug_or_version) do
|
|
101
|
+
# Try with-version first so `adobe-japan1-7` doesn't get captured
|
|
102
|
+
# as slug `adobe-japan1-7` with no version. The flat `:slug` form
|
|
103
|
+
# is the fallback for unversioned slugs.
|
|
104
|
+
publication_with_version | slug_inner.as(:slug)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
rule(:publication) do
|
|
108
|
+
# Optional "Adobe Publication " prefix. The prefix is consumed
|
|
109
|
+
# but not captured — the inner rule produces :slug or
|
|
110
|
+
# :publication_version as before.
|
|
111
|
+
publication_prefix.maybe >> publication_slug_or_version
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
rule(:identifier) do
|
|
115
|
+
tech_note | bare_number | publication
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Parse a string and return the raw parslet tree.
|
|
119
|
+
# @param string [String]
|
|
120
|
+
# @return [Hash]
|
|
121
|
+
def self.parse(string)
|
|
122
|
+
raise ArgumentError, ::Pubid::INPUT_TOO_LONG_MESSAGE if string.length > ::Pubid::MAX_INPUT_LENGTH
|
|
123
|
+
|
|
124
|
+
new.parse(string.strip)
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Adobe
|
|
5
|
+
# Human-readable renderer for Adobe identifiers.
|
|
6
|
+
#
|
|
7
|
+
# Produces the canonical citation forms:
|
|
8
|
+
# "Adobe TN 5014" (tech note)
|
|
9
|
+
# "Adobe Publication adobe-glyph-list" (publication, slug)
|
|
10
|
+
# "Adobe Publication adobe-japan1-7" (publication, slug + version)
|
|
11
|
+
#
|
|
12
|
+
# The data repo (AdobeFetcher::Docid) overrides #to_s for publications
|
|
13
|
+
# to use the title from metadata instead of the slug, producing e.g.
|
|
14
|
+
# "Adobe Publication Adobe Glyph List". Pubid::Adobe itself is purely
|
|
15
|
+
# structural and renders slug-form citations.
|
|
16
|
+
class Renderer < ::Pubid::Renderers::Base
|
|
17
|
+
def render(context: nil, **_opts)
|
|
18
|
+
id = @id
|
|
19
|
+
|
|
20
|
+
return render_tech_note(id) if id.is_a?(Identifiers::TechNote)
|
|
21
|
+
return render_publication(id) if id.is_a?(Identifiers::Publication)
|
|
22
|
+
|
|
23
|
+
raise ArgumentError, "Unknown Adobe identifier class: #{id.class}"
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
private
|
|
27
|
+
|
|
28
|
+
def render_tech_note(id)
|
|
29
|
+
"Adobe TN #{id.number}"
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def render_publication(id)
|
|
33
|
+
rendered = "Adobe Publication #{id.slug}"
|
|
34
|
+
rendered << "-#{id.version}" if id.version
|
|
35
|
+
rendered
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|