Merge branch 'master' of github.com:samuelclay/NewsBlur

This commit is contained in:
Samuel Clay 2010-06-28 16:57:28 -04:00
commit 9f2b132096
6 changed files with 60 additions and 18 deletions

22
LICENSE.md Normal file
View file

@ -0,0 +1,22 @@
The MIT License
===============
Copyright (c) 2009-2010 Samuel Clay <samuel@ofbrooklyn.com>.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -1,33 +1,46 @@
# Objective #
NEWSBLUR
========
A News/RSS Reader that controls the amount, relevancy, and interestingness of news subscriptions.
# Roadmap #
Roadmap
-------
## version 1.0 ##
*Spring 2010*
* Feed management: Adding, removing, sorting/threading, OPML import
* Original view: Show the original site and connect stories to rss stories
* Feed view: Show all feed entries connected to rss stories
* Intelligence: Red/Yellow/Green for Bad/Neutral/Good stories. Based on explicit user preferences.
* Feed management: Adding, removing, sorting/threading, OPML import
* Original view: Show the original site and connect stories to rss stories
* Feed view: Show all feed entries connected to rss stories
* Intelligence: Red/Yellow/Green for Bad/Neutral/Good stories. Based on explicit user preferences.
## version 1.5 ##
*Summer 2010*
* Google Reader import
* Google Reader import
## version 2.0 ##
*Winter 2010*
* Search
* Feed discovery, ala *Give Me Something To Read*
* Search
* Feed discovery, ala *Give Me Something To Read*
## version 3.0 ##
*Spring 2011*
* Artificial intelligence: implicit behavior creates assumptions about stories
Author
------
* Samuel Clay <samuel@ofbrooklyn.com>
License
-------
NewsBlur is licensed under the MIT License. (See LICENSE)

View file

@ -251,7 +251,7 @@ def load_feed_page(request):
feed_page, created = FeedPage.objects.get_or_create(feed=feed)
if not created:
data = feed.feed_page.page_data
else:
if created or not data:
data = "Give it 5-10 minutes...<br /><br />Your feed will be here in under 5 minutes (on average).<br />Soon there will be a progress bar. Until then, take a deep breath."
return HttpResponse(data, mimetype='text/html')

View file

@ -21,9 +21,9 @@ ENTRY_NEW, ENTRY_UPDATED, ENTRY_SAME, ENTRY_ERR = range(4)
class Feed(models.Model):
feed_address = models.URLField(max_length=255, verify_exists=True, unique=True)
feed_link = models.URLField(max_length=200, default="")
feed_title = models.CharField(max_length=255, default="")
feed_tagline = models.CharField(max_length=1024, default="")
feed_link = models.URLField(max_length=200, default="", blank=True, null=True)
feed_title = models.CharField(max_length=255, default="", blank=True, null=True)
feed_tagline = models.CharField(max_length=1024, default="", blank=True, null=True)
active = models.BooleanField(default=True)
num_subscribers = models.IntegerField(default=0)
last_update = models.DateTimeField(auto_now=True, default=0)
@ -323,15 +323,18 @@ class Feed(models.Model):
# Use stories per month to calculate next feed update
updates_per_day = max(30, self.stories_per_month) / 30.0
# 1 update per day = 12 hours
# > 1 update per day = 30 minutes
minutes_to_next_update = 30
# > 1 update per day:
# 2 updates = 1.5 hours
# 4 updates = 45 minutes
# 10 updates = 18 minutes
minutes_to_next_update = 12 * 60 / (updates_per_day * 4)
if updates_per_day <= 1:
minutes_to_next_update = 60 * 12
random_factor = random.randint(0,int(minutes_to_next_update/4))
slow_punishment = 0
random_factor = random.randint(0,int(minutes_to_next_update/6))
# 6 hours / subscribers. Lots of subscribers = lots of updates
subscriber_bonus = 6 * 60 / max(1, self.num_subscribers)
slow_punishment = 0
if 30 <= self.last_load_time < 60:
slow_punishment = self.last_load_time
elif 60 <= self.last_load_time < 100:

View file

@ -813,6 +813,10 @@
story = this.model.get_story($story.data('story'));
NEWSBLUR.log(['now story', story, $story]);
}
if (!story || !$story || !$story.length) {
return;
}
// NEWSBLUR.log(['scroll_to_story_in_story_feed', story, $story]);
if ($story && $story.length) {

View file

@ -312,7 +312,7 @@ class Dispatcher:
else:
comment = u''
feed.last_load_time = delta.seconds
feed.last_load_time = max(1, delta.seconds)
feed.save()
done_msg = (u'%2s ---> Processed %s (%d) in %s\n ---> [%s] [%s]%s' % (