mailr11576 - in /branches/bieri_gui: ./ info.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on September 16, 2010 - 10:12:
Author: bugman
Date: Thu Sep 16 10:12:54 2010
New Revision: 11576

URL: http://svn.gna.org/viewcvs/relax?rev=11576&view=rev
Log:
Merged revisions 11574 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3

........
  r11574 | bugman | 2010-09-16 10:06:47 +0200 (Thu, 16 Sep 2010) | 3 lines
  
  Citations now include the status if not 'published'.
........

Modified:
    branches/bieri_gui/   (props changed)
    branches/bieri_gui/info.py

Propchange: branches/bieri_gui/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Sep 16 10:12:54 2010
@@ -1,1 +1,1 @@
-/1.3:1-11572
+/1.3:1-11575

Modified: branches/bieri_gui/info.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/info.py?rev=11576&r1=11575&r2=11576&view=diff
==============================================================================
--- branches/bieri_gui/info.py (original)
+++ branches/bieri_gui/info.py Thu Sep 16 10:12:54 2010
@@ -435,7 +435,7 @@
         raise AttributeError, name
 
 
-    def cite_short(self, author=True, title=True, journal=True, volume=True, 
number=True, pages=True, year=True, doi=True, url=True):
+    def cite_short(self, author=True, title=True, journal=True, volume=True, 
number=True, pages=True, year=True, doi=True, url=True, status=True):
         """Compile a short citation.
         
         The returned text will have the form of:
@@ -461,6 +461,8 @@
         @type doi:          bool
         @keyword url:       The url flag.
         @type url:          bool
+        @keyword status:    The status flag.  This will only be shown if not 
'published'.
+        @type status:       bool
         @return:            The full citation.
         @rtype:             str
         """
@@ -484,7 +486,9 @@
         if doi and self.doi and hasattr(self, 'doi'):
             cite = cite + ' (http://dx.doi.org/'+self.doi + ')'
         if url and self.url and hasattr(self, 'url'):
-            cite = cite + ' ('+self.url + ')'
+            cite = cite + ' (' + self.url + ')'
+        if status and hasattr(self, 'status') and self.status != 'published':
+            cite = cite + ' (' + self.status + ')'
 
         # End.
         if cite[-1] != '.':
@@ -494,7 +498,7 @@
         return cite
 
 
-    def cite_html(self, author=True, title=True, journal=True, volume=True, 
number=True, pages=True, year=True, doi=True, url=True):
+    def cite_html(self, author=True, title=True, journal=True, volume=True, 
number=True, pages=True, year=True, doi=True, url=True, status=True):
         """Compile a citation for HTML display.
 
         @keyword author:    The author flag.
@@ -513,6 +517,10 @@
         @type year:         bool
         @keyword doi:       The doi flag.
         @type doi:          bool
+        @keyword url:       The url flag.
+        @type url:          bool
+        @keyword status:    The status flag.  This will only be shown if not 
'published'.
+        @type status:       bool
         @return:            The full citation.
         @rtype:             str
         """
@@ -537,6 +545,8 @@
             cite = cite + ' (<a href="http://dx.doi.org/%s";>abstract</a>)' % 
self.doi
         if url and hasattr(self, 'url') and self.url:
             cite = cite + ' (<a href="%s">url</a>)' % self.url
+        if status and hasattr(self, 'status') and self.status != 'published':
+            cite = cite + ' (<i>%s</i>)' % self.status
 
         # End.
         if cite[-1] != '.':




Related Messages


Powered by MHonArc, Updated Thu Sep 16 10:20:02 2010