Fwd: The ShelveLogger How-To 01/09/2009 version 2.0

1 view
Skip to first unread message
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Silver Wav

unread,
Mar 15, 2010, 5:38:16 PM3/15/10
to shelve...@googlegroups.com
From: SilverWav <silv...@googlemail.com>
Date: Sun, Feb 7, 2010 at 6:04 PM
Subject: The ShelveLogger How-To 01/09/2009 version 2.0
To: Shelve Firefox Add-on <shelve-fir...@googlegroups.com>


Hi All just seen the change to Groups... could we add this as a Page?
http://forums.mozillazine.org/viewtopic.php?p=7384935#p7384935

ShelveLogger
Save a web page to disk and add its details to a log file from which
you can reopen it at any time.

The ShelveLogger How-To 01/09/2009 version 2.0
This takes about 10 minutes, all you do is create 1 folder, 1 file and
paste 7 times :-)

A mock-up: (The actual ShelveLogger.html is in a nice table format
with clickable links to the original url and the locally shelved
page).

Code: Select all
   DateTime                   Title
WWW    Local
   2008-08-13 23-13-18-581    Shelve :: Firefox Add-ons
url    local
   2009-08-12 22-12-39-422    Ubuntu removes _multisearch
url    local
                      clip    A new comment in Ubuntu's Launchpad
                              system shows that the controversial
   2009-08-28 09-06-30-118    New planet hints we're wrong
url    local
   2009-08-30 10-03-45-572    Windows 7 The simple version
url    local
   2009-08-31 22-06-22-557    Microsoft patches 19 bugs
url    local


GNU/Linux users will need to substitute their account name for
"[user]".
Windows users can copy and paste - no changes required.

Create Folder (GNU/Linux):

Code: Select all
   /home/[user]/data/Shelve/saved

GNU/Linux users: Substitute your account name for "user".
Create Folder (Windows):

Code: Select all
   c:\data\Shelve\saved


====================================
Install the Shelve Addon (Version 1.19)
https://addons.mozilla.org/en-US/firefo ... sions/8282
Restart Firefox.
====================================

Setup the addon in Firefox:
Tools > Addons > Extensions > Shelve > preferences
Dialogue Box [Shelve Preferences]
On the tab called "Shelves" > Click "New"

Dialogue Box [Shelve: Edit Shelf]
Fill in the following information:

On the tab called "Shelf"
=========================
Name:

Code: Select all
   ShelveLogger


Filename Template (GNU/Linux): *For an explanation see the note at the
end.

Code: Select all
   /home/[user]/data/Shelve/saved/%Y/%Y-%M-%D/%B/%Y-%M-%D_%h-%m-%s-
%l.html

GNU/Linux users: Substitute your account name for "user".
Filename Template (Windows): *For an explanation see the note at the
end.

Code: Select all
   c:\data\Shelve\saved\%Y\%Y-%M-%D\%B\%Y-%M-%D_%h-%m-%s-%l.html


MIME:

Code: Select all
   Web page, complete


Hotkey:

Code: Select all
   F8


On the tab called "Log"
=========================

Log file (GNU/Linux):

Code: Select all
   /home/[user]/data/Shelve/ShelveLogger.html

GNU/Linux users: Substitute your account name for "user".
Log file (Windows):

Code: Select all
   c:\data\Shelve\ShelveLogger.html


Template:

Code: Select all
      <tr><td nowrap="nowrap">
   %Y-%M-%D %h-%m-%s-%l</td><td class="title">%t</td>
       <td><a href="%u">url</a></td>
       <td><a href="%o">local</a></td></tr>
       <tr class="sup"><td class="label">clip</td><td colspan="3">%
{clip?}</td></tr>

(Copy the blank line above as part of the Template).

Create ShelveLogger.html (GNU/Linux):

Code: Select all
   /home/[user]/data/Shelve/ShelveLogger.html

GNU/Linux users: Substitute your account name for "user".
Create ShelveLogger.html (Windows):

Code: Select all
   c:\data\Shelve\ShelveLogger.html


<---Copy all the code below in to ShelveLogger.html --->

Code: Select all
   <html><head><meta content="text/html; charset=UTF-8" http-
