1
0
mirror of https://github.com/KanjiVG/kanjivg.git synced 2026-04-21 04:50:44 +02:00

Improve the documentation about the release

Add some comments in kvg.py.

Remove commented-out code in updatepublic.sh
This commit is contained in:
Ben Bullock
2024-08-04 11:54:11 +09:00
parent ad09506db7
commit ff5fc3d396
3 changed files with 46 additions and 3 deletions

43
README
View File

@@ -12,3 +12,46 @@ See the file COPYING for more details.
Documentation
-------------
The project's documentation is at https://kanjivg.tagaini.net/.
Releases
--------
The files in the release are as follows:
* kanjivg-YYYYMMDD-main.zip
This zip file contains all of the non-variant SVG files in the same
format as they were in the repository at the time the release was
made. This is the file which is recommended for most users who simply
want a set of SVG graphics they can use immediately.
* kanjivg-YYYYMMDD-all.zip
This zip file contains all of the SVG files, including the variant
forms, in the same format as they were in the repository at the time
the release was made.
* kanjivg-YYYYMMDD.xml.gz
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
format. This file is generated by `kvg.py`.
* Source code files
These are the entire repository's source code files. These are
generated by github.
Utilities
---------
The main utility is `kvg.py`. Releases are generated using the
`updatepublic.sh` shell script. There is some Python library code in
`kanjivg.py` for manipulating the files. The file `make-index.pl` is
for making an index of the kanji files called `kvg-index.json` which
is used by the viewer at the kanjivg website. Unfortunately this needs
to be part of this repository in order that the Javascript viewer can
work properly.

4
kvg.py
View File

@@ -67,6 +67,8 @@ def release():
allfiles = os.listdir(datadir)
files = []
for f in allfiles:
# This rejects the variant files by only choosing
# files with length of 9, for 0abcd.svg style files.
if len(f) == 9: files.append(f)
del allfiles
files.sort()
@@ -75,7 +77,7 @@ def release():
out.write('<?xml version="1.0" encoding="UTF-8"?>\n')
out.write("<!--\n")
out.write(licenseString)
out.write("\nThis file has been generated on %s, using the latest KanjiVG data\nto this date." % (datetime.date.today()))
out.write("\nThis file was generated on %s from the most recent KanjiVG data." % (datetime.date.today()))
out.write("\n-->\n")
out.write("<kanjivg xmlns:kvg='http://kanjivg.tagaini.net'>\n")
for f in files:

View File

@@ -7,5 +7,3 @@ zip -r $outFileAll kanji/*.svg
zip -r $outFileMain kanji/?????.svg
./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"