For CSV Export, is there a complete list of "standard" (default) field names for each category?

jrlowell
jrlowell
Community Member

It would be helpful (especially for exporting to CSV) to know the standard field names that apply to the categories being exported. Certain field names are used in multiple categories and some are unique to a category. The default export to csv dialogue shows a basic set of [LOGIN] field names. The only other option is to select ALL field names and then delete the ones of no interest. It'd be a great enhancement to be able to select field names by one or more categories, or even better, to automatically include all non-empty field names in the selected items.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided
Referrer: forum-search:field name

Comments

  • AGAlumB
    AGAlumB
    1Password Alumni

    @jrlowell: We don't have anything like a CSV template for you to download. After all, a lot of us use many custom fields, often in lieu of the defaults. But you can accomplish the same thing by creating a new item of each type, and then exporting those together as CSV, since they will include the field names for each. Does that help?

  • jrlowell
    jrlowell
    Community Member

    Thanks, Brenty. That's pretty much what I ended up doing. BTW, there's an incorrect output bug in the export of the "height" field in the drivers license item if height is entered as x'y" using single & double quotes for feet & inches. Apparently the export does not handle the escaped " (\") correctly. [There's no defined datatype for height.] There also seems to be a problem with handling delimiters in the tags field.

  • jrlowell
    jrlowell
    Community Member

    I also found it confusing that the identical labels in the UI for different categories map to different internal field names in the csv export dialogue (e.g. "website" for a login item shows up as "URL" but "website" for a credit card and other items show up as "website(website)" in the csv export column header specifications.

  • MrC
    MrC
    Volunteer Moderator

    @jrlowell ,

    RE: URL and WEBSITE - these are likely results of old legacy choices for internal names, that can no longer be changed due to backwards compatibility requirements.

    May I ask - what are you ultimately trying to do?

  • jrlowell
    jrlowell
    Community Member

    Hi @MrC --- just trying to optimize a process for exporting a printable complete list of 1PW items. I like your onepif2html converter but I find the output less readable and manipulable than a spreadsheet. Ideally I'd like a separate csv/table/sheet for each type, similar to your converter sections.

    I have multiple vaults each containing items of multiple categories. I was thinking that once a quarter (or month, depending) I'd COPY each vault's items to a separate (temporary) "Print" vault and then use export to produce the desired output for each category (hence my need for the list of fieldnames by category). Any chance it's feasible to create a variant of your onepif2html XLT that outputs CSVs? I'd try tackling this myself if only I were fluent in perl & XSL:-) (BTW, are there any differences between the 3 versions of onepif2html in the converters folder?)

  • MrC
    MrC
    Volunteer Moderator

    @jrlowell ,

    I see, I was guessing that might be the case. I would abandon using 1Password's CSV export as your method.

    Two things (and you've guessed one of them):

    • We can customize the output to your liking.

    • There's nothing stopping us from outputting CSV or a tabular format with the converter. It was designed to be able to output data in any format (since it is all XML transformation driven). So a onepif2csv is possible.

    Regarding CSV output - CSV is not designed to have varying columns, but there's nothing wrong with having a table with multiple sections, each section defining its own CSV headers. It just won't be "proper" CSV.

    The two extra versions of onepif2html converter were one offs I'd created for other users. I'm doing this on an as-requested basis for now, and after I get enough requests, I'll start generalizing that converter. I take a lazy approach to implementing feature requests so that it the converter is almost entirely user-needs driven. I think one of them outputs the Notes section in multiple lines (vs. compressed into a single long line), and another eliminates the time stamps and some labels.

  • jrlowell
    jrlowell
    Community Member

    @MrC Onepif2csv would be ideal. How can I help?

  • MrC
    MrC
    Volunteer Moderator
    edited January 2017

    @jrlowell ,

    How about providing me with any requirements or ideas you have? Let's see what we can come up with. The more specific / precise the better (prevents wasted time re-writing code).

  • jrlowell
    jrlowell
    Community Member

    Will do. I'll send via email.

  • I've never seen anyone love interchange formats quite as much as @MrC does.

    Thank you for everything you do. You're awesome. :)

    Rick

  • MrC
    MrC
    Volunteer Moderator
    edited January 2017

    @jrlowell and I have been communicating via email. I now have a working 1PIF to CSV converter which will convert all the useful information into CSV.

    I heavily modified the onepif2html converter, renamed it to onepif, and it now uses any one of the specified formatters to convert and format the 1PIF data. One such formatter is csv (others are html_compact, html_expanded, html_simplelogins). More formatters can be aded, and a formatter can be an XLST (XML stylesheet transformations) or Perl module code.

    The relevant text from the Changes.txt file:

    Version 1.10:
    Changed:

    • onepif2html: renamed to onepif

    Fixed:

    • onepif2html: Prevent section names for empty sections from being output.

    New:

    • onepif: Replaces the former onepif2html converter. It now accepts the name of a "formatter"
      using the --format option. A few formatters are available in the Formatters directory. The default is html_compact. A formatter is specified using the --format option and the name of a formatter (its non-suffixed name, e.g. --format html_expanded). New formatters can be added as required by writing the code, naming them appropriatly, and placing them into the Formatters directory. Currently XLST (.xls) and Perl module (.pm) code is supported. The name of the formatter specifies its output format, its descriptive meaning, and the code employed in the file. The general naming scheme is <output format>_<descriptive name>.<code suffix>. For example, html_expanded.xls will output "html", create an .html file, and will be processed using XML stylesheet transformations (due to the .xsl suffix). Its descriptive part is simply "expanded" (one can argue that's not very descriptive). If there is no _<descriptive name> part in the filename, it is expected that the <output format> is sufficient to serve as the description as well (example: csv.pm will convert to CSV).

    • onepif: The XSTL stylesheets have been changed a bit, especially the html_expanded stylesheet (formerly the
      onepif2html2 converter). It is now more readable with larger fonts, and places the created and modified dates to the top right area of the item.

    • onpif: The --outfile option is now usable so the output file and suffix can be specfied via command line.
      File suffixes will be taken from the specified formatter's name.

    • onpif: Now outputs a file name of 1P_converted. where reflects the chosen formatter.
      Examples: 1P_converted.html, 1P_converted.csv.

  • AGAlumB
    AGAlumB
    1Password Alumni

    Holy cow! That's awesome! I was really confused earlier when I saw 1.10 instead of 1.09. Thanks for the update! :love:

This discussion has been closed.