summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-11-23 14:25:26 +0000
committerLennart Poettering <lennart@poettering.net>2005-11-23 14:25:26 +0000
commitf9d8477c8faa13622acadf92d8bb9cc83f9b40dc (patch)
treebc8a054f85c79c9a5b44e06bd099b4bfa3007118
parent6ce32ce9aa391b8c18bf030093838c204021c4aa (diff)
* add more licenses
* deal with project without a license git-svn-id: file:///home/lennart/svn/public/sse/trunk@39 5fbabb74-0606-0410-a5e4-b5cc6a42724e
-rwxr-xr-xfeed/sse_fm.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/feed/sse_fm.py b/feed/sse_fm.py
index 467ed9f..45f6ce4 100755
--- a/feed/sse_fm.py
+++ b/feed/sse_fm.py
@@ -15,7 +15,8 @@ license_blacklist = [
"Shareware",
"Other/Proprietary License with Source",
"Other/Proprietary License",
- "Aladdin Free Public License (AFPL)"
+ "Aladdin Free Public License (AFPL)",
+ "Free For Home Use"
]
license_whitelist = [
@@ -39,13 +40,13 @@ license_whitelist = [
def process_record(meta):
- archive_url = None
-
for k, v in meta.items():
meta[k] = v.strip()
meta["id"] = int(meta["id"])
+ archive_url = None
+
for a in ("archive-tgz-url", "archive-bz2-url", "archive-zip-url"):
if meta.has_key(a) and meta[a] != "":
@@ -56,6 +57,12 @@ def process_record(meta):
print "Ignoring project '%s' without archive URL!" % meta["name"]
return
+ meta["archive-url"] = archive_url
+
+ if not meta.has_key("license"):
+ print "WARNING: Project '%s' has no license!" % meta["name"]
+ return
+
if meta["license"] in license_blacklist:
print "Ignoring project '%s' due to evil license '%s'!" % (meta["name"], meta["license"])
return
@@ -68,8 +75,6 @@ def process_record(meta):
f.close()
return
- meta["archive-url"] = archive_url
-
print "Next record '%s'" % meta["name"]
sse_grab.grab_archive(meta, "freshmeat:%i" % meta["id"], SSE_PROVIDER_FRESHMEAT)