Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / August 2006



Tip: Looking for answers? Try searching our database.

iCal modules

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Schienle - 05 Aug 2006 15:19 GMT
Hi all -

I'm checking out modules for working with iCal. I want to scrape a  
financial calendar web site at <http://www.briefing.com/Investor/
Public/MarketAnalysis/Calendars/EconomicCalendar.htm> and put the  
dates into an iCal calendar. I checked <http://www.icalshare.com/>  
and there were a couple financial ones from previous years, but  
nothing current. Apple's iCal section on their site didn't have any  
financial calendars listed.

Does this exist already for this or a similar calendar?
Data::iCal looks like an appropriate module to use. Any pros/cons or  
more appropriate modules to consider?

If you'd like to subscribe to the resulting calendar when I'm done,  
just drop me a line. I'm creating the iCal calendar by hand at the  
moment, so it's already available.

Thanks for any ideas.

Mike Schienle
Michael - 06 Aug 2006 20:06 GMT
I once had to read ical-files and did so with Tie::iCal. I found  
there are plenty of Modules that deal with iCal and a lack of  
Documentation. Someone might even try without a module at all...

Now that you are describing your problem i wonder if there is a site  
that does just this kind of conversion...

Have you considered using an rss-feed? Probably you find something  
appropriate at www.syndic8.com

HTH

Am 05.08.2006 um 16:19 schrieb Mike Schienle:

> Hi all -
>
[quoted text clipped - 17 lines]
>
> Mike Schienle
Chris Nandor - 10 Aug 2006 04:45 GMT
> I'm checking out modules for working with iCal. I want to scrape a  
> financial calendar web site at <http://www.briefing.com/Investor/
> Public/MarketAnalysis/Calendars/EconomicCalendar.htm> and put the  
> dates into an iCal calendar.

For the latter part, you may wish to just use Mac::Glue to script iCal.  You
can create calendars, add new events, and so on.

Signature

Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Technology Group       pudge@ostg.com     http://ostg.com/

Mike Schienle - 10 Aug 2006 05:11 GMT
>> I'm checking out modules for working with iCal. I want to scrape a
>> financial calendar web site at <http://www.briefing.com/Investor/
[quoted text clipped - 4 lines]
> iCal.  You
> can create calendars, add new events, and so on.

Hi Chris -

Thanks for the suggestion, I didn't even consider that. The Mac::Glue  
installation process is definitely one of the more entertaining ones  
I've seen/heard. I just scanned through the module docs. I see in the  
ToDo list is "More examples (iCal, iPhoto, iTunes)". I don't suppose  
you have an iCal example laying around you've been waiting to put in  
there.

Thanks again.

Mike Schienle
Ricardo SIGNES - 10 Aug 2006 16:04 GMT
* Mike Schienle <mgs@customvisuals.com> [2006-08-10T00:11:07]
> Thanks for the suggestion, I didn't even consider that. The Mac::Glue  
> installation process is definitely one of the more entertaining ones  
> I've seen/heard. I just scanned through the module docs. I see in the  
> ToDo list is "More examples (iCal, iPhoto, iTunes)". I don't suppose  
> you have an iCal example laying around you've been waiting to put in  
> there.

This used to work, and probably still does, though I haven't used it lately for
obvious reasons:

 http://rjbs.manxome.org/hacks/perl/bdcal

Signature

rjbs

Mike Schienle - 10 Aug 2006 16:13 GMT
> * Mike Schienle <mgs@customvisuals.com> [2006-08-10T00:11:07]
>  
[quoted text clipped - 11 lines]
>   http://rjbs.manxome.org/hacks/perl/bdcal
>  

Thanks Ricardo. Seeing a little iCal syntax definitely helps. I found a
little touch of irony in this line :-)
die "nobody found!" unless @people;

Signature

Mike Schienle

John Delacour - 10 Aug 2006 19:03 GMT
>For the latter part, you may wish to just use Mac::Glue to script iCal.  You
>can create calendars, add new events, and so on.

Chris, where do I get glue for BBEdit and other things?  My glues
directory contains only these + the pods:

