On Jun 14, 2009, at 1:40 PM, Nicholas Cole wrote:
> On Sun, Jun 14, 2009 at 10:51 AM, Christiaan
> Hofman<[email protected]> wrote:
>
>> Well, really the hard part is: how would a script know WHICH address
>> to fill in? Unless you have some very simple situation, you need a
>> human mind for that. The problem I have with your question is: what
>> part do you need help with, and what does your data look like? As I
>> don't have that information, so I just assume the most general
>> situation, which is just hard.
>
> Sorry for not being clear. My data is that I have volumes published
> mostly by University Presses. Except in a few cases (Oxford, for
> example, which publishes in New York and Oxford), most of these have a
> single address. I do realize this needs a human mind to do, but it
> would be very nice to be able to step through entries, say, which had
> a Princeton University Press publisher and ask if to fill in the
> address. But perhaps that is too specific to a problem I have
> caused myself! I think Applescript is the answer here!
>
If you have a predictable strategy to derive the address (for most
entries) that does not require human intervention (e.g. if the address
is determined by the Publisher) you can indeed use AppleScript for
this. You may then use smart groups to fill in a few entries for which
AppleScript could not make a decision. However if you need to manually
decide for every entry which address to choose, I just doubt that
AppleScript automation will get you any benefit, as it can only do the
selection for you that you can just as well (or better) do using a
smart group. So YMMV, it depends on your particular situation.
Here's a sample (typed in Mail, just as a sample, requires editing):
tell document 1 of application "BibDesk"
repeat with aPub in publications
tell aPub
if (type is "book") and (value of field "Address" is "")
set thePublisher to (get value of field
"Publisher")
if thePublisher is somePublisher then
set value of field "Address" someAddress
else if ...
...
end if
end if
end tell
end repeat
end tell
> A more general question, perhaps, is could Bibdesk have something like
> the iTunes interface, where if you select a group of entries you could
> edit the fields of one and have the change reflected in all of them?
>
> Best wishes,
>
> N
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users