Revision: 12271
          http://sourceforge.net/p/skim-app/code/12271
Author:   hofman
Date:     2021-04-08 15:01:33 +0000 (Thu, 08 Apr 2021)
Log Message:
-----------
Get extra note from release notes

Modified Paths:
--------------
    trunk/build_skim.py

Modified: trunk/build_skim.py
===================================================================
--- trunk/build_skim.py 2021-04-08 14:46:59 UTC (rev 12270)
+++ trunk/build_skim.py 2021-04-08 15:01:33 UTC (rev 12271)
@@ -314,6 +314,7 @@
     changeString = "Changes since "
     endLineString = "\\\n"
     itemString = "{\\listtext\t\uc0\u8226 \t}"
+    noteString = "Note:\n\f4\i\b0\fs24 \cf0 "
     
     changeStart = relNotes.find(changeString)
     if changeStart is not -1:
@@ -347,8 +348,10 @@
             end = relNotes.find(endLineString, start, endBugs)
             bugsFixed.append(relNotes[start:end])
     
+    endNote = endNew
     start = relNotes.find("New Features")
     if start is not -1:
+        endNote = start
         while True:
             start = relNotes.find(itemString, start, endNew)
             if start is -1:
@@ -357,8 +360,15 @@
             end = relNotes.find(endLineString, start, endNew)
             newFeatures.append(relNotes[start:end])
     
-    return newFeatures, bugsFixed, changesSince
+    note = ""
+    start = relNotes.find(noteString, 0, endNote)
+    if start is not -1:
+        end = relNotes.find(relNotes, start, endNote)
+        if end is not -1:
+            note = strip(relNotes[start:end])
 
+    return newFeatures, bugsFixed, changesSince, note
+
 def keyFromSecureNote():
     
     # see 
http://www.entropy.ch/blog/Developer/2008/09/22/Sparkle-Appcast-Automation-in-Xcode.html
@@ -412,9 +422,12 @@
     else:
         type = "application/zip"
     
-    newFeatures, bugsFixed, changesSince = release_notes()
+    newFeatures, bugsFixed, changesSince, note = release_notes()
     
     relNotes = "\n<h1>Version " + newVersionString + "</h1>\n"
+    if len(note) > 0:
+        "\n<p>\n<em><b>Note:</b> " + note + "</em>\n</p>\n"
+    
     if len(newFeatures) > 0:
         relNotes = relNotes + "\n<h2>New Features</h2>\n<ul>\n"
         for item in newFeatures:
@@ -468,6 +481,8 @@
     
     # construct the ReadMe file
     readMe = "Release notes for Skim version " + newVersionString + "\n"
+    if len(note) > 0:
+        readMe = readMe + "\nNote: " + note + "\n"
     if len(newFeatures) > 0:
         readMe = readMe + "\nNew Features\n"
         for item in newFeatures:
@@ -486,6 +501,8 @@
     # construct relnotes.html
     newline = "\n        "
     relNotes = "<h1>" + changesSince + "</h1>" + newline + newline
+    if len(note) > 0:
+        relNotes = relNotes + "<b>Note:</b>  " + note + newline + newline
     if len(newFeatures) > 0:
         relNotes = relNotes + "<h2>New Features</h2>" + newline + newline + 
"<ul>" + newline
         for item in newFeatures:

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to