Skip to content

Commit

Permalink
Project summary no longer exists on sf.net
Browse files Browse the repository at this point in the history
Remove fetching of project summary feed and all information obtained
from it.

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Jun 6, 2014
1 parent a73c732 commit 9f0879b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 94 deletions.
59 changes: 0 additions & 59 deletions render.py
Expand Up @@ -83,8 +83,6 @@
'http://sourceforge.net/api/file/index/project-id/23067/rss'
PROJECT_NEWS_RSS = \
'https://sourceforge.net/p/phpmyadmin/news/feed'
PROJECT_SUMMARY_RSS = \
'http://sourceforge.net/export/rss2_projsummary.php?group_id=23067'
PROJECT_VCS_RSS = \
'http://github.com/phpmyadmin/phpmyadmin/commits/master.atom'
TRANSLATIONS_RSS = \
Expand All @@ -100,23 +98,6 @@
# URLS
SECURITY_URL = 'http://www.phpmyadmin.net/home_page/security/'

# RSS parsing
SUMMARY_DEVS = re.compile(
r'Developers on project: ([0-9]*)'
)
SUMMARY_ACTIVITY = re.compile(
r'Activity percentile \(last week\): ([0-9.]*%)'
)
SUMMARY_LISTS = re.compile(
r'Mailing lists \(public\): ([0-9]*)'
)
SUMMARY_FORUMS = re.compile(
r'Discussion forums \(public\): ([0-9]*), containing ([0-9]*) messages'
)
SUMMARY_TRACKER = re.compile(
r'Tracker: (.*) \(([0-9]*) open/([0-9]*) total\)'
)