URL_Access_Scripting
FontSyncScripting
Finder
dialects
ColorSyncScripting
additions
TextCommands
System_Events
Keychain_Scripting
Image_Events

JD
Ricardo SIGNES - 10 Aug 2006 19:56 GMT
* John Delacour <JD@BD8.COM> [2006-08-10T14:03:05]

> >For the latter part, you may wish to just use Mac::Glue to script iCal.  
> >You
> >can create calendars, add new events, and so on.
>
> Chris, where do I get glue for BBEdit and other things?  My glues
> directory contains only these + the pods:

http://search.cpan.org/dist/Mac-Glue/Glue.pm#Creating_a_Glue

in short, "run gluemac"

Signature

rjbs

Chris Nandor - 10 Aug 2006 20:52 GMT
>>For the latter part, you may wish to just use Mac::Glue to script iCal.  You
>>can create calendars, add new events, and so on.
[quoted text clipped - 12 lines]
>Keychain_Scripting
>Image_Events

You simply need to run "gluemac /path/to/app".  You may need sudo, too.
For example:

    sudo gluemac /Applications/BBEdit.app

This creates the glue file and the POD file (which can be read with
"gluedoc BBEdit").

The ones you have by default are the two most common/important apps (Finder
and System Events), and some scripting additions.  All other apps, you have
to do yourself one time (and after upgrades too, if you wish).

Signature

Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Technology Group       pudge@ostg.com     http://ostg.com/

John Delacour - 10 Aug 2006 21:37 GMT
>>Chris, where do I get glue for BBEdit and other things?  My glues

>You simply need to run "gluemac /path/to/app".  You may need sudo, too.
>For example:
[quoted text clipped - 3 lines]
>This creates the glue file and the POD file (which can be read with
>"gluedoc BBEdit").

Ah!  That sounds terrific.  I guessed there must be some way to build
the glue, as in Frontier.

The only problem is that I get

        sudo: gluemac: command not found
        Eremita:~ jd$ man gluemac
        No manual entry for gluemac
        Eremita:~ jd$

so how do I get that working?  All my Mac::Carbon etc. stuff is fully
up to date so far as I know.

TIA

JD
Christian Huldt - 10 Aug 2006 22:30 GMT
10 aug 2006 kl. 22.37 skrev John Delacour:

>>> Chris, where do I get glue for BBEdit and other things?  My glues
>
[quoted text clipped - 19 lines]
> so how do I get that working?  All my Mac::Carbon etc. stuff is  
> fully up to date so far as I know.

sudo find / -name gluemac -print

gives me

/System/Library/Perl/Extras/bin/gluemac

Now, if /System/Library/Perl/Extras/bin should be added to the PATH  
or a symlink created in some other place is perhaps a matter of  
personal taste.
John Delacour - 10 Aug 2006 22:49 GMT
>sudo find / -name gluemac -print
>
[quoted text clipped - 5 lines]
>or a symlink created in some other place is perhaps a matter of
>personal taste.

Good!  All done now.  Thanks!

$ cd /System/Library/Perl/Extras/bin/
$ sudo ./gluemac /Applications/Eudora\ Application\ Folder/Eudora.app/
Password:
Making glue for '/Applications/Eudora Application Folder/Eudora.app/'
What is the glue name? [Eudora]:
Created and installed App glue for 'Eudora.app, v6.2.4b5' (Eudora)

JD
Ken Williams - 11 Aug 2006 02:55 GMT
> sudo find / -name gluemac -print

Heh - try this:

 locate gluemac

and see how much faster it is. =)

 -Ken
Peter N Lewis - 11 Aug 2006 04:51 GMT
>  locate gluemac

While on this topic, one of the first things I do to any newly
installed Mac that I will use is to move the locate database update
from weekly to daily and remove the "run as nobody" so it runs as
root (otherwise it does not see any of my own files!).

Add /etc/daily.local:

#!/bin/sh -
#
#       @(#)daily       8.2 (Berkeley) 1/25/94
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin

if [ -x /usr/libexec/locate.updatedb ]; then
    echo ""
    echo "Rebuilding locate database:"
    locdb=/var/db/locate.database
    touch "${locdb}"; chown nobody "${locdb}"; chmod 644 "${locdb}"
    # echo /usr/libexec/locate.updatedb | nice -5 su -fm nobody 2>&1
