Using a Spreadsheet for Mass Importing

Say I’ve photographed a 200-page journal and would like to save it in Tropy divided into 400 items. Some items will have several photos and some just one. Some photos will have just one journal entry and others will have several. I thought that using a spreadsheet to record a bunch of stuff would work well for me (because I could have columns like title, creator, date created, source, tags, file paths), then I could use this CSV To JSON Converter to create a JSON file, drop that into Tropy, and save myself a lot of time. I’ve had some success, but not as much as I’d like. Are there any instructions I could read to help me figure this out? I found this helpful, but possibly because I don’t know Python, I couldn’t make full use of it.

A Google Apps script could also be used, probably.

If you already have an intermediary CSV file you could try the CSV Plugin; if it does not cover functionality you need, I’d try to add it to the plugin.

My apologies, I just realized I was getting ahead of myself and that the CSV plugin does not do import yet. There are no easy instructions to follow, because there are too many possibilities of how you might want to map your CSV data to Tropy ultimately.

Here is how I would start: first decide how a single row of CSV should map to Tropy. The simplest case is if you have a single line of CSV, associated with a single photo and you want to map this line to a single item with one photo in Tropy. But obviously this can be more complex. Once you have an idea of how your rows map to items, I’d create the first item in Tropy by hand, fill-in all the metadata fields I’d like to import and then copy paste the item from Tropy into a text editor. This gives you a line of CSV data and the corresponding JSON structure. From there, I’d write a script to convert the other CSV rows – I’m happy to help with that part if you like.

1 Like

After realizing that the plugin wouldn’t work in this case, I hired someone to write a Python script that could convert a CSV into a JSON file that Tropy would understand. I find that I really like working this way when importing particular kinds of images.

I discovered this in the process too. Had the script writer been OK with it and had the script not been so customized to my particular project, I would have liked for it to have been published for others to use too.

1 Like