From a6097d9552bd188a1b004f0f3270e044afb4fdf1 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 27 May 2020 18:44:20 +0200 Subject: [PATCH] remove blank entries from srclibs ```python import glob import re import yaml print(help(yaml.dump)) for f in glob.glob('srclibs/*.yml'): with open(f) as fp: data = yaml.safe_load(fp) write = False if 'Prepare' in data: prepare = data['Prepare'].strip() if not prepare: del(data['Prepare']) write = True if 'Subdir' in data: subdir = data['Subdir'] if not subdir: del(data['Subdir']) write = True if write: with open(f, 'w') as fp: yaml.dump(data, fp, default_flow_style=False, allow_unicode=True, encoding=None) print('\n=========================================\n', f) print('Prepare:', prepare) ``` --- srclibs/BingTranslator.yml | 10 ---------- srclibs/BouncyCastle.yml | 10 ---------- srclibs/FluffyLocations.yml | 9 --------- srclibs/JSoup.yml | 10 ---------- srclibs/MSQLite.yml | 10 ---------- srclibs/SystemBarTint.yml | 9 --------- 6 files changed, 58 deletions(-) diff --git a/srclibs/BingTranslator.yml b/srclibs/BingTranslator.yml index 15be24c639..96bdd25069 100644 --- a/srclibs/BingTranslator.yml +++ b/srclibs/BingTranslator.yml @@ -1,12 +1,2 @@ -# Source details (the only mandatory fields) RepoType: git Repo: https://github.com/boatmeme/microsoft-translator-java-api.git - -# Comma-separated list of subdirs to use. The first existing subdirectory -# found between those given will be used. If none is found or provided, the -# root of the repo directory will be used instead. -Subdir: - -# Any extra commands to prepare the source library -Prepare: | - diff --git a/srclibs/BouncyCastle.yml b/srclibs/BouncyCastle.yml index 2b3374a9d2..4ac717ce27 100644 --- a/srclibs/BouncyCastle.yml +++ b/srclibs/BouncyCastle.yml @@ -1,12 +1,2 @@ -# Source details (the only mandatory fields) RepoType: git Repo: https://github.com/bcgit/bc-java.git - -# Comma-separated list of subdirs to use. The first existing subdirectory -# found between those given will be used. If none is found or provided, the -# root of the repo directory will be used instead. -Subdir: - -# Any extra commands to prepare the source library -Prepare: | - diff --git a/srclibs/FluffyLocations.yml b/srclibs/FluffyLocations.yml index 2eb4ee8aa7..b8f488f847 100644 --- a/srclibs/FluffyLocations.yml +++ b/srclibs/FluffyLocations.yml @@ -1,12 +1,3 @@ -# Source details (the only mandatory fields) RepoType: svn Repo: http://little-fluffy-location-library.googlecode.com/svn/trunk/ - -# Comma-separated list of subdirs to use. The first existing subdirectory -# found between those given will be used. If none is found or provided, the -# root of the repo directory will be used instead. Subdir: little-fluffy-location-library/LittleFluffyLocationLibrary - -# Any extra commands to prepare the source library -Prepare: | - diff --git a/srclibs/JSoup.yml b/srclibs/JSoup.yml index 718cc25430..be8b3212f1 100644 --- a/srclibs/JSoup.yml +++ b/srclibs/JSoup.yml @@ -1,12 +1,2 @@ -# Source details (the only mandatory fields) RepoType: git Repo: https://github.com/jhy/jsoup.git - -# Comma-separated list of subdirs to use. The first existing subdirectory -# found between those given will be used. If none is found or provided, the -# root of the repo directory will be used instead. -Subdir: - -# Any extra commands to prepare the source library -Prepare: | - diff --git a/srclibs/MSQLite.yml b/srclibs/MSQLite.yml index fb16c02e3f..75eb973471 100644 --- a/srclibs/MSQLite.yml +++ b/srclibs/MSQLite.yml @@ -1,12 +1,2 @@ -# Source details (the only mandatory fields) RepoType: git Repo: https://github.com/mick88/MSQLite.git - -# Comma-separated list of subdirs to use. The first existing subdirectory -# found between those given will be used. If none is found or provided, the -# root of the repo directory will be used instead. -Subdir: - -# Any extra commands to prepare the source library -Prepare: | - diff --git a/srclibs/SystemBarTint.yml b/srclibs/SystemBarTint.yml index bcb6fdec9c..db106cbb34 100644 --- a/srclibs/SystemBarTint.yml +++ b/srclibs/SystemBarTint.yml @@ -1,12 +1,3 @@ -# Source details (the only mandatory fields) RepoType: git Repo: https://github.com/jgilfelt/SystemBarTint - -# Comma-separated list of subdirs to use. The first existing subdirectory -# found between those given will be used. If none is found or provided, the -# root of the repo directory will be used instead. Subdir: library - -# Any extra commands to prepare the source library -Prepare: | -