From f056bce44d7844b04b71b7949b9206cb3e8d4dce Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Sat, 23 Jul 2011 23:00:33 +0900 Subject: [PATCH] Remove obsolete files --- createsinglerelease.py | 52 ----------------------------------------- createsvgfiles.py | 53 ------------------------------------------ updatepublic.sh | 2 +- 3 files changed, 1 insertion(+), 106 deletions(-) delete mode 100755 createsinglerelease.py delete mode 100755 createsvgfiles.py diff --git a/createsinglerelease.py b/createsinglerelease.py deleted file mode 100755 index 15890a306..000000000 --- a/createsinglerelease.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/python2 -# -*- coding: utf-8 -*- -# -# Copyright (C) 2011 Alexandre Courbot -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Take all the individual SVG files and merge them into a single file suitable -# for release. This file only includes non-variant kanji. - -import os, datetime, re -from kanjivg import licenseString - -__datadir = "kanji" -__idMatchString = "\n') - out.write("\n") - out.write("\n") - for f in files: - data = open(os.path.join(__datadir, f)).read() - data = data[data.find("" % (data[:kidend],) + data[data.find("\n"):data.find('\n" - out.write(data) - out.write("\n") - out.close() - print("%d kanji emitted" % len(files)) diff --git a/createsvgfiles.py b/createsvgfiles.py deleted file mode 100755 index 418838813..000000000 --- a/createsvgfiles.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/python2 -# -*- coding: utf-8 -*- - -import os, codecs, xml.sax, datetime, sys -from kanjivg import * - -def createSVG(out, kanji): - out.write('\n') - out.write("\n\n") - out.write(""" - -]> - -""") -# - # - # - # -# - kanji.toSVG(out) - out.write("\n") - -if __name__ == "__main__": - handler = KanjisHandler() - xml.sax.parse(sys.argv[1], handler) - kanjis = handler.kanjis.values() - - for kanji in kanjis: - out = codecs.open("data/" + str(kanji.id) + ".svg", "w", "utf-8") - createSVG(out, kanji) - diff --git a/updatepublic.sh b/updatepublic.sh index 7ddafba09..b119b6efd 100755 --- a/updatepublic.sh +++ b/updatepublic.sh @@ -3,7 +3,7 @@ d=`date +%Y%m%d` outFileOne="kanjivg-$d.xml.gz" outFileAll="kanjivg-$d-all.zip" zip -r $outFileAll kanji -python createsinglerelease.py +python kvg.py release gzip -c kanjivg.xml >$outFileOne scp $outFileOne $outFileAll gnurou@gnurou.org:/srv/http/kanjivg/upload/Main/ ssh gnurou@gnurou.org "ln -sf $outFileOne /srv/http/kanjivg/upload/Main/kanjivg-latest.xml.gz"