[PATCH 2 of 2] Add a `checkupdate' script to the doc/el_GR* tree, to assist the

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Dec 28 01:54:17 EET 2007


# HG changeset patch
# User keramida
# Date 1198799621 -7200
# Node ID 67ed65ca66804e9c8e3da8f779b26cfc83251603
# Parent  bfce02a998796cb279947bad5ba7e8165774136a
Add a `checkupdate' script to the doc/el_GR* tree, to assist the
translators to easily and quickly find which Greek translations can be
updated from their English sources (and where the sources live).

diff --git a/el_GR.ISO8859-7/share/tools/checkupdate/Makefile b/el_GR.ISO8859-7/share/tools/checkupdate/Makefile
new file mode 100644
--- /dev/null
+++ b/el_GR.ISO8859-7/share/tools/checkupdate/Makefile
@@ -0,0 +1,13 @@
+# Makefile for installing the `checkupdate' utility.
+
+SCRIPTS= checkupdate
+MAN= checkupdate.1
+
+CLEANFILES= ${SCRIPTS}
+
+.SUFFIXES:	.py
+
+.py:
+	cat ${.ALLSRC} > ${.TARGET}
+
+.include <bsd.prog.mk>
diff --git a/el_GR.ISO8859-7/share/tools/checkupdate/checkupdate.1 b/el_GR.ISO8859-7/share/tools/checkupdate/checkupdate.1
new file mode 100644
--- /dev/null
+++ b/el_GR.ISO8859-7/share/tools/checkupdate/checkupdate.1
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2007 Giorgos Keramidas <keramida at FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 25, 2007
+.Dt CHECKUPDATE 1
+.Os
+.Sh NAME
+.Nm checkupdate
+.Nd "check a translation of the FreeBSD doc/ tree for source updates"
+.Sh SYNOPSIS
+.Nm
+.Op Fl a
+.Oo
+.Ar flist Op Ar "..."
+.Oc
+.Sh DESCRIPTION
+The
+.Nm
+utility checks a translation of the FreeBSD
+.Pa "doc/"
+tree for source updates, i.e.\& changes in their original English source
+files which may be interesting to merge.
+.Pp
+The list of files to check can be specified in the command-line of the
+.Nm
+utility, or it can be fed to the script through its standard input
+stream.
+.Pp
+The number of checks performed, and the format of the script output are
+controlled by command-line options.
+.Pp
+The options are as follows:
+.Bl -tag -width ".Fl f Ar flist"
+.It Fl a
+Enable all the checks for each input file
+.Pq Dq all checks .
+.It Fl n
+Disable all checks for each input file
+.Pq Dq no checks .
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh SEE ALSO
+.Xr python 1
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+This manual page was written by
+.An Giorgos Keramidas Aq keramida at FreeBSD.org .
+.Sh BUGS
+The actual code for this utility is vaporware.
diff --git a/el_GR.ISO8859-7/share/tools/checkupdate/checkupdate.py b/el_GR.ISO8859-7/share/tools/checkupdate/checkupdate.py
new file mode 100644
--- /dev/null
+++ b/el_GR.ISO8859-7/share/tools/checkupdate/checkupdate.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+
+#-
+# Copyright (c) 2007 Giorgos Keramidas <keramida at FreeBSD.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+"""
+The translation helper utility `checkupdate'.
+
+To use this utility, you have to check out a clean copy of the doc/ tree of
+FreeBSD which includes at least the following subdirectories:
+
+    el_GR.ISO8859-7
+    en_US.ISO8859-1
+    share
+
+Then you can feed a list of files (flist) from the `el_GR.ISO8859-7' part of
+the tree to the standard input of this script, and it will try to print a
+report of updates which may be useful to merge from `en_US' to `el_GR'.
+
+NOTE: The `checkupdate' script depends on manually maintained %SOURCE% and
+%SRCID% comments in the `el_GR' part of the tree, to work correctly.  It does
+not maintain the comments/tags itself, though.
+"""
+
+import sys
+import os
+
+# Alias some functions from other modules, to shorter, easier to use names.
+exit = sys.exit
+
+# Save the invocation name of the script, for later use.
+progname = os.path.basename(sys.argv[0])
+
+if __name__ == "__main__":
+    print "%s script starting" % progname
+    exit(0)




More information about the Freebsd-doc-el mailing list