Jump to content

Exporting/Pasting word search results to a spreadsheet


Jonathan Kiel

Recommended Posts

Hey everyone,

 

I've spent a few hours trying to figure out how to paste the results of a large word search to a spreadsheet and keep the references separate.

 

I've tried several different methods, but nothing seems to do what I need. Specifically, I want to run a word search and export the verses to a spreadsheet (LibreOffice or Excel) with the following columns:
Verse Reference -> Hebrew Verse -> English Verse.

 

I would think this would be easy. Am I missing something? Thanks for any help...


Oh... and for reference, I'm running version 10.4.5.

Link to comment
Share on other sites

***********************************

 

Well, I may have hit a breakthrough, but I still believe there is a better way.

Currently, I am searching for a word (נתן) with the range Gen-Deut.

I highlight the result and select "Save Text Selection -> RTF". (Plain text would work too.)

I paste the result in TextWrangler.

Then, I do a (GREP) find and replace, searching for "(:\d+)\b" and replacing with "\1\t". The first of these commands searches for a colon followed by a word unit - at least from what I can tell it does... The second line replaces that with the same word unit and a tab.

 

I take that file and open it in LibreOffice. Next, I repeat those steps for the English portion. Finally, I'll need to repeat everything for the other portions of the OT because you can't do more than 500 verses at a time.

 

This seems like an awful lot of work for trying to get what's on my screen into a spreadsheet. Anyone have another, easier method?

  • Like 1
Link to comment
Share on other sites

The FlashcordFileConverter does this basic thing, turning search results from an analysis window into a tab delim file. (Though, users have said it needs to be updated for Yosemite.)

I've never understood why Accordance hasn't added a tab delim save from the analysis window.

Link to comment
Share on other sites

The Analysis window actually does use tabs to delimit data. But, what the OP is trying to do is copy a long list of verses from the HMT text and have the verses tab delimited from the text of the verse. This is not currently an export option. But, a simple search/replace as attempted above will do it. You could also try this:

 

search: ^(\w+ \d+:\d+) +

replace: \1\t

Link to comment
Share on other sites

Usually on things like this I export to text files and process it all in Python. I'm slowly building Python utilities for handling verse references and Accordance export files.

 

You cannot to my knowledge get a single export file containing both the English and Hebrew text of verses in one file, with the possible exception of using the interlinear. If anyone knows of way please let me know. What you probably want is a way to export a pair of parallel panes with tabs between the texts for a given reference. This is a rather specific export example and a more general export enhancement would be better. So you are up for two files and then zipping them together by verse reference.

 

As to the 500 verse limit that appears to now be 1000 in Accordance 11. I believe it's there as a fair use limit with respect to copyright.

 

Thx

D

Link to comment
Share on other sites

Thanks for the input/help.

 

For now, I agree that Rick's answer is the easiest. Although, for me, the "simple" find and replace took a while to find. I didn't know you could search for strings.

 

Anyways, I think with find/replace I can piece together the data I need in 20-30 minutes per word. Going to take me a little while longer to read and analyze each one, though...

Link to comment
Share on other sites

The Analysis window actually does use tabs to delimit data.

Just a note, Rick. That the results include tabs does not make is a proper tab-delimited formatted result. The analysis window also uses headings (and +) to delimit results, hence the need for a complex parser.

Link to comment
Share on other sites

Agreed. I have been thinking for a while that we (those of us who want to post-process outside Acc) want a configurable TSV or CSV exporter that just produces rows. No headings, no indentation, probably not even styled text. I was going to write a proposal but haven't gotten to it yet.

 

thx

D

Link to comment
Share on other sites

I suggested it looong time ago. that's why I made my parser, and you yours, Daniel

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...