# Naming of versions
VERSION_INFO = (
('beta1', ' First beta version.'),
Expand Down Expand Up @@ -167,7 +148,6 @@ def __init__(self):
'rss_translations': TRANSLATIONS_RSS,
'rss_news': PROJECT_NEWS_RSS,
'rss_planet': PLANET_RSS,
'rss_summary': PROJECT_SUMMARY_RSS,
'rss_security': '%s%ssecurity/index.xml' % (SERVER, BASE_URL),
'rss_vcs': PROJECT_VCS_RSS,
'screenshots': data.screenshots.SCREENSHOTS,
Expand Down Expand Up @@ -630,42 +610,6 @@ def process_feed(self, name, feed, count=3):

self.data['short_%s' % name] = self.data[name][:count]

def process_summary(self, feed):
'''
Reads summary feed and fills some useful information into data.
'''
helper.log.dbg('Processing summary feed...')
info = {}
links = {}
trackers = []
for entry in feed.entries:
if entry.title[:22] == 'Developers on project:':
match = SUMMARY_DEVS.match(entry.title)
info['developers'] = match.group(1)
links['developers'] = entry.link
elif entry.title[:13] == 'Mailing lists':
match = SUMMARY_LISTS.match(entry.title)
info['mailinglists'] = match.group(1)
links['mailinglists'] = entry.link
elif entry.title[:17] == 'Discussion forums':
match = SUMMARY_FORUMS.match(entry.title)
info['forums'] = match.group(1)
info['forumposts'] = match.group(2)
links['forums'] = entry.link
elif entry.title[:8] == 'Tracker:':
match = SUMMARY_TRACKER.match(entry.title)
trackers.append({
'name': match.group(1),
'open': match.group(2),
'total': match.group(3),
'description': entry.summary[21:],
'link': entry.link,
})
self.data['info'] = info
self.data['links'] = links
trackers.sort(key=lambda x: x['name'])
self.data['trackers'] = trackers

def get_menu(self, active):
'''
Returns list of menu entries with marked active one.
Expand Down Expand Up @@ -947,9 +891,6 @@ def fetch_data(self):
rss_ru = self.feeds.load('ru', RSS_RU)
self.process_feed('news_ru', rss_ru)

rss_summary = self.feeds.load('summary', PROJECT_SUMMARY_RSS)
self.process_summary(rss_summary)

self.get_translation_stats()

self.list_security_issues()
Expand Down
2 changes: 1 addition & 1 deletion templates/15-years.tpl
@@ -1,6 +1,6 @@
<html xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="">

<py:def function="page_rss">${rss_summary}</py:def>
<py:def function="page_rss">${rss_news}</py:def>
<py:def function="page_rss_title">15 years</py:def>

<py:def function="page_title">15 years</py:def>
Expand Down
1 change: 0 additions & 1 deletion templates/about-website.tpl
Expand Up @@ -42,7 +42,6 @@ history</a>.

<ul>
<li><a href="${rss_news}">phpMyAdmin project news</a></li>
<li><a href="${rss_summary}">phpMyAdmin project summary</a></li>
<li><a href="${rss_files}">phpMyAdmin file releases</a></li>
<li><a href="${rss_security}">phpMyAdmin security issues</a></li>
<li><a href="${rss_vcs}">phpMyAdmin commits</a></li>
Expand Down
32 changes: 1 addition & 31 deletions templates/about.tpl
@@ -1,6 +1,6 @@
<html xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="">

<py:def function="page_rss">${rss_summary}</py:def>
<py:def function="page_rss">${rss_news}</py:def>
<py:def function="page_rss_title">phpMyAdmin project summary</py:def>

<py:def function="page_title">About</py:def>
Expand Down Expand Up @@ -77,38 +77,8 @@ correctly spelled variant).

<h2>Factoids</h2>

<p>
phpMyAdmin project currently has <a
href="${links.developers}">${info.developers} developers</a>. Over the life of the
project on SourceForge.net, users have wrote ${info.forumposts} posts into <a
href="${links.forums}">${info.forums} forums</a> and discussed various topics
in <a href="${links.mailinglists}">${info.mailinglists} mailing lists</a>.
</p>

<script type="text/javascript" src="http://www.ohloh.net/p/3344/widgets/project_factoids_stats.js"></script>

<h2>Tracker Statistics</h2>

<table class="graph sortable" id="sorttable">
<thead>
<tr>
<th class="forward_sort">Tracker</th>
<th>Description</th>
<th>Open issues</th>
<th>Total issues</th>
</tr>
</thead>

<tbody>
<tr py:for="tracker in trackers">
<td class="name"><a href="${tracker.link}">${tracker.name}</a></td>
<td class="name">${tracker.description}</td>
<td class="size">${tracker.open}</td>
<td class="size">${tracker.total}</td>
</tr>
</tbody>
</table>

</div>

<xi:include href="_page.tpl" />
Expand Down
2 changes: 1 addition & 1 deletion templates/search.tpl
@@ -1,6 +1,6 @@
<html xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="">

<py:def function="page_rss">${rss_summary}</py:def>
<py:def function="page_rss">${rss_news}</py:def>
<py:def function="page_rss_title">phpMyAdmin project summary</py:def>

<py:def function="page_title">About</py:def>
Expand Down
6 changes: 5 additions & 1 deletion templates/support.tpl
Expand Up @@ -26,7 +26,11 @@ Trackers on SourceForge.net are used to track bug reports, requests for new feat
</p>

<ul>
<li py:for="tracker in trackers"><a href="${tracker.link}">${tracker.name}</a> - ${tracker.description}</li>
<li><a href="https://sourceforge.net/p/phpmyadmin/bugs/">Bugs</a> - Bug Tracking System</li>
<li><a href="https://sourceforge.net/p/phpmyadmin/feature-requests/">Feature Requests</a> - Feature Request Tracking System</li>
<li><a href="https://sourceforge.net/p/phpmyadmin/patches/">Patches</a> - Patch Tracking System</li>
<li><a href="https://sourceforge.net/p/phpmyadmin/support-requests/">Support Requests</a> - Tech Support Tracking System</li>
<li><a href="https://sourceforge.net/p/phpmyadmin/themes/">Themes</a> - Downloadable themes for phpMyAdmin</li>
</ul>
</div>

Expand Down

0 comments on commit 9f0879b

Please sign in to comment.