Page 3 of 4

Re: AppleScript to Export Notes in OPML

Posted: Wed Aug 09, 2017 10:57 am
by iandol
OK, no problems to leave it in if it helps some people. I wonder why they misspelled the <iimg> tag?

Re: AppleScript to Export Notes in OPML

Posted: Wed Feb 27, 2019 1:38 pm
by nickharambee
Hello,

I'm testing out this script for the first time and I am getting an error:

"error "Bookends got an error: Can’t set keywords to false." number -10006 from keywords"

Any ideas what I can do to fix this?

Thanks,

Nick

Re: AppleScript to Export Notes in OPML

Posted: Wed Feb 27, 2019 9:33 pm
by iandol
Which version of BE and the script are you using? I've tested the version in bookends tools (which I trigger with Alfred, but the underlying script is V1.18) and it is working as it used to with BE 13.2.

https://github.com/iandol/bookends-tool ... pplescript

Re: AppleScript to Export Notes in OPML

Posted: Sat Mar 09, 2019 6:59 pm
by aroddick
I seem to be having the same problem - can't seem to get the notes across to OPML, and will often get the keyword issue. I often also receive a brief message (that pops up for a few seconds) asking if I should "Remove Bookends Header ONLY note cards?"
EDIT: I was successfully using the V1.15 version up until recently (and really enjoying the ease of sending notes over to Devonthink through the OMPL). I did try using the Bookend Tools too, but the notes still don't make their way over to the desktop - just the bibl. info and the abstract.

Re: AppleScript to Export Notes in OPML

Posted: Sat May 11, 2019 12:22 pm
by mjvalente
Hi,

I have the same problem, but only when the field NOTES has something in it. If the that field is empty, I don't get the error message.

Maybe this will help to track the problem.

Re: AppleScript to Export Notes in OPML

Posted: Sat May 11, 2019 10:11 pm
by iandol
Hi, my refs have notes and export, can someone create a bookends database with references that fail and when I have time I can have a look.

Re: AppleScript to Export Notes in OPML

Posted: Sun May 12, 2019 6:41 am
by mjvalente
Here it goes a Library Test (and a screenshot of the error).

Download @ http://pc.cd/pKXotalK

Extra infos:
1. When there's the error message, an opml file is still produced. Strangely, I can import it to most programs, but DEVONthink (DT3 beta 1) does not accept it (no problems with any opml produced with no error).
2. The same problem happens with any opml (from an reference with notes) produced via Bookends Tools via "betoopml" even if no error message appears (i.e. DT3 does not importing the opml file from a reference with notes).

Re: AppleScript to Export Notes in OPML

Posted: Sun May 12, 2019 7:12 am
by mjvalente
@iandol:

A not real non sequitor request...

In your fantastic Bookends Tools for Alfred would it be possible to include a trigger to copy hypertext link as text?

For instance: beall → select item → some other modifier key → Copy hypertext link as text. Result: bookends://sonnysoftware.com/43066

Re: AppleScript to Export Notes in OPML

Posted: Sun May 12, 2019 8:30 pm
by iandol
Hi, I've made a small fix to toOPML script so it should now work:

https://github.com/iandol/bookends-tool ... tag/V1.3.2

Regarding copying the backlink, the problem I have is there are no modifier keys left to use! One possible solution is to use a workflow variable so that the behaviour of an existing modifier could be toggled, but it is a bit of a hacky solution. Open an issue on github and we can discuss it there...

Re: AppleScript to Export Notes in OPML

Posted: Mon May 13, 2019 6:52 am
by mjvalente
Thanks.

Would it be possible to update the BEtoOPML.scpt as well?

Re: AppleScript to Export Notes in OPML

Posted: Mon May 13, 2019 6:33 pm
by iandol
Updated the gist, although I am likely to keep the bookends-tool source always up-to-date and it is the same script:

https://raw.githubusercontent.com/iando ... pplescript

Re: AppleScript to Export Notes in OPML

Posted: Tue May 14, 2019 5:20 am
by mjvalente
Interestingly (and unfortunately) the 'notes' field is still producing different outputs.

Here's the end result (after importing the opml file to DEVONthink) of your new updated script (Script to Export Bookends Notes to OPML file v1.18/19) on a reference with SOME text on the notes field:

Image

Now the result with the same script on a reference with NO text on the notes field:

Image

To notice I used the same Bookends' item (#98546). I'm no expert in applescript at all, but some weird behavior re: the notes field is still happening. :(

- - - - - -

@iandol: I have no account on Github, but if you prefer, I can do one and indeed file an issue there.

Re: AppleScript to Export Notes in OPML

Posted: Tue May 14, 2019 7:50 pm
by iandol
But you are selecting different things in Scrivener in your screenshots, select the containing folder then press ⌘1 to get into Scrivenings mode to see parent and children in one go:
Screenshot 2019-05-15 at 07.43.07_SMALL.png
Screenshot 2019-05-15 at 07.43.07_SMALL.png (37.63 KiB) Viewed 86792 times

Re: AppleScript to Export Notes in OPML

Posted: Wed May 15, 2019 5:21 am
by aroddick
Now works for me...thanks!

Re: AppleScript to Export Notes in OPML

Posted: Wed May 15, 2019 3:37 pm
by mjvalente
iandol wrote: Tue May 14, 2019 7:50 pm But you are selecting different things in Scrivener in your screenshots, select the containing folder then press ⌘1 to get into Scrivenings mode to see parent and children in one go:
Actually what is happening is that DEVONthink 3 (which I was using in the comment above) imports the opml differently from Scrivener:

So, if a Bookends reference is exported via your applescript (or via betooplm) to DT3, what happens is the following:

(1) if the notes field is not with some text = imports correctly; but...
(2) if there's some text in the notes field = the general text itself is placed in the Finder comment area of DT3 and not in the main text.

Example of the 2):

Image

I think I may have to take this issue to the DT3 developers.