Here, FWIW is a JavaScript for Automation version which aims for a little more flexibility by:
1. Allowing you to specify the target field name at the top of the script,
2. deciding how many zeros are needed at the start (target width) by looking for the highest digit count seen in the data,
3 ...
Search found 9 matches
- Mon Dec 11, 2023 7:04 am
- Forum: Looking for AppleScripts…
- Topic: Sorting Citations (from Dimensions.ai) in User14
- Replies: 4
- Views: 50363
- Thu Mar 02, 2023 5:15 pm
- Forum: Looking for AppleScripts…
- Topic: Getting a specific reference format using JXA
- Replies: 3
- Views: 25821
Re: Getting a specific reference format using JXA
The trick is to load the scripting library in Script Editor:
File > Open Dictionary... > Bookends
and change the language selector at the top from AppleScript to JavaScript.
Searching for format you will then see:
format PublicationItem or list of PublicationItem : The publication item(s ...
File > Open Dictionary... > Bookends
and change the language selector at the top from AppleScript to JavaScript.
Searching for format you will then see:
format PublicationItem or list of PublicationItem : The publication item(s ...
- Fri Sep 24, 2021 9:48 am
- Forum: Looking for AppleScripts…
- Topic: Importing from Delicious Library 3
- Replies: 0
- Views: 101668
Importing from Delicious Library 3
From Delicious Library 3 we can export a default XML file
File > Export To > Another Application > XML
The script below can convert:
an .xml file exported from DL3
to a .bex file (json content, importable to Bookends)
At the Bookends end, the menu path is:
File > Import References > From ...
File > Export To > Another Application > XML
The script below can convert:
an .xml file exported from DL3
to a .bex file (json content, importable to Bookends)
At the Bookends end, the menu path is:
File > Import References > From ...
- Fri Sep 24, 2021 7:26 am
- Forum: Bookends
- Topic: Quickest route from Delicious Library 3 to Bookends ?
- Replies: 3
- Views: 5637
Re: Quickest route from Delicious Library 3 to Bookends ?
This is what I did in the end (JavaScript for Automation)
(Probably a niche use case, so I haven't generalised it for others with file-choosing dialogs etc,
but certainly could, if anyone else might find that useful)
(() => {
"use strict";
const main = () => {
const
fpDL3xml = "~/Desktop ...
(Probably a niche use case, so I haven't generalised it for others with file-choosing dialogs etc,
but certainly could, if anyone else might find that useful)
(() => {
"use strict";
const main = () => {
const
fpDL3xml = "~/Desktop ...
- Thu Sep 23, 2021 5:25 pm
- Forum: Bookends
- Topic: Quickest route from Delicious Library 3 to Bookends ?
- Replies: 3
- Views: 5637
Quickest route from Delicious Library 3 to Bookends ?
Before I draft a script to write out Bookends JSON from DL3 plists,
is there a better route that I have missed ?
(Delicious Library 3 doesn't seem to export BibTeX, which was a previous route)
is there a better route that I have missed ?
(Delicious Library 3 doesn't seem to export BibTeX, which was a previous route)
- Thu Sep 23, 2021 4:57 pm
- Forum: Bookends
- Topic: The new bundle id is ?
- Replies: 1
- Views: 4321
The new bundle id is ?
Your Ver 14 announcement mentions (but doesn't, as far as I can see, specify) a new bundle id.
Could you confirm to us what it is ?
Some firewall software panics when it sees such a change, and it would be helpful to have confirmation somewhere of what the correct bundle id should now be.
Could you confirm to us what it is ?
Some firewall software panics when it sees such a change, and it would be helpful to have confirmation somewhere of what the correct bundle id should now be.
- Sun Oct 25, 2020 10:02 am
- Forum: Looking for AppleScripts…
- Topic: See what groups a publication belongs to.
- Replies: 1
- Views: 29112
Re: See what groups a publication belongs to.
Not sure if this is any faster (I would personally tend to do this in JS, which makes some of these things a bit easier and faster), but here FWIW is a variant approach in AppleScript:
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
-- Rob Trew @2020
on run ...
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
-- Rob Trew @2020
on run ...
- Tue Dec 20, 2016 4:30 pm
- Forum: Bookends
- Topic: Bookends Scripting with OS X Javascript Automation
- Replies: 13
- Views: 39424
Re: Bookends Scripting with OS X Javascript Automation
It works great! I am currently experimenting with it. Unfortunately, the Script Editor is not a very good IDE and the documentation for JXA is still abysmal. Feels quite immature as a technology. But holds great promise.
For an IDE, I tend to use Atom (free, excellent), with the Script and JS ...
For an IDE, I tend to use Atom (free, excellent), with the Script and JS ...
- Sun Jun 26, 2016 7:54 pm
- Forum: Bookends
- Topic: Bookends Scripting with OS X Javascript Automation
- Replies: 13
- Views: 39424
Re: Bookends Scripting with OS X Javascript Automation
With a couple of JavaScript helper functions – evalOSA and eventCode :
// evalOSA :: String -> String -> IO String
function evalOSA(strLang, strCode) {
var oScript = ($.OSAScript || (
ObjC.import('OSAKit'),
$.OSAScript))
.alloc.initWithSourceLanguage(
strCode, $.OSALanguage.languageForName ...
// evalOSA :: String -> String -> IO String
function evalOSA(strLang, strCode) {
var oScript = ($.OSAScript || (
ObjC.import('OSAKit'),
$.OSAScript))
.alloc.initWithSourceLanguage(
strCode, $.OSALanguage.languageForName ...