| sed -e '/Permission denied/d'
    /usr/libexec/locate.updatedb
    chmod 444 "${locdb}"
fi

Delete the locate.updatedb code from /etc/weekly (unfortunately, you
have to do this to avoid it clobbering the good database with the bad
database for up to one day a week).

After this, locate works like Spotlight should, ie finds everything,
finds it very fast.

Eg, "locate s3 | grep pdf" - find the Amazon S3 documentation (|
xargs bbedit for good measure ;-)

Enjoy,
   Peter.

Signature

Check out Interarchy 8.1.1, just released, now with Amazon S3 support.
<http://www.stairways.com/>  <http://download.stairways.com/>

Chris Nandor - 10 Aug 2006 23:09 GMT
>Ah!  That sounds terrific.  I guessed there must be some way to build
>the glue, as in Frontier.

Yeah, I borrowed a bunch of ideas from Frontier.

>The only problem is that I get
>
[quoted text clipped - 5 lines]
>so how do I get that working?  All my Mac::Carbon etc. stuff is fully
>up to date so far as I know.

If you are using the Mac::Carbon that comes with Tiger, then it is in
/System/Library/Perl/Extras/bin/.  If you installed it from the CPAN, then
... I dunno, it probably should be in your path.  It wouldn't hurt to
install latest Mac::Glue (and Mac::Carbon too), if you are using the one
that shipped with Tiger (esp. if you have an Intel Mac, since the one that
shipped doesn't work!).

Signature

Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Technology Group       pudge@ostg.com     http://ostg.com/

Wren Ng Thornton - 11 Aug 2006 00:30 GMT
--- quoth Chris Nandor:
> --- quoth John Delacour:
> >
[quoted text clipped - 4 lines]
> If you installed it from the CPAN, then
> ... I dunno, it probably should be in your path.

I seem to recall that it gets installed alongside the
modules so if you look in ...Mac/Glue/ there should be
a folder for the glues themselves but also a folder
for the scripts like gluemac. At least that's how it
used to work, I've been having troubles installing it
on the new intel mac so I can't say if that's still
the case.

Live well,
~wren

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
John Delacour - 11 Aug 2006 09:14 GMT
>>Ah!  That sounds terrific.  I guessed there must be some way to build
>>the glue, as in Frontier.
>
>Yeah, I borrowed a bunch of ideas from Frontier.

I'm trying to work out how to make a new message using the Perl glue
I've created for Eudora.  It's going to take me a little while to
adapt to the Perl syntax, so I hope you don't mind my asking a few
dumb questions.

In AppleScript it would be
     make message at end of mailbox ":Out"

and in the glue I made for Frontier the basic verb eudora.MS.new() is:

on new() {
    M = core.create ('CSOm', 'euMS', 0, 0, insertionloc ('end ',
['euMB'][":Out"]))}

What would the syntax be in Perl?

JD
Chris Nandor - 18 Aug 2006 16:33 GMT
> I'm trying to work out how to make a new message using the Perl glue
> I've created for Eudora.  It's going to take me a little while to
[quoted text clipped - 11 lines]
>
> What would the syntax be in Perl?

Sorry John, haven't read the list in a week.

Here's an example:

  use Mac::Glue ':all';  # get location()

  my $eudora = new Mac::Glue 'Eudora';
  my $box = $eudora->obj(mailbox => 'Out');
  my $mail = $eudora->make(
     new => 'message',
     at => location(end => $box)
  );

You can probably see how this compares:

  ['euMB'][":Out"] is like $eudora->obj(mailbox => 'Out')
  insertionloc('end ', ['euMB'][":Out"]) is like location(end => $box)
  core.create('CSOm', 'euMS', ...) is like $eudora->make(new => 'message')

etc.

The full example of creating, composing, and sending mail is in the
distribution, in ex/eudora_send_mail, along with a bunch of other examples.

Feel free to ask any such questions, though you might want to Cc: me when
you mail the list, since I only glance at the list about once a week or so.

Signature

Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Technology Group       pudge@ostg.com     http://ostg.com/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.