AppleScript to Export Notes in OPML
Re: AppleScript to Export Notes in OPML
OK, no problems to leave it in if it helps some people. I wonder why they misspelled the <iimg> tag?
-
- Posts: 20
- Joined: Wed Feb 27, 2019 11:48 am
Re: AppleScript to Export Notes in OPML
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
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
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
https://github.com/iandol/bookends-tool ... pplescript
Re: AppleScript to Export Notes in OPML
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.
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
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.
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.
"If we knew what it was we were doing, it would not be called research, would it?"
Re: AppleScript to Export Notes in OPML
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
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).
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).
Last edited by mjvalente on Sun May 12, 2019 7:25 am, edited 1 time in total.
"If we knew what it was we were doing, it would not be called research, would it?"
Re: AppleScript to Export Notes in OPML
@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
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
"If we knew what it was we were doing, it would not be called research, would it?"
Re: AppleScript to Export Notes in OPML
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...
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
"If we knew what it was we were doing, it would not be called research, would it?"
Re: AppleScript to Export Notes in OPML
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
https://raw.githubusercontent.com/iando ... pplescript
Re: AppleScript to Export Notes in OPML
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:

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

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.
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:

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

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.
"If we knew what it was we were doing, it would not be called research, would it?"
Re: AppleScript to Export Notes in OPML
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:
Re: AppleScript to Export Notes in OPML
Now works for me...thanks!
Re: AppleScript to Export Notes in OPML
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):

I think I may have to take this issue to the DT3 developers.
"If we knew what it was we were doing, it would not be called research, would it?"