[svnbook commit] r1575 - trunk/src/ru
dmitriy
svnbook-dev at red-bean.com
Fri Jul 29 15:18:57 CDT 2005
Author: dmitriy
Date: Fri Jul 29 15:18:56 2005
New Revision: 1575
Modified:
trunk/src/ru/Makefile
trunk/src/ru/sync.py
Log:
* ru/sync.py
* ru/Makefile
Return to a way suggested by default for printing revision number
of the book on a title page
Modified: trunk/src/ru/Makefile
==============================================================================
--- trunk/src/ru/Makefile (original)
+++ trunk/src/ru/Makefile Fri Jul 29 15:18:56 2005
@@ -6,10 +6,5 @@
BOOK_FO_XSLTPROC_OPTS = --stringparam paper.type A4
L10N_REVISION = в редакции
-$(BOOK_VERSION_SOURCE): book-last-updated
-
-book-last-updated:
- @python sync.py -v
-
-dist-html-chunk: book-last-updated
+dist-html-chunk:
../tools/book-dist.py --html-chunk --name svnbook-html-chunk-ru
Modified: trunk/src/ru/sync.py
==============================================================================
--- trunk/src/ru/sync.py (original)
+++ trunk/src/ru/sync.py Fri Jul 29 15:18:56 2005
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-# -*- coding: utf-8 -*-
import sys, os, string, getopt, re, glob
@@ -12,7 +11,6 @@
Options:
-f: File which needs to be synchronized
-l: List all files and revisions with which they are sinchronized
- -v: Print incorporated revision number of the book (for use in Makefile)
""" % (os.path.basename(sys.argv[0])))
sys.exit(err_msg and 1 or 0)
@@ -45,28 +43,12 @@
for file in fnames:
print file, '\t', get_last(file)
-def get_version():
- v = string.Template('<!ENTITY svn.version "в редакции $r1, на основе $r2">')
- f = open('version.xml', 'w')
- fnames = glob.glob('*.xml')
- rev = []
- for file in fnames:
- r = get_last(file)
- if r:
- rev.append(r)
- r_max = max(rev)
- r_min = min(rev)
- if r_max == r_min:
- f.write(v.substitute(r1=get_base(), r2=r_max))
- else:
- f.write(v.substitute(r1=get_base(), r2=str(r_min)+':'+str(r_max)))
-
def main():
if len(sys.argv) < 2:
usage(None)
os.chdir('book')
try:
- opts, args = getopt.getopt(sys.argv[1:], "f:lv")
+ opts, args = getopt.getopt(sys.argv[1:], "f:l")
except:
usage('Invalid syntax')
fname = ''
@@ -75,8 +57,6 @@
fname = os.path.basename(a)
elif o == '-l':
return get_list()
- elif o == '-v':
- return get_version()
cmd = string.Template('svn $a -r $r1:$r2 https://svn.red-bean.com/svnbook/trunk/src/en/book/$t')
last = get_last(fname)
base = get_base()
More information about the svnbook-dev
mailing list