[game-data-packager] 02/03: compile_yaml: Make it clearer that these files are not for editing

Simon McVittie smcv at debian.org
Sun Jul 23 13:42:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch master
in repository game-data-packager.

commit 41011f3457b737b4c65448850c42b655719f02a1
Author: Simon McVittie <smcv at debian.org>
Date:   Mon Jul 17 00:40:07 2017 +0100

    compile_yaml: Make it clearer that these files are not for editing
    
    Hopefully by hinting to potential contributors that there is a source
    format for these files, we can waste less of their time on editing
    non-editable formats.
---
 tools/compile_yaml.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/compile_yaml.py b/tools/compile_yaml.py
index 698fa7e..ce1676c 100755
--- a/tools/compile_yaml.py
+++ b/tools/compile_yaml.py
@@ -45,6 +45,10 @@ def main(f, out):
 
     if groups is not None:
         with open(offload + '.tmp', 'w', encoding='utf-8') as writer:
+            writer.write('# Generated file, do not edit.\n')
+            writer.write(
+                '# Edit %s.yaml and put it next to vfs.zip instead.\n' % game)
+
             assert isinstance(groups, dict)
             # The group data starts with a list of groups. This is necessary
             # so we can know whether a group member, encountered later on in
@@ -101,6 +105,11 @@ def main(f, out):
 
         if v is not None:
             with open(offload + '.tmp', 'w', encoding='utf-8') as writer:
+                writer.write('# Generated file, do not edit.\n')
+                writer.write(
+                    '# Edit %s.yaml and put it next to vfs.zip instead.\n' %
+                    game)
+
                 for line in v.splitlines():
                     stripped = line.strip()
                     if stripped == '' or stripped.startswith('#'):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list