Initial import.
This commit is contained in:
commit
76e2008e54
28 changed files with 1162 additions and 0 deletions
145
Channel/Channel.xml
Normal file
145
Channel/Channel.xml
Normal file
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
SherlockRSS License
|
||||
|
||||
Copyright (c) 2004, Erik C. Thauvin (http://www.thauvin.net/erik/)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of the authors nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
-->
|
||||
|
||||
<channel>
|
||||
|
||||
<initialize language="JavaScript">
|
||||
|
||||
debug("----- Initializing the data store -----");
|
||||
|
||||
/* Set the channel's minimum size */
|
||||
DataStore.Set("Internet.minViewSize", "{width=310; height=260}");
|
||||
|
||||
/* Update the data store representation of the search field as the
|
||||
user types into it. This way, if they click the search button
|
||||
before hitting return, the data store will reflect the latest
|
||||
changes made by the user.
|
||||
*/
|
||||
DataStore.Set("Internet.MainQueryField.updateValueOnTextChanged", true);
|
||||
|
||||
/* Customize the NSTableView a bit */
|
||||
DataStore.Set("Internet.SearchResultsTable.pasteboardTypes.NSStringPboardType", "description.URL.objectValue");
|
||||
DataStore.Set("Internet.SearchResultsTable.pasteboardTypes.NSURLPboardType", "doubleClickURL");
|
||||
DataStore.Set("Internet.SearchResultsTable.visibleDragColumns", "description");
|
||||
DataStore.Set("Internet.NoItemsFound.objectValue", "");
|
||||
|
||||
/* Initialize this with an empty document, so it fills in with white */
|
||||
DataStore.Set("Internet.DetailHTMLView.htmlData", "");
|
||||
</initialize>
|
||||
|
||||
<triggers>
|
||||
|
||||
|
||||
<trigger path="Internet.didInstall" language="JavaScript">
|
||||
|
||||
debug("----- Channel did install -----");
|
||||
|
||||
/* Set a default value in the search field */
|
||||
// DataStore.Set("Internet.MainQueryField.objectValue", "");
|
||||
</trigger>
|
||||
|
||||
|
||||
<trigger path="Internet.SearchButton.action" language="JavaScript">
|
||||
|
||||
debug("----- User clicked the search button -----");
|
||||
|
||||
/* Clear out the previous results */
|
||||
DataStore.Set("Internet.SearchResultsTable.dataValue", null);
|
||||
|
||||
/* Indicate that a search is about to take place */
|
||||
DataStore.Set("Internet.NetworkArrows.animating", true);
|
||||
|
||||
|
||||
/* Kick off the search. Searches are usually done in XQuery, since
|
||||
it has better data parsing/manipulating characteristics than
|
||||
JavaScript.
|
||||
*/
|
||||
DataStore.Notify("DATA.action.performSearch");
|
||||
</trigger>
|
||||
|
||||
<trigger path="DATA.action.performSearch" language="XQuery"
|
||||
inputs="query=Internet.MainQueryField.objectValue">
|
||||
|
||||
let $log := msg("----- Performing the search -----")
|
||||
let $log := msg("----- Query: ", $query)
|
||||
|
||||
let $httpRequest := http-request($query)
|
||||
let $rss:= http-request-value($httpRequest, "DATA")
|
||||
let $results := for $item in $rss/rss/channel/item
|
||||
return dictionary(
|
||||
("description", $item/title/text()/convert-html(.)),
|
||||
("doubleClickURL", $item/link/text()/convert-html(.))
|
||||
)
|
||||
|
||||
{-- From the trigger, return a dictionary with key/value pairs representing
|
||||
data store locations and their values.
|
||||
--}
|
||||
return dictionary(
|
||||
("Internet.SearchResultsTable.dataValue", $results),
|
||||
("Internet.SearchResultsTable.selectedRows", null()),
|
||||
("Internet.NetworkArrows.animating", false()),
|
||||
("Internet.NoItemsFound.objectValue", if ($results) then "" else "No items found.")
|
||||
)
|
||||
</trigger>
|
||||
|
||||
<trigger language="JavaScript" path="URL.complete">
|
||||
query = DataStore.Get("URL.query");
|
||||
if (query)
|
||||
{
|
||||
DataStore.Set("Internet.MainQueryField.objectValue", query);
|
||||
DataStore.Set("Internet.NetworkArrows.animating", true);
|
||||
DataStore.Notify("DATA.action.performSearch");
|
||||
}
|
||||
</trigger>
|
||||
|
||||
<trigger path="Internet.SearchResultsTable" language="XQuery"
|
||||
inputs="tableRows=Internet.SearchResultsTable.dataValue, selectedRows=Internet.SearchResultsTable.selectedRows"
|
||||
output="Internet.DetailHTMLView.url" task="true">
|
||||
{-- If any aspect of the results table changes (.dataValue, or .selectedRows) --}
|
||||
{-- we want to trigger an update of the detail view. --}
|
||||
|
||||
let $selectedItem := if (exists($selectedRows)) then
|
||||
$tableRows[1+$selectedRows]
|
||||
else
|
||||
null()
|
||||
|
||||
return $selectedItem/doubleClickURL
|
||||
</trigger>
|
||||
|
||||
</triggers>
|
||||
|
||||
</channel>
|
||||
|
BIN
Channel/en.lproj/Channel.nib/CVS.tiff
Normal file
BIN
Channel/en.lproj/Channel.nib/CVS.tiff
Normal file
Binary file not shown.
45
Channel/en.lproj/Channel.nib/classes.nib
generated
Normal file
45
Channel/en.lproj/Channel.nib/classes.nib
generated
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{CLASS = Aqua2SplitView; LANGUAGE = ObjC; SUPERCLASS = NSSplitView; },
|
||||
{CLASS = ColorView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{
|
||||
CLASS = ElasticMatrix;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {dataSource = id; };
|
||||
SUPERCLASS = NSMatrix;
|
||||
},
|
||||
{
|
||||
ACTIONS = {makeFontBigger = id; makeFontSmaller = id; print = id; };
|
||||
CLASS = HTMLView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{CLASS = NSObject; LANGUAGE = ObjC; },
|
||||
{
|
||||
ACTIONS = {clear = id; };
|
||||
CLASS = NSTableViewWithDraggableItems;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSTableView;
|
||||
},
|
||||
{CLASS = RankCell; LANGUAGE = ObjC; SUPERCLASS = NSActionCell; },
|
||||
{
|
||||
CLASS = SherlockChannel;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {channelView = NSView; thumbnailCell = NSView; };
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
ACTIONS = {clear = id; };
|
||||
CLASS = SherlockNSTableView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSTableView;
|
||||
},
|
||||
{
|
||||
ACTIONS = {startAnimation = id; stopAnimation = id; };
|
||||
CLASS = SpinningArrows;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSView;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
BIN
Channel/en.lproj/Channel.nib/classes.nib.tiff
Normal file
BIN
Channel/en.lproj/Channel.nib/classes.nib.tiff
Normal file
Binary file not shown.
10
Channel/en.lproj/Channel.nib/data.dependency
Normal file
10
Channel/en.lproj/Channel.nib/data.dependency
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBPaletteDependency</key>
|
||||
<array>
|
||||
<string>Sherlock</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
BIN
Channel/en.lproj/Channel.nib/data.dependency.tiff
Normal file
BIN
Channel/en.lproj/Channel.nib/data.dependency.tiff
Normal file
Binary file not shown.
34
Channel/en.lproj/Channel.nib/info.nib
generated
Normal file
34
Channel/en.lproj/Channel.nib/info.nib
generated
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>186 -55 397 423 0 0 1152 746 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>5</key>
|
||||
<string>238 230 547 506 0 0 1024 746 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>364.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>7H63</string>
|
||||
<key>IBUserGuides</key>
|
||||
<dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>guideLocations</key>
|
||||
<array>
|
||||
<string>Horizontal:459.000000</string>
|
||||
<string>Horizontal:268.000000</string>
|
||||
</array>
|
||||
<key>guidesLocked</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
BIN
Channel/en.lproj/Channel.nib/info.nib.tiff
Normal file
BIN
Channel/en.lproj/Channel.nib/info.nib.tiff
Normal file
Binary file not shown.
BIN
Channel/en.lproj/Channel.nib/objects.nib
generated
Normal file
BIN
Channel/en.lproj/Channel.nib/objects.nib
generated
Normal file
Binary file not shown.
BIN
Channel/en.lproj/Channel.nib/objects.nib.tiff
Normal file
BIN
Channel/en.lproj/Channel.nib/objects.nib.tiff
Normal file
Binary file not shown.
BIN
Channel/en.lproj/Channel~.nib/CVS.tiff
Normal file
BIN
Channel/en.lproj/Channel~.nib/CVS.tiff
Normal file
Binary file not shown.
45
Channel/en.lproj/Channel~.nib/classes.nib
generated
Normal file
45
Channel/en.lproj/Channel~.nib/classes.nib
generated
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{CLASS = Aqua2SplitView; LANGUAGE = ObjC; SUPERCLASS = NSSplitView; },
|
||||
{CLASS = ColorView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{
|
||||
CLASS = ElasticMatrix;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {dataSource = id; };
|
||||
SUPERCLASS = NSMatrix;
|
||||
},
|
||||
{
|
||||
ACTIONS = {makeFontBigger = id; makeFontSmaller = id; print = id; };
|
||||
CLASS = HTMLView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{CLASS = NSObject; LANGUAGE = ObjC; },
|
||||
{
|
||||
ACTIONS = {clear = id; };
|
||||
CLASS = NSTableViewWithDraggableItems;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSTableView;
|
||||
},
|
||||
{CLASS = RankCell; LANGUAGE = ObjC; SUPERCLASS = NSActionCell; },
|
||||
{
|
||||
CLASS = SherlockChannel;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {channelView = NSView; thumbnailCell = NSView; };
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
ACTIONS = {clear = id; };
|
||||
CLASS = SherlockNSTableView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSTableView;
|
||||
},
|
||||
{
|
||||
ACTIONS = {startAnimation = id; stopAnimation = id; };
|
||||
CLASS = SpinningArrows;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSView;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
BIN
Channel/en.lproj/Channel~.nib/classes.nib.tiff
Normal file
BIN
Channel/en.lproj/Channel~.nib/classes.nib.tiff
Normal file
Binary file not shown.
10
Channel/en.lproj/Channel~.nib/data.dependency
Normal file
10
Channel/en.lproj/Channel~.nib/data.dependency
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBPaletteDependency</key>
|
||||
<array>
|
||||
<string>Sherlock</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
BIN
Channel/en.lproj/Channel~.nib/data.dependency.tiff
Normal file
BIN
Channel/en.lproj/Channel~.nib/data.dependency.tiff
Normal file
Binary file not shown.
34
Channel/en.lproj/Channel~.nib/info.nib
generated
Normal file
34
Channel/en.lproj/Channel~.nib/info.nib
generated
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>186 -55 397 423 0 0 1152 746 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>5</key>
|
||||
<string>238 230 547 506 0 0 1024 746 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>364.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>7H63</string>
|
||||
<key>IBUserGuides</key>
|
||||
<dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>guideLocations</key>
|
||||
<array>
|
||||
<string>Horizontal:459.000000</string>
|
||||
<string>Horizontal:268.000000</string>
|
||||
</array>
|
||||
<key>guidesLocked</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
BIN
Channel/en.lproj/Channel~.nib/info.nib.tiff
Normal file
BIN
Channel/en.lproj/Channel~.nib/info.nib.tiff
Normal file
Binary file not shown.
BIN
Channel/en.lproj/Channel~.nib/objects.nib
generated
Normal file
BIN
Channel/en.lproj/Channel~.nib/objects.nib
generated
Normal file
Binary file not shown.
BIN
Channel/en.lproj/Channel~.nib/objects.nib.tiff
Normal file
BIN
Channel/en.lproj/Channel~.nib/objects.nib.tiff
Normal file
Binary file not shown.
10
Channel/en.lproj/LocalizedResources.plist
Normal file
10
Channel/en.lproj/LocalizedResources.plist
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>CHANNEL_NAME</key>
|
||||
<string>SherlockRSS</string>
|
||||
<key>CHANNEL_DESCRIPTION</key>
|
||||
<string>A simple RSS feed viewer.</string>
|
||||
</dict>
|
||||
</plist>
|
37
Channel/en.lproj/help.html
Normal file
37
Channel/en.lproj/help.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="content-type" CONTENT="text/html;charset=iso-8859-1">
|
||||
<TITLE>SherlockRSS Channel Help</TITLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#ffffff" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0">
|
||||
<DIV ALIGN="left">
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR ALIGN="left" VALIGN="top" HEIGHT="63">
|
||||
<TD ALIGN="left" VALIGN="top" WIDTH="4" HEIGHT="63"></TD>
|
||||
<TD ROWSPAN="2" VALIGN="bottom" WIDTH="250" HEIGHT="68"><FONT SIZE="5" FACE="Lucida Grande"><b>SherlockRSS Channel Help</b></font></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR VALIGN="top" HEIGHT="2">
|
||||
<TD WIDTH="14" HEIGHT="2"></TD>
|
||||
<TD WIDTH="46%" HEIGHT="2"><FONT SIZE="1"><hr></FONT></TD>
|
||||
</TR>
|
||||
<TR VALIGN="top">
|
||||
<TD WIDTH="14"></TD>
|
||||
<TD WIDTH="46%">
|
||||
<DIV ALIGN="left">
|
||||
<P>
|
||||
<FONT SIZE="4" FACE="Lucida Grande">About...</FONT>
|
||||
<BR><BR>
|
||||
<FONT SIZE="2" FACE="Lucida Grande">Use this Sherlock Channel to view RSS feeds.<br>Developed by <a href="http://www.thauvin.net/erik/">Erik C. Thauvin</a>.</FONT>
|
||||
</P>
|
||||
</DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</DIV>
|
||||
</BODY>
|
||||
|
||||
</HTML>
|
Loading…
Add table
Add a link
Reference in a new issue