rispy icon indicating copy to clipboard operation
rispy copied to clipboard

skip some lines at the beginning of the file

Open Freakwill opened this issue 1 year ago • 3 comments

Some ris file stats with some information as follows, can we skip it automatically?

Provider: Silverchair
Database: AmericanAccountingAssociation
Content: text/plain; charset="UTF-8"

Freakwill avatar Nov 03 '23 05:11 Freakwill

What kind of system exports RIS files like this?

J535D165 avatar Nov 03 '23 12:11 J535D165

Yes, I don't think I've seen an RIS file like this before. Could you elaborate on where this format came from? We could accept a PR if by default zero lines are skipped by default, as long as there's a broader need for supporting this format.

shapiromatron avatar Jan 17 '24 21:01 shapiromatron

There is a function called is_header which you can override in a subclass. The input is a line, and the output is a boolean. It's more intended for RIS files that have a header before every reference, but it should work for this use case. If this a common issue, maybe adding it as a separate parameter is warranted.

scott-8 avatar Jan 25 '24 22:01 scott-8