Re: Library Modules and Library Loaders
Re: Library Modules and Library Loaders
- Subject: Re: Library Modules and Library Loaders
- From: Philip Aker <email@hidden>
- Date: Thu, 2 Sep 2010 02:41:42 -0700
On 2010-09-01, at 09:24:53, Takaaki Naganoya wrote:
> I'm glad that you memorized my post :-)
Some very good points!
>> Put scripts in order or categolize them Automatically
>>
>> What are the 5 most common ways to categorize scripts?
> I hold the answer...
I looked at the Automator library list. That's a reasonable organization plus it has a search field. But maybe people have other ways they want to keep things organized or have a search result displayed.
> And I have a tiny idea to grant user's request.
> To Show the information about the Library, add " --info" string after the parameter.
A category called "Notes" is available in ModuleManager (could just as easily be called "Info"). If you compile the example projects you can see where they are added in the text view of the applications. An update version (0.5.1) is here: <http://www.vcn.bc.ca/~philip/mm/ModuleManager.html>. There is an ability to add custom key/value pairs.
> import "name/space --info"
> --> returns copyright notice string
> To browse the source code of the Library (if you can), add " --source" string after the parameter.
> import "name/space --source"
> --> returns source code (if you can)
>
> or
>
> --> returns URL on iBooks Store (if the contributor sell the source code commentary)
I have left room for extra kinds of information in the libraries. This is will probably be kept in the "Properties" container of each library.
For AppleScript, I think it would be more natural to have a parameter to a command rather than a shell script long option. Maybe something like:
library property for key "Copyright" in "name/space" from user module
library property for key "Source" in "name/space" from local module
library property for key "Website" in "name/space" -- from "any" module
I have been thinking about these things because there is a tradeoff between what is calculated at the time a script is registered into a library and what is calculated when a command like the above "library value for key …" is called. If the amount of information stored in the file is smaller, then it loads faster but other information has to be calculated at the time the command is run. Which is more efficient?
>> This might be the better way because then there would be no confusion as to what is Apple supplied and what is not.
> We can make a tool to rewrite AppleScript automatically (load script --> import).
That could be a solution to some problems. However we can't rewrite a run only script.
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden