How to mark "seen" RSS entries? - rss

So I have played with the idea of making a specialized RSS-reader for some time now, but I have never gotten around to it. I have several project that could benefit from reading feeds in one way or another.
One project for this is an RSS-bot for an IRC-channel I'm on. But I havent quite wrapped my mind around how I can "mark as read" a story, so that it doesn't spit out all the stories in the feed everytime it runs.
Now, I haven't read the specs extencively yet either, so there might be some kind of unique ID I could use to mark the entry as read using a database of some kind. But is this the right way to do it?

From reading the specs for RSS 2.0 at ttp://cyber.law.harvard.edu/rss/rss.html#hrelementsOfLtitemgt it seems each item has a GUID which you can use to know which articles have been read or not.

Related

Should I use the sqlite_master or does it come with any dangers?

So I am doing a private project including a localized database. Since I am not able to host an SQL Server I decided to implement a system for users to syncronize their data (maybe bluetooth, maybe www, not certain yet).
Now in order to send entire sqlite tables between people and for different visualisations I found it useful to get the column names from tables and interact with them, send data refering to them and so on.
Ive seen posts that conclude to use the sqlite_master table to recieve the data Im interested in, Ive tried, it worked, wonderful. Now I got suspicious.
I read about this master property that it could crash the whole databank in horrible ways, make it unreadable and whatsoever. Other than that there might also be some privacy problems or admin privileges that I may lay open for anyone once I send it incripted or not incripted (thats my private concern, I just read master and think of a system jesus XD).
And I research more and more and I cant find a satisfying answer. Evryone describes how to use the sqlite_master but not why or what dangers come with it (Or maybe Im just blind and didnt see the right post :D)
Well thats my question. Should I use it? Is it recommended to leave it alone? Becouse I could, there are other ways to just save up the tables and their columns in a bunch of strings lying arround somewhere. Id like to use it, becouse its handy, I like working with it more than I like working with PRAGMA. Or shall I really just ignore sqlite_master and move on to different methods?

How Does an RSS Feed Work?

How's it going?
I've found a lot of more detailed answers relating to specific problems relating to RSS feeds, but I can't really figure out how you USE one, basically.
Could someone explain?
I see the RSS feed icon at the top of a lot of Wordpress sites, including my own, but when I click it, it just seems to be a long XML file. I don't know what to do with it, or even why it would be there.
How do you use this? Are you meant to hit it with an API request, or is there a particular kind of software that you use?
Cheers
Before telling you what RSS, let me describe you a common problem that many people have.
Say there is a bunch of sites that you really like and it's sort of a
daily routine for you to go thru them. They may be a news site, your
friend's blog, but also craigslist bcause you're currently looking for
a new house and maybe a weather site to know how late you should stay
at work :)
The first thing you do when you get to work, is open your web browser
and these sites in new tabs. It's not particularly cumbersome because
there are just 4 sites. But think about it: maybe there is a new blog
that you start to like and ho, these cartoons are really funny. Maybe
there is also a bit of financial info that you're interested in and
the pictures that your brother is posting to Flickr every couple day:
they just had a new baby! Also, as you're trying to buy a house, you'd
love a little raise and you've figured that your boss really likes it
when you tell her that you've read about your company in the news or
when you tell her about a new competing product... There is also
StackOverflow. You're desperately trying to get this "expert" badge
and boost up your reputation: this may help with your boss too or even
when you're looking for a new job.
Opening all these tabs is starting to take a toll and you keep
forgetting an important one. You're also slowly getting tired of the
different reading experience that all these sites have: small fonts,
large fonts, ads all over...etc. Now you have a problem.
Imagine there is a tool that does the following: you can tell it what sites you care about, and then, this tool will look up the new stuff for you. It will show everything in a nice looking format. It should also help you identify what's really worth seeing ASAP or maybe have some kind of "serendipity" mode that you can go into and find interesting stuff that you would have missed otherwise. The tool will obviously send you to the original sites should you need more info about any particular story or classified...
This tool exists. It's usually called a Reader, mostly because it lets your read more things online. Often times you'll see them called "RSS reader", because RSS is what they use to get the information from all these sites. RSS is the pipe. You as a user should probably not know about it, but that's what the readers depend on. In an ideal world, when you're on site you like, you should just hit "follow" on a button like this one and then you'd be redirected to your reader of choice. Later when new content is added, you'll get it straight in your reader.
To get a bit into more technical details, RSS (like Atom) is an XML flavor. It's a collection (mostly reverse chronological) of entries. Entries have at least a title and a link to the actual story. They should also include a unique identifier and could have other elements like a description, an image, tags, author information... etc.
RSS is great because it's content agnostic. It can be used to represent a lot of different things (as described in the little story) and decouples the publishing platform from the subscribing platform: they don't even know the other one exists. RSS is their lingua-franca.
I wrote a blog post about this very question not long ago. Here's the link if you're interested in reading my personal interpretation. https://www.rss.com/whatisrss
An XML file is all the content of a page, with no markup. The XML represents the data in its rawest, most descriptive form. Many readers can interpret XML sources from a variety of places, and format all of the data in its own unique way.

