]> git.lyx.org Git - features.git/commitdiff
Implement commenting for CREDITS file
authorScott Kostyshak <skostysh@lyx.org>
Thu, 15 Aug 2019 01:23:48 +0000 (21:23 -0400)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:43 +0000 (15:48 +0200)
The reader of CREDITS (GuiAbout.cpp) now ignores lines that start
with the number sign (#). This commit also introduces a commented
out header in CREDITS reminding any potential editor that all
changes will be overwritten by generate_contributions.py.

lib/CREDITS
lib/generate_contributions.py
src/frontends/qt/GuiAbout.cpp

index c523ed043be54578a87a6f953e7d3b480e5c81ee..67d3d987cdc937a694bb40f5371961f428c05fb8 100644 (file)
@@ -1,3 +1,5 @@
+# Do not edit this file. It is created by the script generate_contributions.py
+# and any direct change to this file will be overwritten.
 @bRonen Abravanel
 @iE-mail: ronena () gmail ! com
    Support for feyn diagrams
index 8e192176795a376eca71667897b4080f5e074048..1a292f2e61878a2de5117ca5ead4b18fa9c072af 100755 (executable)
@@ -301,6 +301,9 @@ def main(argv, contributors):
      else:
          txt_credits_data = str(as_txt_credits(contributors)).encode("utf-8")
      txt_credits = open(argv[1], "wb")
+     txt_credits.write(b"# Do not edit this file. It is created by the " \
+         b"script generate_contributions.py\n# and any direct change to " \
+         b"this file will be overwritten.\n")
      txt_credits.write(txt_credits_data)
 
      if sys.version_info[0] < 3:
index 747723ff0680bcab06f168997b41e72358697d53..a641e9ad8713eaf5d7edd9b53482d22901efc9a0 100644 (file)
@@ -61,6 +61,8 @@ static QString credits()
                        QString line;
                        do {
                                line = ts.readLine();
+                               if (line.startsWith("#"))
+                                       continue;
                                if (line.startsWith("@b"))
                                        out << "<b>" << line.mid(2) << "</b>";
                                else if (line.startsWith("@i")) {