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

multiple URLs on import #52

Merged
merged 3 commits into from
Jul 13, 2023
Merged

multiple URLs on import #52

merged 3 commits into from
Jul 13, 2023

Conversation

shapiromatron
Copy link
Collaborator

Implements #47.

This makes the RIS parser consistent with the specification.

Web/URL. There is no practical length limit to this field. URL addresses can be entered individually, one per tag, or multiple addresses can be entered on one line using a semi- colon as a separator.

Note that this is a breaking change. The "url" key is no longer used, and instead a "urls" key is used an results are saved as a list instead of a single string value, if exists.

@shapiromatron
Copy link
Collaborator Author

Requesting review from @maxi07, @J535D165, @scott-8 please

@scott-8
Copy link
Contributor

scott-8 commented Jul 10, 2023

@shapiromatron rather than make in-place updates at the end with _finalize_record, it would be better in my opinion to make a new type of tag, similar to list tags, that we could specify. This would be specified in the config, and we would denote urls as both a list tag and a CSV tag. That way, we could allow any other tag to be comma separated in the future.

@shapiromatron
Copy link
Collaborator Author

@shapiromatron rather than make in-place updates at the end with _finalize_record, it would be better in my opinion to make a new type of tag, similar to list tags, that we could specify. This would be specified in the config, and we would denote urls as both a list tag and a CSV tag. That way, we could allow any other tag to be comma separated in the future.

I don't see any other examples of this in the spec. It's a lot more work to implement in a more abstract manner, what other uses cases might there be?

@scott-8
Copy link
Contributor

scott-8 commented Jul 10, 2023

Probably not in the RIS spec, but I think it would be a good tool for people to use in custom parsers. Want me to take a stab at it?

@shapiromatron
Copy link
Collaborator Author

Let's see what other think before we make the change - any thoughts @J535D165 ?

Copy link
Contributor

@J535D165 J535D165 left a comment

Choose a reason for hiding this comment

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

I agree with @scott-8 that it's nice to have. I see implementations with notes stored this way. It would be nice to have this option.

However, nothing limits you from merging this PR first, imo. The tests are nice, and it is a very welcome improvement. I'm looking forward to shipping this improvement to our users. I'm happy to review your work @scott-8!

tests/data/example_urls.ris Show resolved Hide resolved
@shapiromatron
Copy link
Collaborator Author

ok, I'm ok with merging and putting out a new release now, or can wait for @scott-8 for an alternative implementation - let me know what you'd prefer @scott-8!

@scott-8
Copy link
Contributor

scott-8 commented Jul 11, 2023

I'm finished with a new implementation, I'll push it in a few min

update: @shapiromatron there's another PR to merge my changes into this branch

@shapiromatron
Copy link
Collaborator Author

Thanks @scott-8 for the updates; and @J535D165 for the feedback! Will release a new version shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants