speaking of shells...

2005-01-05 Thread Nicholas Thornton
Speaking of commandline utilities for traditionally
GUI things... I've been wanting to create a
commandline interface to airport for a while.
Something that gives access to the same functionality
as that airport icon in the apple bar-- in particular
the ability to turn airport on and off (for login and
logout init scripts). I was wondering first if
something like this is already out there? And second
what process would I be sending appleevents to, i.e.
what to I need to make a glue for? Or does the utility
that controls such things not accept appleevents, if
so is there another way to communicate with it?

live well,
~wren




__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail


Re: Using on non-filehandles

2003-10-21 Thread Nicholas Thornton
--- Thilo Planz [EMAIL PROTECTED] wrote:
 Okay, in that case you probably know what you are
 doing.

Sometimes I like to think so ;)  Yeah, If I'm looking
for how to do X the first place I look is usually
CPAN; If I know how to do it I'll sometimes still look
on CPAN. One of the things that's kept me from using
modules on CPAN is that until recently I've had a poor
grasp on OOP in Perl, and many OO modules are... ill
defined unless you're quite fammiliar with the jargon.

I'll take a look at Template-Toolkit to see if it
meets my needs. Right now the two biggest features I'm
looking for are (1) accepting functions for values
(i.e. accepting the return of get() as a valid thing
to interpolate); this way the actual variables etc are
hidden behind a black box in case I want to change
them, and (2) being able to parse a single file into
multiple sections (header, footer, etc) so that I can
do something akin to print header; for(){print
entry} print footer; as well as other combinations.
The module I've got so far takes text, and splits it
based on Begin/EndSection metalanguage and when
interpolating it runs eval on anything between
Begin/EndPerl metalanguage; so far this works well
enough.

cheers,
~wren

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


Re: Using on non-filehandles

2003-10-21 Thread Nicholas Thornton

--- Randal L. Schwartz [EMAIL PROTECTED]
wrote:
 While that's an admirable goal, allow me to
 challenge that on
 a few points.

will take a look at Template-Toolkit/

Does it change matters if I point out that I'm not
intending to publish the module, but rather just use
it for personal convenience? (There are a few programs
I'm going to write to generate different parts of my
website from databases, and they'll all be basically
the same xml2html interface. I'm not sure if I brought
this up in a previous mail or not.)

But yes, there definately is feature creep. That's
actually one of the reasons I'm flat out scratching
the old version of the program (which was much
ammended) and rewriting it from scratch with a new
approach. One part of this new approach is making it
so that all the calls for data run through the black
box get(); that way, if I decide to use a different
XML module, or decide to rearrange variables, or
rename them, or whatever, that doesn't affect the
templates at all, and doesn't affect many parts of the
program outside of that subroutine.

cheers,
~wren

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


Simple cross-platform XML?

2003-09-30 Thread Nicholas Thornton
I'm working on a script that takes a database and a
template and from them generates a bunch of HTML. The
pages don't need changing frequently (once every 4-6
months) and so the program is not actually a CGI. Long
story short, The script, database, and template all
have to be 100% cross-platformable and setting up the
script so it works needs to take a minimum of effort.
(The files and their maintenence will be handed off
every 0.5-4 years, so anticipating the future it needs
to be easily grokked by non-geeks.)

This makes either tab/return-delimited or XML the
databases of choice (so far as I see it). The former
has limitations insofar as long entries or very many
entries. Unfortunately, setting up expat and the other
backing for standard XML modules is complicated to me,
let alone someone who doesn't know computers. Is there
an XML module I've missed? Or some way I can fake
using XML in a modular enough way that I can swap in
real XML code in the future?

~wren

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


Re: Simple cross-platform XML?

2003-09-30 Thread Nicholas Thornton
--- Rich Morin [EMAIL PROTECTED] wrote:
 You might want to look at YAML
 (http://www.yaml.org).  Also, there are
 pure-perl XML parsers, if you don't need a lot of
 speed.

Cool thanks. I'll check it out. As long as speed
scales linearly (or close enough for a couple thousand
fields) it shouldn't be too much of a problem. 

~wren

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


Re: [OT] OSX privileges question

2003-09-25 Thread Nicholas Thornton

--- Joel Rees [EMAIL PROTECTED] wrote:
 This is one of the typical reasons people turn to
 DBMSs. PostGreSQL
 would likely be overkill, but MySQL or perhaps even
 Apple's own FM might
 help. (I'm pretty sure FM allows storing documents,
 but I've never done
 it myself.)

I might look into it. Sounds like a pretty big change,
which I'm not sure will go over so well. It'd prolly
also take some time to set up which is difficult to
get since we're running 24/7. I think I might end up
just setting all folders to r-x excepting the ones
which directly contain files which I'll leave rwx. Not
as tight a straitjacket as I was hoping, but it'll
have to do.

 FileMaker Pro should never be used in the way you I
 think you are
 describing. What you need to do there is run the
[...]
 Or, at least, that's what I've heard on the 
 'Filemaker Experts'
 [EMAIL PROTECTED]
 list. You might want to sign on there for a while.

Thanks for the advice. I'll have to check it out.
There're a few other things I'd like to muck around
with in FMP too.

~wren

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


Re: [OT] OSX privileges question

2003-09-24 Thread Nicholas Thornton
--- Rich Morin [EMAIL PROTECTED] wrote:
 Let's back up a bit.  Explain, in more abstract
 terms, what you're
 trying to accomplish.  That may allow enough wiggle
 room to allow
 a Unixish solution.

In short, I'm trying to make information within files
accessable and modifiable, but keep the organization
of the files unalterable.

On the old computer we had some serious problems with
people saving files in the wrong places, moving things
around because they didn't like where they were (then
other people either moving them back or creating a
copy), making copies of files but only updating one of
those copies (or worse making some uptades to one
copy, others to another), etc.

It's my job to prevent this from happening to the new
computer. Even though I'll be cleaning the system out
once a week or so, it'd be nice to set up some
preemptive measures. The dispatchers obviously need to
be able to read the files; often they'll need to
update them. It'd be nice to prevent creating new
files in unsanctioned places and prevent dispatchers
from reorganizing the folders/files willie-nillie.
Does that help give you a better idea of my goals?

--- Ken Williams [EMAIL PROTECTED] wrote:
 It shouldn't prohibit them from making changes,
 unless the editing 
 tools they're using are trying to overwrite the
 entire file (or create 
 a temporary file then replace the original) rather
 than just modifying 
 it.

That may very well be the problem. I'll have to
investigate it further. The primary tools they use are
MS Office and FileMaker Pro (though this might change
with the migration to OSX)


--- James Reynolds [EMAIL PROTECTED] wrote:
 What is the file?  Perhaps there is a workaround. 
[...]
 Also, have you considered aliases or symlinks?

There are a bunch of files; predominately Word, Excel,
and FMP files. I hadn't considered aliases. Might be
able to do that...

--- Joel Rees [EMAIL PROTECTED] wrote:
 That sure isn't the way I understand it. I'll check
 when I get a chance
 whether that's the effect on Mac OS X. Are you
 trying to use the GUI
 File Info interface from Finder, instead of
 chmod/chown, perhaps?

Nope, I'm using chmod/chown. The GUI interface hides
access to the executable value so I hadn't bothered
with it.

~wren

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


[OT] OSX privileges question

2003-09-22 Thread Nicholas Thornton
So I've been put in charge of setting up and
maintaining our department's new dispatch/switchboard
computer. In trying to keep it clean and in order, I
was hoping, if possible, to be able to give users
read/write access to information in files themselves,
but to block them from renaming the files or moving
them.

I tried giving r-x access to a folder and rwx access
to the file inside. This lets them open the file and
prohibits them from moving/renaming it, but prohibits
them from saving any changes (because they can't write
to the folder).

Is this an impossible feat I'm hoping for? If not,
then how could I go about it? 

~wren

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com