1
0
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:
Ben Bullock
2024-08-04 13:29:58 +09:00
parent 5858b5e406
commit 4e3920344a
2 changed files with 16 additions and 1 deletions

View File

@@ -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
View 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)