Can I include Folder Name in exported CSV?

Hi

If I export citations to a CSV file, is there any way to include the enclosing Folder Name as a field in the CSV file?
  • Nope, that information is not available to exporters.
  • Are you sure? -- I thought ZoteroRDF included it.
  • Pretty sure; exporters get info on collections that live under the collection you're exporting, but no information on the collection you are exporting itself.
  • That would work fine if I can get info on the collections under the exported collections - I would just move one level up. But can that information be included in an exported CSV?
  • Then technically, yes, it's possible, although the csv exporter would have to be modified to export it. It'd probably best be done in the same way tags are done, all collections an item belongs to in a single column separated by a semicolon.
  • Is it possible to create a new exporter as a plugin so I add the feature but can keep using the public version of Zotero rather than creating a private fork?
  • edited February 10, 2019
    No need for a plugin even -- you can copy the existing CSV translator, change the guid and timestamp, and drop it back into the "translators" folder and it would work.

    Not sure whether CSV is the best format for this though. CSV generally works best when there are a fixed number of columns, and there are a variable number of collections per item. What problem are you looking to solve with the CSV export?
  • Emiliano -

    The use case I am working on is that I would like to use the CSV file as input to report generator software where the input options are either a URL link to an SQL/MySQL database, or a CSV file.

    Yes, the issue of multiple tags or multiple collections per item is something I need to resolve. At the moment, I am exploring whether the report generator could parse Tag A; Tag B; Tag C and Collection A; Collection B; Collection C to create multiple entries in the report. Alternatively it would be helpful if a new translator could perform this function of creating multiple entries in the report.
  • If the report only reads CSV, that's what you're stuck with I guess.

    Translators can generate pretty much any text-based format. If you directly want to generate a report rather than passing it through the report generator you have (which, if I may ask?), generating HTML is likely to be the easiest route.
  • edited February 11, 2019
    The report generator is extremely flexible and ideal for my reporting needs. It would be an enormous job to create an equivalent HTML report from Zotero with similar flexibility.

    The report generator is:

    https://www.seektable.com

    I think it would be immense work to create a report such as this with Zotero:

    http://test.reference.solutions/

    Plus the report generator can take this data and create pivot tables by aggregating the data in various fields.

    Emiliano - would you be interested in the project for hire to create such a translator?


  • That particular report at http://test.reference.solutions/ doesn't look too complicated, but using seektable will give you more flexibility.

  • Thanks Emiliano - the "Seektable Translator" you wrote works perfect!

    https://github.com/retorquere/zotero-seektable-export/releases/tag/v0.0.7

  • Hi Emiliano -- as SeekTable's founder, also want to thank you for the 'translator' as it solves the problem of building reports by Zotero's CSV export that contains multiple values per column.

    For now SeekTable cannot handle columns like that on its side.
  • You can thank @rkaplan -- it's he who specced this out, and left me a nice bonus for the effort.

    If SeekTable were to be able to read flat ODS, it would be possible to add the multi-valued data to separate spreadsheet tabs... or perhaps something like a MongoDB JSON dump. Anything that's plain-text can be generated easily with exporters. Binary is not technically impossible but nobody sane would want to go there (IOW, please don't ask, I might be tempted).
Sign In or Register to comment.