How To: Automated Feeds:
Advanced Text Feed from a Directory
The feed you're going to build is a feed of job listings from the JobBank
of the ACME website. This will be an Automated RSS text feed that you will
use the Advanced interface to build.
Please open the jobbank.html file in the 03_HumanResources folder of the website
in Dreamweaver.

Also, please open 090527_ChiefExec.html from the JobBank folder
in the 03_HumanResources folder.

In this scenario the JobBank page lists job
openings with links to pages that have detailed descriptions of the job. For
job seekers these detailed descriptions, which include job requirements, are
valuable in their entirety, and not just as blurbs, so this feed will extract
content not from the listing page, but from the contents of the directory itself.
In presenting an effective website consistency in design is a key element
of conveying information. To do that task Dreamweaver provides both templates
and style sheets. Templates control page structure and style sheets control
the graphical presentation of content. These two tools allow content to be
restricted in placement within the document (template regions) and adherent
to a predefined visual order (style selection - also called classing). By making
those associations between content and presentation we convey the relationships
of content - because what something looks like is what something is (especially
in an environment like a website, where there is little additional context
beyond the page). Most importantly, we can then use this relationship in reverse
to identify content and its value. In other words, if we make a template with
a box on it for a headline, on any page using that template when we look in
that box we can expect to find text that is the headline for the page. Now
here's the kicker, templates and styles leave an imprint on the code for the
page, so if we're really clever we can programmatically collect content for
our RSS feed by looking for that code.
Examine the Chief Exec job announcement page and you'll see a template region
called PageContent that defines the variable part of the page (not the navigational
stuff) while the style sheet makes the headline (styled by changing the presentation
of the H3 tag) look like a headline. Select the headline from the page and
look at the bottom of the Dreamweaver window. You can see the document's structure
reflected in the tags displayed - h3 is the current selection within a mminstance:editable
(an editable template region). If you look at the page there is a teal tab
indicating the name of the template region: PageContent.

Now begin creating a new feed by pressing the new feed button in the RSS DreamFeeder
floating panel.

When the dialog is displayed you are presented with the basic
interface, but in this tutorial you'll be using the advanced interface so
click on the Advanced tab.

The first panel of the Advanced interface provides fields for descriptive
content for the feed. The only required fields are Title and Description, but
the more information you provide the better. To navigate in the advanced interface
make selections from the left side Category list. Navigation is not required
to be sequential but in this tutorial you'll do it that way to keep things
simple. Go to the next panel by selecting Feed Settings from the Category list.

In Feed Settings you can decide what type of a feed you are building (Text
Feed) and what file format to use (RSS 2.0). But most importantly you can tell
it to collect content from Files and that you want to have your computer do
the work of updating the feed (Local Processing). Notice that when you select
Files as the source of the content many more panels become available. Next,
provide the Site Settings.

Under Site Settings you'll give RSS DreamFeeder the Base URL -- the url of
the remote website where the files will reside. This is important because your
feed could be republished on any number of different websites and you want
the links to still work, so they have to be full links. If you already provided
this information to Dreamweaver when you setup the site that information will
be copied here, but if you didn't then you'll have to enter it here yourself.
Once entered move on to Summarize.

Under Summarize you will define where the files reside within the website
that you want RSS DreamFeeder to extract content from. In this tutorial the
source is the content of a directory so we select Directory and then press
the plus button to the right of the list. Select the JobBank directory in the
03_HumanResources directory. You don't want to include subdirectories (there
aren't any), you want to exclude temp files, you're just looking for HTML files
(the default) and you're not restricting the template or the file names, so
most of what you have to do is already done. The last change here is to capture
files on Creation, not Modification. This assures that new job files are included,
but old job files don't get processed again. Now move on to Elements.


Under Elements you can decide which elements of the feed you are going to
include. The initial settings here are based on the feed type selection you
made in Feed Settings. However you can choose to include or exclude any elements
except for Headline. So for this feed you're going to exclude Author (uncheck
that) and include Keywords (check that) to help make the jobs more easily searchable.

Now you could proceed screen by screen to manually enter the settings for
each of the included elements, but you can also use the Content Sampler to
build the settings quicker (for the parts that are text on the page anyway).
Press the Content Sampler button at the top right of the panel. This will save
a temporary copy of the feed, close the Edit dialog, and launch the Content
Sampler in the RSS DreamFeeder floating window.

The Content Sampler has a list of Content elements. Samples with a dash "-" have
not been defined yet. You are going to Sample the elements you want to include
by selecting the entry in the Content Sampler, highlighting text from the page
(in this case the 090527_ChiefExec.html page), and then pressing the Sample
button in the top left of the floating window.

Select Headline from the content sampler. Highlight the headline text within
the file and press the sample button to select that text.

The content sampler now shows the sample as an H3 tag (or whatever you sampled).

Repeat the process for your story. Select Story in the Content Sampler. In
this case you have a template and you want to select the entire template region
so highlight the whole thing (or just click on the teal PageContent tab at
the top) and press the Sample button.


The other elements don't exist on the
page itself so we'll do the job manually back in the Edit dialog. The content
sampler may not have done the whole job, but it did give you a good start.
Press the Done button to return to the Edit dialog.
When you return to the edit dialog you'll come back to the same Elements panel.

Now go to the panel for defining content extraction for Headline. You'll see
that it already has the H3 tag defined, but I like to be more precise if I
can be so that if the page changes and there is an H3 before this one or added
to the template or something I can still use these settings. The headline was
within the story, so restrict the location to "Within the Story".
Now move on to Story.

The story settings from the Content Sampler are perfect so we will leave them
alone. On to Link.

Link's default setting is to use the location of the current page that we
are extracting from. That is exactly what you want to do here -- have the link
point back to the original file that RSS DreamFeeder is pulling content from.
So don't change that either. On to Date.

Now Date defaults to the Current Page's Modification Date, which is useful,
but not really what we're after. What we really want is the page's Datestamp,
so we'll change the Match Type to be Dreamweaver Datestamp. Page Creation might
also be useful but if you're the sort of people who don't create, but duplicate
pages then you'll run into problems. OK, on to Keywords.

Keywords is the one place where you'll have to do some work. You want to extract
content from a META tag -- <meta name="keywords" content="value,
value, value">. The specific meta tag uses name as its identifying
attribute and content to contain the stuff that to include in the feed. So
to configure this you'll set Match Type to Tag, enter "meta" as the
Tag we'll match, use With Attribute to find a NAME equal to "keywords" and
Extract the Attribute Value of the "content" attribute.

Now you absolutely should test any manually-entered configuration like this
one to be sure your extraction settings return the right content. Press the
test button in the top-right corner of the Edit dialog. You will be presented
with the Test dialog where you can try out the settings.


Now select the 090527_CheifExect.html file to use as the Sample file. Then
press the Test button. You should see the results as a list of values to use
for the keywords in this entry.


The configuration seems to be working so save the feed within the 03_HumanResources
directory as "jobs.rss".

Once saved, the feed will be listed in the
RSS DreamFeeder floating window and it will display how many files need to
be checked for content.

The files
must be examined for content and the content must be extracted and placed into
the feed. That is called Processing the feed, and you do it by pressing the
Process button.

While processing you will see a dialog box that informs you about what is
going on.

When the processing is done you will see that your feed has 0 files to check
(in the list in the RSS DreamFeeder floating panel).

Finally, you can try the feed out in your news reader. I like to use Safari
for testing because I can just drag the file I created into the window. You
will probably notice that the link is pointing off to whatever website you
configured earlier and not to the local file. This is the way an RSS feed is
supposed to be. Your RSS content will be repeated on other websites so it has
to have an absolute URL for every link. But if you don't keep that in mind
it can be startling to see the link not work (at least not locally). I want
to assure you that you did it right.

If you happen to have a web server on your computer like I do on mine and
if you provide the right site URL you can make the links work. This sort of
setup is how most web developers work now anyhow, especially anyone doing server-side
coding (like asp/php/etc...). The relationship between absolute URLs and relative/local
URLs is one of the stickiest bits of work, but once configured, RSS DreamFeeder
handles it for you.
Congratulations -- You have created an RSS feed.
An RSS feed is not really ever a finished document. It is a reflection of
ongoing activity within your website. The jobs.rss feed isn't just another
list of open jobs in the site, it is an ongoing list of new content from the
JobBank directory. And the great beauty of the configuration work you've done
on this feed is that once the new job files are added to the JobBank all you
will have to do to update the RSS feed is press the Process button. I like
that so I'm going to say it again -- one click and you're updated. It just
doesn't get better than that.
Now go back to Dreamweaver. Use the Files panel to move the 090528_CFO.html
file from newjobs into JobBank in the 03_HumanResources folder. If you are
prompted to update links to the page you should do so.


Now look at
the RSS DreamFeeder floating panel files list and you'll see that your feed
says it has 0 files to check. Huh? 0? Nuts.

Why does it say 0? Well if you look at the Last Updated date for your feed
you'll see that it was last updated today (remember, you were the one who did
it). Today is later than the creation date of the 090528_CFO.html file so RSS
DreamFeeder assumes that this file has nothing new to offer. In most cases
this is right, creating a saving new content within a directory will put creation
dates that work with this approach. However, there are times when you want
to be smarter than the software -- and in this case you can be.
Select your feed from the RSS DreamFeeder list (if its not already selected)
and hold down the option/alt key and the shift key and press the process
button with the mouse. This is called a power click and its for power users
like yourself. You will be prompted to confirm that you want to change the
date of the feed without processing it. Click OK.


What you have just done is changed the Last Updated date of the feed to match
the date of the final entry in the feed. That also means that it will now use
that date as a comparison when looking for new files to check. And now if you
check the list in RSS DreamFeeder it will indicate that there is 1 file to
check for new content. (If not press the refresh button).
You might also want to know that holding down just option/alt while clicking
the Process button will change the Last Updated date to today's date. This
way RSS DreamFeeder will only capture files changed from now on and ignores
any previous changes. This is useful if you've made lots of changes or new
files that you just want to ignore and not include in your feed -- most commonly
something like a template change that impacts all pages within your site.
You have now arrived at the single-click update. Simply select your feed from
the files list in the RSS DreamFeeder floating panel (probably already selected)
and press the Process button.


Your feed is processed, the new content is extracted from the source page,
and it now is in the RSS feed. Check it for yourself by loading the feed into
your RSS reader (if you used Safari you can just press the refresh button in
Safari).

Congratulations -- You have updated an RSS feed.
If for any reason you had trouble getting the steps above to capture a particular
file you could force the feed to include the file by editing the feed directly.
You could select your feed, press the Edit button and then click the Content
tab. This allows you to change your feed's content directly. Click the Import
button and select the file you want to force the feed to include and it will
be processed (using the settings you have already established) and included
in your feed. You can always edit the content of the any feed you create with
RSS DreamFeeder, including adding or deleting entries, by using the Content
tab of the Edit dialog.

Now consider what should happen if you were to remove one of the files from
the JobBank directory. Should that entry remain in the RSS feed or should it
be removed? There are two different schools of thinking on this and they both
have valid perspectives.
One perspective is that nothing should happen, the RSS feed is an historical
document with content and dates related to that content intact within that
document.
The alternate perspective is that the RSS feed should only contain content
that exists within the directory. If it got removed from the directory it was
removed for a reason and you don't want it to be hanging out still linked to
from the RSS feed or for people to get Page Not Found errors when they click
on the link from their RSS readers.
The first perspective is the default behavior for RSS DreamFeeder. Older entries
remain in the feed until enough new content is collected to push the old content
beyond the maximum length of the feed (a setting you can change in Feed Settings
under the Advanced tab).
If you want RSS DreamFeeder to adopt the second perspective -- to delete content
when its the source page is removed from the site -- then you need to change
the Retain Entries setting (in Summarize under the Advanced tab). Please use
caution when changing this setting. This is the only setting (besides max length)
that will automatically remove content from your feed. This is particularly
dangerous if you don't have access to the entire set of files (working remotely
or in a unique development environment) because it checks to see if the file
exists and if for any reason you can't access the file the entry is removed
from the RSS feed. So be careful is all I'm saying.

If you're interested you may choose to proceed to another tutorial::
|