From 75dc5adb4f7d66c504740e3a7e3b34d33495562d Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Sun, 12 Jan 2020 06:59:21 +0100 Subject: Add the acronym capitalization checker and the data file for it. --- scripts/acronym-checker.py | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 scripts/acronym-checker.py (limited to 'scripts/acronym-checker.py') diff --git a/scripts/acronym-checker.py b/scripts/acronym-checker.py new file mode 100755 index 0000000..e0c7845 --- /dev/null +++ b/scripts/acronym-checker.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 +# +# Copyright (C) 2019 VyOS maintainers +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 +# USA +# +# Checks capitalization of abbreviations/acronyms. +# In the style file, they should be given one per line, +# correctly capitalized. + +import re +import sys + +if len(sys.argv) < 3: + print("Usage: {0}