equiv="Content-Type"><style type="text/css">
   body      {font-size: 10pt; font-family: Arial,Helvetica,sans-
serif;}
   table     {font-size: 10pt; background-color: black; margin-top:
1em;}
   th        {padding: 3px 6px 3px 6px; background-color: #9acd32;
text-align: left;}
   tr        {background-color: white;}
   td        {padding: 3px 6px 3px 6px;}
   td.title  {font-weight: bold;}
   td.label  {background-color: #d5eaa8; text-align: right;}
   a:hover   {background-color: blue; color: white;}
   span.checkboxLabel {margin-left: 0.4em;}
   a.checkbox {text-decoration: none; border-style: solid; border-
width: 1px; border-color: white; cursor: default;}
   a.checkbox:hover {color: black; background-color: white; border-
style: dotted; border-width: 1px; border-color: black;}
   #controls {display: none;}
   </style><script type="text/javascript">


   function init()
   {
     wireEvent("supDataRowsDisplayEnable", "click",
handleSDRDEClick);
     wireEvent("supDataRowsDisplayEnableLabel", "click",
handleSDRDELClick);

     if (isSupDataAvailable()) {
       document.getElementById("controls").style.display = "block";
     }
   }

   function wireEvent(id, eventType, listener)
   {
     eval("document.getElementById(id).on" + eventType + " =
listener;");
   }

   function isSupDataAvailable()
   {
     var retval = false;
     var trs = document.getElementsByTagName("TR");

     for (var i = 0; i < trs.length; i++) {
       if ((trs[i].className.indexOf("sup") >= 0) &&
isDataCellNonempty(trs[i])) {
         retval = true;
         break;
       }
     }
     return retval;
   }

   function setSupDataRowsDisplayed(value)
   {
     var trs = document.getElementsByTagName("TR");

     for (var i = 0; i < trs.length; i++) {
       if (trs[i].className.indexOf("sup") >= 0) {
         if (value && isDataCellNonempty(trs[i])) {
           try {
             trs[i].style.display = "table-row";
           }
           catch (e) {
             trs[i].style.display = "block";
           }
         }
         else {
           trs[i].style.display = "none";
         }
       }
     }
   }

   function isDataCellNonempty(tr)
   {
     var retval = true;

     var tds = tr.getElementsByTagName("TD");
     var label = tds[0].innerHTML.toLowerCase();
     var value = tds[1].innerHTML.toLowerCase();

     switch (label) {
       case "keywords": case "description": case "clip":
         retval = (value != "");
       break;
       case "image":
         retval = (value != '<img src="">');
       break;
       case "link":
         retval = (value != '<a href="">link</a>');
       break;
       default:
         retval = (value != "");
       break;
     }

     return retval;
   }

   function handleSDRDEClick()
   {
     var e = document.getElementById("supDataRowsDisplayEnable");

     setSupDataRowsDisplayed(e.checked);
   }

   function handleSDRDELClick()
   {
     var e = document.getElementById("supDataRowsDisplayEnable");

     e.checked = (! e.checked);

     setSupDataRowsDisplayed(e.checked);
   }

     </script></head><body onload="init();"><div
id="shell"><h2>Shelve Log</h2><div style="display: block;"
id="controls"><a class="checkbox"><input checked="true"
id="supDataRowsDisplayEnable" type="checkbox"><span
class="checkboxLabel" id="supDataRowsDisplayEnableLabel">Show
supplemental data rows</span></a></div><table
cellspacing="1"><tbody><tr><th>DateTime</th><th>Title</th><th>WWW</
th><th>Local</th></tr>

Usage:
======
There is a Shelve Button that you can add to the Firefox ToolBar.
You can use this button (or F9) to save a page via a popupbox or hit
F8 to do it automatically.
If any text is selected it will be added to the log in a new line.

I have /home/[user]/data/Shelve/ShelveLogger.html bookmarked for ease
of use.

   I hope you have found this How To as helpful as I have found
Shelve to be. :D

*An explanation of the Filename Template.
/home/[user]/data/Shelve/saved/%Y/%Y-%M-%D/%B/%Y-%M-%D_%h-%m-%s-
%l.html

The top folder is the year e.g, 2009, 2010 etc., below that all the
pages Shelved in a day are saved to one folder (YYYY-MM-DD). At the
next level the folder is named after the Base Hostname, this will help
if you later need to delete some content.

e.g. /home/[user]/data/Shelve/saved
/2009
/2009-08-31
/news.bbc.com
At this level the Shelved files are saved:
2009-08-31_20-35-41-627.html
2009-08-31_20-35-41-627_files
2009-08-31_20-42-46-265.html
2009-08-31_20-42-46-265_files

Silver Wav

unread,
Mar 15, 2010, 5:38:44 PM3/15/10
to shelve...@googlegroups.com
From: lith <mini...@gmail.com>
Date: Sun, Feb 7, 2010 at 7:46 PM
Subject: [shelve] Re: The ShelveLogger How-To 01/09/2009 version 2.0

To: Shelve Firefox Add-on <shelve-fir...@googlegroups.com>


See here:
http://groups.google.com/group/shelve-firefox-addon/web/shelvelogger-save-a-web-page-to-disk-and-add-its-details-to-a-log-file-from-which-you-can-reopen-it-at-any-time

I also made this thread sticky.

Is this version the older one?
http://groups.google.com/group/shelve-firefox-addon/web/tutorial-by-silverwav-shelve-as-slogger-replacement

If so, I'll replace that page with the above one.

--
You received this message because you are subscribed to the Google
Groups "Shelve Firefox Add-on" group.
To post to this group, send email to shelve-fir...@googlegroups.com.
To unsubscribe from this group, send email to
shelve-firefox-a...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/shelve-firefox-addon?hl=en.

Silver Wav

unread,
Mar 15, 2010, 5:39:44 PM3/15/10
to shelve...@googlegroups.com
From: Silver Wav <silv...@googlemail.com>
Date: Mon, Feb 8, 2010 at 3:20 AM
Subject: Re: [shelve] Re: The ShelveLogger How-To 01/09/2009 version 2.0
To: shelve-fir...@googlegroups.com


Hi,

Google Groups could be useful if it can host files...

I have attached a blank ShelveLogger.html

If you could update the How-to and add the link to the attached file as below:

From:
<---Copy all the code below in to ShelveLogger.html --->

To:
<---Copy all the code below in to ShelveLogger.html (Or download the
file here)--->

Cheers

SilverWave

On Sun, Feb 7, 2010 at 8:02 PM, Silver Wav <silv...@googlemail.com> wrote:
> Cheers :)
>
> Yes the one I sent is the newer one.
>
> Just a thought but from my experience with Google Apps there is an
> option to alter the link.
> So:
> http://groups.google.com/group/shelve-firefox-addon/web/shelvelogger-save-a-web-page-to-disk-and-add-its-details-to-a-log-file-from-which-you-can-reopen-it-at-any-time
>
> Could be changed to:
> http://groups.google.com/group/shelve-firefox-addon/web/the-shelvelogger-how-to
>
> Or similar, not sure if its the same for you :)
>
> Thanks
>
> SilverWave

ShelveLogger.html
Reply all
Reply to author
Forward
0 new messages