Import crude data from txt file

I have over 5000 units of bibliographic sources distributed over 5000 txt files. The main issue is that the data is in a crude form, eg. not standardized. This is how the format generally goes:

Name : Name_of_book
Author : Author_of_book
Editor : Editor_of_book
Publisher : Publisher_of_book
Publication Date : Publication_Date_of_book

It would be nice if I could just select that data, press a button so that it gets stored in the Zotero Referencing Database. No way that I am going to manually input those fields for 5000+ references...

Any suggestions?
  • Zotero doesn't do magic, so it won't be able to directly parse this plain-text format, but you can convert your files into something that Zotero can read.

    If, say, that format was consistent among all the files, I would merge the files into a single file, separating each entry with

    ER -

    TY - BOOK

    then add a "TY - BOOK" to the beginning and an "ER - "

    Now you search and replace "Name : " with "TI - ", "Author : " with "AU - ", "Editor - " with "A3 - ", etc. according to https://github.com/aurimasv/translators/wiki/RIS-Tag-Map-(narrow)

    and in the end you have a RIS formatted library, which Zotero can import.
  • Thank you for the valuable suggestion. There is one extra complication... All those references are in Arabic, not in English. Are the tags still the same?
  • yes, the tags are the same regardless of language.
  • I found out from the forums that there are sometimes issues with RIS importing of files. Are there any other easy txt format structures that I could consider as well?
  • I'm not sure what you're referring to with RIS importing of files. It works with proper filepaths. And RIS is the simplest txt format available, anything else is more complex.
  • I think that you must have read about problems related to Zotero and flawed RIS. (Some programs export non-standard RIS.) In your case, it seems that you can make very simple RIS files that should serve your need.

    Be sure to work from a copy of your original file. If you don't have experience with search/replace in large text files, ask someone for help. All of us have made errors at least once that would have been disasters without undo.
  • See also https://www.zotero.org/support/kb/importing_formatted_bibliographies, of which this is a special case. There are a few nuances of making RIS (or other simple tagged text formats), such as dealing with the separators for multiple authors and editors).

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.