Unless I am mistaken, this will be impossible.
If you run the following script on the sample document you provided, you will
see that only two notes are associated with an underlying text selection.
tell application "Skim"
tell document 1
set theNotes to notes
set theNotesListOfRecords to {}
set i to 0
repeat with theNote in theNotes
if type of theNote is highlight note then
set i to i + 1
set theSelection to selection of theNote
set theText to (selection of theNote as string)
set theNoteRecord to {idx:i, sct:theSelection,
txt:theText}
copy theNoteRecord to end of
theNotesListOfRecords
end if
end repeat
return theNotesListOfRecords
end tell
end tell
Result:
{{idx:1, sct:{characters 3059 thru 3066 of text of page 1 of document
"digitalheritage2013_submission_278.pdf" of application "Skim"}, txt:"dharani
"}, {idx:2, sct:{}, txt:""}, {idx:3, sct:{characters 64 thru 115 of text of
page 2 of document "digitalheritage2013_submission_278.pdf" of application
"Skim"}, txt:"Semantic annotation and structuring of the 3D model
"}, {idx:4, sct:{}, txt:""}, {idx:5, sct:{}, txt:""}, {idx:6, sct:{}, txt:""},
{idx:7, sct:{}, txt:""}, {idx:8, sct:{}, txt:""}, {idx:9, sct:{}, txt:""},
{idx:10, sct:{}, txt:""}}
(Incidentally, those are the very same two notes on which the conversion
process actually works. So while it is true that the text of a highlight and
the text selection of a highlight note are conceptually different in Skim, the
conversion process is designed in a way to grab the text selection and set the
text of the highlight note to its text selection - at least if the text of the
highlight note would otherwise be empty)
Since it is impossible to get the text selection of a highlight from its bounds
alone (https://sourceforge.net/p/skim-app/mailman/message/27087915/), I don’t
see how the the text could be automatically grabbed.
On 4 Jun, 2014, at 14:30, Nicola Carboni <[email protected]> wrote:
> Ok, I will try to find a script.
> Thank you very much!
> Nicola
>
> On 04 Jun 2014, at 14:19, Christiaan Hofman <[email protected]> wrote:
>
>>
>> On Jun 4, 2014, at 14:12, Nicola Carboni wrote:
>>
>>> es I can see the text, and I can also extract it with
>>> https://www.sumnotes.net
>>> To investigate better, here you can find a sample of my PDF:
>>> https://dl.dropboxusercontent.com/u/32485/digitalheritage2013_submission_278.pdf
>>> Btw I use the last version of OSX and the newest version of Skim, and I
>>> already tried (unsuccessfully) to delete the preferences of the app.
>>>
>>
>> In 10.9 you cannot reset the prefs, at least not by deleting the prefs file.
>> They are cached somewhere else.
>>
>>> Thank you for your help!
>>> Nicola
>>>
>>>
>>> P.S. I just saw the Christiaan's mail
>>>
>>>> I said this many times here, so let me say it again. The text of the note
>>>> is not the same thing as the highlighted text, i.e. text in the PDF that
>>>> happens to be below the highlight. It's just that in Skim (unlike most
>>>> other programs) we set the text of the highlight to the highlighted text
>>>> (as best as we can figure that out.) What is exported is the text of the
>>>> note.
>>>
>>>
>>> Ok thanks. So, in very short terms, I cannot do it unless I make the
>>> highlight with skim, right?
>>>
>>
>> You could try using AppleScript to go over the notes and set the text to the
>> text of the selection. Or you could set it manually if there aren't too many.
>>
>> Christiaan
>>
>>> On 04 Jun 2014, at 13:59, Christiaan Hofman <[email protected]> wrote:
>>>
>>>>
>>>> On Jun 4, 2014, at 12:29, Nicola Carboni wrote:
>>>>
>>>>> Hi everyone,
>>>>> I would like to export my highlights in a text file, and I have some
>>>>> problems doing so.
>>>>> I usually highlight my papers on the iPad (PDF Expert), then sync with
>>>>> dropbox. I then open them with Skim, convert the notes, and then export
>>>>> them in a txt file. But the output is the following one:
>>>>>
>>>>> * Highlight, page 2
>>>>> * Highlight, page 2
>>>>> * Highlight, page 3
>>>>>
>>>>> Instead of the actual text!
>>>>> I tried with different PDF and I have the same problem.
>>>>> What I am doing wrong?
>>>>>
>>>>> Thanks in advance!
>>>>>
>>>>> Nicola
>>>>>
>>>>> P.s. the note are perfectly visible with Preview
>>>>
>>>> I said this many times here, so let me say it again. The text of the note
>>>> is not the same thing as the highlighted text, i.e. text in the PDF that
>>>> happens to be below the highlight. It's just that in Skim (unlike most
>>>> other programs) we set the text of the highlight to the highlighted text
>>>> (as best as we can figure that out.) What is exported is the text of the
>>>> note.
>>>>
>>>> Christiaan
>>
>> ------------------------------------------------------------------------------
>> Learn Graph Databases - Download FREE O'Reilly Book
>> "Graph Databases" is the definitive new guide to graph databases and their
>> applications. Written by three acclaimed leaders in the field,
>> this first edition is now available. Download your free book today!
>> http://p.sf.net/sfu/NeoTech_______________________________________________
>> Skim-app-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/skim-app-users
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech_______________________________________________
> Skim-app-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/skim-app-users
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Skim-app-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-users