mirror of
https://github.com/KanjiVG/kanjivg.git
synced 2026-03-28 01:44:01 +01:00
Add a cleanup script
This commit is contained in:
@@ -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
|
||||
|
||||
15
clean.py
Executable file
15
clean.py
Executable file
@@ -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)
|
||||
Reference in New Issue
Block a user