diff --git a/README.md b/README.md index 2719e656d..16a29e321 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ The file kanjivg-YYYYMMDD.xml.gz contains all of the non-variant SVG files in one large XML structure. This is the format in which KanjiVG was first released. However, although this format will not be removed, it should now be considered obsolete, and is only provided for users -who want to keep using "legacy" software written with the old +who want to keep using "legacy" software written for the old format. This file is generated by `kvg.py`. * Source code files diff --git a/clean.py b/clean.py new file mode 100755 index 000000000..dd26e2b04 --- /dev/null +++ b/clean.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +# This script removes unnecessary files such as backups from Emacs or +# old release files. + +import os, glob + +badFiles = glob.glob('kanjivg.xml') +for file in badFiles: + if os.path.exists(file): + os.remove(file) +emacsBackups = glob.glob('kanji/*~') +emacsBackups.extend(glob.glob('*~')) +for file in emacsBackups: + os.remove(file)