Thanks, I missed that discussion. I've created a similar AppleScript below (not 
familiar with Python) that will take all open documents in Skim, convert the 
notes, then attempt to put the selected text into the note associated with each 
selection. It attempts to preserve notes that already exist by appending the 
selected text to the note, separated by a colon; if the note on a selection 
already contains the selection text, it skips it. It also does a little 
cleaning of selections, appending spaces and removing hyphens. It also SAVES 
the documents, so be careful, since if it accidentally overwrites older 
annotations, you're out of luck.

A complete workflow would automatically identify changed documents (synced back 
from iAnnotate, for example), open them in Skim, convert the notes, and close 
them again, but I haven't gotten any further than finding out that it's 
possible to launch actions from launchd, and that you could use Lingon to write 
launchd .plists (or at least you used to be able to do that...)

-AHM

tell application "Skim"
        repeat with _doc in documents
                convert notes _doc
                set _notes to notes of _doc
                repeat with _note in _notes
                        set _sel to selection of _note
                        if _sel is not missing value then
                                set _text to ""
                                repeat with _selpart in _sel
                                        set _text to _text & attribute run 1 of 
(get text for {_selpart})
                                        if character -1 of _text is "-" then
                                                set _text to characters 1 thru 
-2 of _text as string
                                        else
                                                set _text to _text & " "
                                        end if
                                end repeat
                                set _textalt to attribute run 1 of (get text 
for _sel)
                                set _annote to text of _note
                                if _annote is "" or _annote is _textalt then
                                        set text of _note to _text
                                else if _annote does not contain _text then
                                        set text of _note to _annote & ":" & 
_text
                                end if
                        end if
                end repeat
                save _doc
        end repeat
end tell

On 2010-07-20, at 12:16 AM, Charles Turner wrote:

> On Jul 19, 2010, at 6:59 PM, Matt Mollison wrote:
> 
>> Alex, If you figure this out (even using AppleScript), would you mind 
>> posting something about your iPad/Skim/BibDesk workflow either to this list
> 
> There was discussion of this right here on June 19th. I wrote an Applescript 
> to convert iAnnotate annotations to Skim formats. You can find it here:
> 
> <http://vze26m98.net/skim/skim-hilites.zip>
> 
> It's designed to be used with the frontmost window in Skim and converts three 
> note types, which can be fiddled with or commented out. As I described it to 
> a friend:
> 
> "The really important part is the extraction of text from the PDF hilite. 
> Otherwise, you get a Skim Note, but no text.
> 
> The "text note" formatting is just to make the iAnnotate notes look like the 
> Skim equivalent. You can adjust to taste, or comment out.
> 
> The final "anchored note" is an interesting one. Skim creates a note with a 
> title, and "extended text." Currently, the script just puts everything in the 
> title, but if you look at what's commented out, you can play with how the 
> text is apportioned."
> 
> Note that this could be modified for bulk conversion. Obviously, Skim would 
> have to be opened, but once it is, just open and close your list of PDFs.
> 
> I'd be happy to support this, with the usual caveats about backing up your 
> precious data, but I'll move the DL location in the next day...
> 
> HTH, Charles
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Skim-app-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/skim-app-users

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Skim-app-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-users

Reply via email to