Converting words to hashtags when posting to Twitter

I currently use LinqToTwitter to send posts to Twitter. I'd like to convert words in the title of the post to hashtags when it gets fired off as tweet so something like - "Firefox is cool" is the blog post and becomes #Firefox is cool http://myshortu.rl/dhsgeh on Twitter.
So far the way i see it is i need a database table with the words i want to convert to hashtags. I'd have to parse out the title and compare the words to those in the db and add on the pound sign. Is the best way to use a db table? Or can I do it with an in memory collection or keep the words in web.config? Thanks....
The decision on whether to use a database or file (such as web.config) might depend on whether you want to write code that allows you to maintain the list. e.g. Add, Modify, Remove. If so, then a DB sounds like the easiest option. If the list is small and doesn't change, then adding a delimited list to web.config would work fine.
Since you're using ASP.NET you can't hold it in a memory variable, but you can hold the list in Cache. This can make for some very fast lookups, rather than multiple file or DB queries.
Just to put this into perspective though, it's tough to recommend a proper design in a forum because there might be details that aren't known. So, it's best to take my answer as something that helps think about what the tradeoffs are, rather than a definitive recommendation on what you should do.

Can newsfeeds be versioned in Plone?

Articles in Plone go through an author-editor-publisher process. Why are feeds the exception? Is there a way to do this with feeds/news through the adding a news item process?
Feeds follow the same pattern; they will pick up on whatever criteria you have specified in e.g. a Collection. If you only show things that are "Published", that will also be the case in the associated feed.
If you're asking for a separate workflow/approval process for the feed itself, that's not how it works. (And I have problems seeing what kind of problem it would solve outside of adding more complexity and more process :)

How to manage the article content in an asp.net web site

I'm planning to create a site for learning technologies, such as codeproject or codeplex. Can you please suggest to me the different ways to manage huge articles?
Look at a content management system, such as SiteFinity: http://www.sitefinity.com/. There are others, some free. You can find some on codeplex.com.
HTH.
Check out DotNetNuke CMS too >> http://www.dotnetnuke.com/
And here's a very hot list available of ASP.NET CMS systems:
http://en.wikipedia.org/wiki/List_of_content_management_systems#Microsoft_ASP.NET_2
Different ways to manage articles while building the entire system yourself. Hmm, ok, let me give it a try... here's the short version.
There are several ways you can "store" your articles (content, data, whatever), and the best way to do so is to use a Database. (SQL Server, MySQL, SQLCE, SQLite, Oracle, the list goes on).
If you're not sold on the idea of a database, you can use any other type of persistent storage that you like. IE: XML, or even flat "TXT" files.
Since you're using ASP.NET you now need to either write your code behind, or some other complied code to access your stored data. You pull it out of the storage and display it on the page/view.
Last but not least, I'd like to give you a suggestion (even though it's not part of your original question). As the other answerers have stated, you should look at a pre-built CMS. If nothing else, to see how it's done (not necessarily to use it as is). My philosophy is quite simple, if you want to be productive in your development, don't bother reinventing the wheel just for the sake of it. If someone else has already build and given away exactly what you need, you should at very least give it a look and use what you can. It will save you piles of time and heartache.
Your question is not vague enough to be closed, but is vague enough that answering all of the nuances could take several thousand lines.

Resources