[Blends-commit] r3243 - in /blends/trunk/webtools: blendstasktools.py blendstasktoolsold.py
tille at users.alioth.debian.org
tille at users.alioth.debian.org
Mon Apr 2 07:15:25 UTC 2012
Author: tille
Date: Mon Apr 2 07:15:24 2012
New Revision: 3243
URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=3243
Log:
New handling of publications: Prefer values from UDD over value from tasks files; More detailed handling (volume, number, pages); Export helper data to enable easy removal of duplicated publication data in tasks files
Modified:
blends/trunk/webtools/blendstasktools.py
blends/trunk/webtools/blendstasktoolsold.py
Modified: blends/trunk/webtools/blendstasktools.py
URL: http://svn.debian.org/wsvn/blends/blends/trunk/webtools/blendstasktools.py?rev=3243&op=diff
==============================================================================
--- blends/trunk/webtools/blendstasktools.py (original)
+++ blends/trunk/webtools/blendstasktools.py Mon Apr 2 07:15:24 2012
@@ -38,7 +38,7 @@
try:
from debian import deb822
except:
- from debian_bundle import deb822
+ from debian import deb822
from blendsunicode import to_unicode
from blendslanguages import languages
@@ -196,6 +196,8 @@
if dep not in dep_strength_keys:
dep_strength_keys.append(dep)
+rmpub = open('remove-publications-from-tasks-files.dat','w+')
+
license_in_component = {'main' : 'DFSG free',
'contrib' : 'DFSG free, but needs non-free components',
'non-free' : 'non-free'
@@ -301,11 +303,16 @@
vote int, recent int, -- popcon
debtags text[],
screenshot_versions text[], image text[], icon text[],
- "Published-Year" text,
- "Published-Title" text,
- "Published-Authors" text,
- "Published-DOI" text,
- "Published-PubMed" text,
+ year text,
+ title text,
+ authors text,
+ doi text,
+ pubmed text,
+ url text,
+ journal text,
+ volume text,
+ number text,
+ pages text,
description_en text, long_description_en text,
description_cs text, long_description_cs text,
description_da text, long_description_da text,
@@ -1476,13 +1483,19 @@
# package versions in all releases
dep.properties['pkg-url'] = PKGURLMASK % dep.pkg
- for pub in ("Published-Year", "Published-Title", "Published-Authors", "Published-DOI", "Published-PubMed"):
+ for pub in ("year", "title", "authors", "doi", "pubmed", "url", "journal", "volume", "number", "pages" ):
if row[pub]:
if not dep.properties.has_key('published'):
dep.properties['published'] = {}
- ptype = pub.replace('Published-','').lower()
- dep.properties['published'][ptype] = to_unicode(row[pub])
-
+ if dep.properties['published'].has_key(pub):
+ if dep.properties['published'][pub] == to_unicode(row[pub]):
+ print >>rmpub, "%s: %s: Published-%s: %s" % (dep.taskname, dep.pkg, pub, to_unicode(row[pub]))
+ logger.info("%s/%s: Publication-%s = %s can be removed" % (dep.taskname, dep.pkg, pub, to_unicode(row[pub])))
+ else:
+ logger.info("%s conflicting fields Publication-%s in tasks file with value '%s' and in UDD with value '%s'" % (dep.pkg, pub, dep.properties['published'][pub], to_unicode(row[pub])))
+ dep.properties['published'][pub] = to_unicode(row[pub])
+ if dep.properties.has_key('published'):
+ print "DEBUG", dep.pkg, dep.properties['published']
for l in languages:
if row['description_'+l]:
dep.desc[l] = {}
Modified: blends/trunk/webtools/blendstasktoolsold.py
URL: http://svn.debian.org/wsvn/blends/blends/trunk/webtools/blendstasktoolsold.py?rev=3243&op=diff
==============================================================================
--- blends/trunk/webtools/blendstasktoolsold.py (original)
+++ blends/trunk/webtools/blendstasktoolsold.py Mon Apr 2 07:15:24 2012
@@ -35,7 +35,7 @@
# from genshi.input import HTML
from blendsmarkdown import SplitDescription, MarkupString, render_longdesc
-from debian_bundle import deb822
+from debian import deb822
from blendsunicode import to_unicode
import logging
More information about the Blends-commit
mailing list