Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Perfect web archive script - help needed
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Krzysztof M.  
View profile  
 More options Mar 10 2009, 6:01 am
From: "Krzysztof M." <majkr...@gmail.com>
Date: Tue, 10 Mar 2009 11:01:55 +0100
Local: Tues, Mar 10 2009 6:01 am
Subject: Perfect web archive script - help needed

Hello,
I've been using this script for a while to store webarchives in YJ,  
but I'd like to extend it to has also the possibility to add a comment  
to the item (maybe together with the a tag in one dialog box) and also  
wrap it up with a growl notification when the import to YJ is done.  
Maybe somebody can help me with that or already have this kind of  
script.

set res to (display dialog "Add tag to item?" default answer ""  
buttons {"No", "Yes"} default button 2)

if button returned of res is "Yes" then
        set res to text returned of res
        set flg to false
else
        set flg to true
end if

tell application "Safari"
        set theURL to URL of document 1
        set theName to name of document 1
end tell

tell application "Yojimbo"
        if flg then
                make new web archive item with contents theURL with properties  
{name:theName, flagged:flg}
        else
                set itmID to (make new web archive item with contents theURL with  
properties {name:theName, flagged:flg})
                add tags res to itmID
        end if
end tell

I am not sure about GROWL, but maybe notification might look like that?

on tellGrowl(itmID, theName, theURL) -- the growl notification routine
        global growlIsRunning
        if growlIsRunning then -- is growl running?
                tell application "GrowlHelperApp"
                        notify with name itmID title theName description theURL application  
name appName with sticky
                end tell
        end if
end tellGrowl

--
Krzysztof M.
Blog: http://my.opera.com/mkrzych

  smime.p7s
2K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Krzysztof M.  
View profile  
 More options Mar 10 2009, 8:43 am
From: "Krzysztof M." <majkr...@gmail.com>
Date: Tue, 10 Mar 2009 13:43:24 +0100
Local: Tues, Mar 10 2009 8:43 am
Subject: Re: Perfect web archive script - help needed

I have something like this. But I'd like to add also the comments (or  
leave it blank) to the webarchive in the same dialog box as the tag.  
How to do it:

(*
Import front Safari tab to the Yojimbo as a webarchive.
Modifications by email:majkr...@gmail.com
http://my.opera.com/mkrzych
*)
set res to (display dialog "Add tag to item?" default answer ""  
buttons {"No", "Yes"} default button 2)

tell application "GrowlHelperApp"
        set the allNotificationsList to {"Success Notification", "Failure  
Notification"}
        set the enabledNotificationsList to {"Success Notification", "Failure  
Notification"}

        register as application ¬
                "Web archive to Yojimbo Script" all notifications  
allNotificationsList ¬
                default notifications enabledNotificationsList ¬
                icon of application "Yojimbo"
end tell

if button returned of res is "Yes" then
        set res to text returned of res
        set flg to false
else
        set res to "toclean"
        set flg to false
end if

tell application "Safari"
        set theURL to URL of document 1
        set theName to name of document 1
end tell

tell application "Yojimbo"
        try
                if flg then
                        make new web archive item with contents theURL with properties  
{name:theName}
                        tell application "GrowlHelperApp"
                                notify with name ¬
                                        "Success Notification" title "Import Success w/o TAG" description  
"Successfully imported \"" & theURL & ¬
                                        "\" to Yojimbo" application name "Web archive to Yojimbo Script"
                        end tell
                else
                        set itmID to (make new web archive item with contents theURL with  
properties {name:theName, flagged:flg})
                        add tags res to itmID
                        tell application "GrowlHelperApp"
                                notify with name ¬
                                        "Success Notification" title "Import Success" description  
"Successfully imported \"" & theURL & ¬
                                        "\" to Yojimbo" application name "Web archive to Yojimbo Script"
                        end tell
                end if
        on error error_message number error_number
                tell application "GrowlHelperApp"
                        notify with name ¬
                                "Success Notification" title ¬
                                "IMPORT FAILED!" description "FAILED to import \"" & theURL & ¬
                                "\" to Yojimbo.  Error: " & error_message application name "Web  
archive to Yojimbo Script"
                end tell
        end try
end tell

On 2009-03-10, at 11:01, Krzysztof M. wrote:

  smime.p7s
2K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rickdude  
View profile  
 More options Mar 11 2009, 10:20 pm
From: rickdude <rickla.r...@gmail.com>
Date: Wed, 11 Mar 2009 19:20:25 -0700 (PDT)
Local: Wed, Mar 11 2009 10:20 pm
Subject: Re: Perfect web archive script - help needed
Cool stuff. But I notice that entering multiple tags (comma delimited)
results in one long mega-tag. Is there any way of making the script
behave like the Yojimbo bookmarklets, where comma-delimited words
become multiple tags?

On Mar 10, 9:43 pm, "Krzysztof M." <majkr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Krzysztof M.  
View profile  
 More options Mar 12 2009, 4:34 pm
From: "Krzysztof M." <majkr...@gmail.com>
Date: Thu, 12 Mar 2009 21:34:16 +0100
Local: Thurs, Mar 12 2009 4:34 pm
Subject: Re: Perfect web archive script - help needed

Well, I am not so good at scripts yet. So maybe somebody can help us  
to extend this useful script?

On 2009-03-12, at 03:20, rickdude wrote:

--
Krzysztof M.
Blog: http://my.opera.com/mkrzych

  smime.p7s
2K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »