Help with RSS, archives and workflow... please...

I am new to the Devon suite of programs, but have jumped in with both feet. I am trying to duplicate some Google Alerts functionality using the enhanced search capabilities of DA. Essentially, I have a series of six predefined searches that Google runs and presents each searches results as an RSS feed which I read in Reeder.

I have set up a search set in DA for each of the searches I want to run, but the RSS feature doesn’t make sense to me. I finally figured out where it was putting the RSS file (Documents/DevonAgent RSS/ folder for those still looking). However, it appears to add a new RSS file each time it runs the search. Plus, Reeder doesn’t seem to like the file DA outputs and won’t open it. What program opens this file and how do I use it? It would seem to be more logical that DA would create a RSS file for each search set and then append that file each time the search is run. That way, I could keep track of what results I have read and which are still left to be read.

Can someone please help me with some best practices on how to use the outputted RSS file? I can feel in my bones that there is a tremendous potential here, but I haven’t found the solution yet.

Thanks in advance,
Brad

The next release will include this enhanced script:



on results(theResults, theSet, theQuery)
	tell application "DEVONagent"
		try
			set pathToAdditions to ((path to application id "com.devon-technologies.agent" as string) & "Contents:Resources:Script Additions.scpt") as alias
			set helperLibrary to load script pathToAdditions
			
			set this_RSS to "<?xml version=\"1.0\" encoding=\"UTF-8\"?><rss version=\"2.0\"><channel><title>" & helperLibrary's convertText2XML(theQuery) & "</title><generator>DEVONagent 3</generator>"
			
			repeat with theResult in theResults
				set this_RSS to this_RSS & "<item><title>" & helperLibrary's convertText2XML(|Title| of theResult) & "</title><description>" & helperLibrary's convertText2XML(|Text| of theResult) & "</description><link>" & helperLibrary's convertText2XML(|URL| of theResult) & "</link>"
				try
					set this_date to |pubDate| of theResult
					set this_RSS to this_RSS & "<pubDate>" & helperLibrary's convertText2XML(this_date) & "</pubDate>"
				end try
				set this_RSS to this_RSS & "</item>" & return
			end repeat
			set this_RSS to this_RSS & return & "</channel></rss>"
			
			set this_path to ((path to sites folder) as string) & "rss:"
			
			try
				do shell script "mkdir " & quoted form of POSIX path of this_path
			end try
			
			set this_file to helperLibrary's replaceText(theSet, " ", "_")
			set this_file to helperLibrary's replaceText(this_file, "/", "-")
			set this_file to this_file & ".rss"
			
			do shell script "echo " & quoted form of this_RSS & ">" & quoted form of POSIX path of (this_path & this_file)
		end try
	end tell
end results

This script creates the .rss files in the folder ~/Sites/rss and uses the name of the set. After enabling web sharing, a feed can be accessed via e.g. 127.0.0.1/rss/mysearchset.rss

However, on Mountain Lion Apple has removed web sharing :imp: but it’s possible to enable it again: reviews.cnet.com/8301-13727_7-57 … tain-lion/

Thanks. That revised script looks like it might be just the trick I am looking for. Now, the newbie question… Where do I copy and paste it to make it work?

Just save it to the folder ~/Library/Application Support/DEVONagent/Action Scripts and launch DEVONagent Pro afterwards.

OK, this used to work and now not so much. When I go into DTP and select Data->New–>Feed, I input the URL as 127.0.0.1/rss/nameoffeed.rss and leave the name of the feed set to Automatic (in DTP, not the URL). It comes back and changes the name to “404 not found”.

I know the web sharing is working - going to 127.0.0.1 in Safari yields an “It Works” notice. I know the DA-generated rss document is in the right folder. I just can’t get it to pull it into DTP.

Incidentally, I have also tried to pull these feeds into ReadKit and it fails in that as well. Am I missing something here???

Do you remember which action broke it? E.g. an update of the OS or of DEVONagent?

I don’t remember. My assumption is that is was a DA update…

Are you able to open the full URL of the feed (127.0.0.1/rss/nameoffeed.rss) in Safari?

No. Safari gives me a similar 404 Not Found error.

Then it’s definitely not an issue of DEVONagent Pro. Which version of Mac OS X do you use?

OS X - 10.8.4

How did you enable web sharing? By default it’s not accessible anymore on Mountain Lion. Therefore it’s probably a configuration issue.

I followed the link you provided above: reviews.cnet.com/8301-13727_7-57 … tain-lion/

I can point my browser to the local ip address (127.0.0.1) and get the It Works page (even after clearing browser cache). That would tell me that the apache server is putting out pages. It just doesn’t want to put this one out…

Did you run all Terminal commands necessary to enable websites in your user folder? Especially…

Got it working. So here’s what made the difference…

I was using: localhost/rss/setname.rss

I should have been using: localhost/~username/rss/setname.rss

Thanks for helping me decipher this!

Brad

Back on this topic for a bit…

Does anyone know why this script might only work for some search sets? I have a few search sets where it works beautifully. However, I can copy that search set, rename it, change a search term (change nothing else) and it won’t create a .rss file.

I thought creating a search set from scratch was the answer, and it was for a while. Yesterday I created a new set from scratch and it now won’t create an .rss file for that set. All of the others continue to work as they had previously.

Is there a trick here I am missing?

Also, it possible to “pretty up” the formatting of the produced .rss results with some formatting?

Thanks again.

What’s the name of the failing search sets? Maybe there’s a character which isn’t valid in filenames.

The name of the search set in question is “feasibility” (no quotes in actual name). I’ve had trouble in the past with complicated names, so I’ve gone pretty basic with them.

In this case, the query is pretty basic as well. It’s just:

(feasibility OR suitability) NEAR study

Nothing too fancy…

B

Does the search set return any results at all? Or has been anything logged to Applications > Utilities > Console.app > All Messages?

The search works exactly as expected within DA. It generates results, displays a notification and adds the results to an archive. That part is working very well. It’s just the RSS to site part that has trouble.

Hmmm… I went to go run the search manually to get you the Console information and it now appears to have established an .rss file in the correct directory. I had to reboot my machine this AM for an unrelated program install. Is it possible that rebooting DA somehow triggered it to work?

B