[Python-modules-commits] [wlc] 01/02: Initial packaging

Michal Cihar nijel at moszumanska.debian.org
Fri Jul 8 09:07:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

nijel pushed a commit to branch master
in repository wlc.

commit 8ca5607cbf909eb4aec93c513b6f96a2dae4d72f
Author: Michal Čihař <michal at cihar.com>
Date:   Fri Jul 8 10:48:13 2016 +0200

    Initial packaging
    
    Signed-off-by: Michal Čihař <michal at cihar.com>
---
 debian/changelog     |   5 +
 debian/compat        |   1 +
 debian/control       |  29 +++++
 debian/copyright     |  29 +++++
 debian/manpages      |   1 +
 debian/rules         |   9 ++
 debian/source/format |   1 +
 debian/watch         |   4 +
 debian/wlc.1         | 308 +++++++++++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 387 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..2d7d4f6
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+wlc (0.4-1) unstable; urgency=low
+
+  * Initial packaging, Closes: #824258.
+
+ -- Michal Čihař <nijel at debian.org>  Fri, 08 Jul 2016 11:03:46 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..df59e2d
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,29 @@
+Source: wlc
+Section: python
+Priority: optional
+Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
+Uploaders: Michal Čihař <nijel at debian.org>
+Build-Depends: debhelper (>= 9), dh-python,
+               python3-all,
+               python3-setuptools,
+               python3-pytest,
+               python3-httpretty,
+               python3-xdg,
+               python3-six
+Standards-Version: 3.9.8
+Homepage: https://weblate.org/
+Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/wlc.git
+Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/wlc.git
+
+Package: wlc
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}, python3-six, python3-xdg
+Recommends: ${python3:Recommends}
+Suggests: ${python3:Suggests}
+Provides: python3-wlc
+Description: Command line utility for Weblate
+ Weblate is web based translation with tight VCS integration supporting wide
+ range of file formats and makes it easy for translators to contribute.
+ .
+ This package provides command line utility to work with Weblate remotely and
+ python module.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..1cb6046
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,29 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: wlc
+Upstream-Contact: Michal Čihař <michal at cihar.com>
+Source: https://weblate.org/
+
+Files: *
+Copyright: 2015 © Michal Čihař <michal at cihar.com>
+License: GPL-3+
+
+Files: debian/*
+Copyright: 2015 © Michal Čihař <nijel at debian.org>
+License: GPL-3+
+
+License: GPL-3+
+ 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 <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General Public
+ License version 3 can be found in `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..180728d
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+debian/wlc.1
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..dec1f75
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,9 @@
+#! /usr/bin/make -f
+
+%:
+	dh $@ --with python3 --buildsystem=pybuild
+
+override_dh_auto_test:
+	# Testsuite fails due to some problems in httpretty
+	# or httplib in Debian
+	#py.test-3 wlc
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..da21bc3
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+# try also https://pypi.debian.net/wlc/watch
+version=3
+opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
+https://pypi.debian.net/wlc/wlc-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
diff --git a/debian/wlc.1 b/debian/wlc.1
new file mode 100644
index 0000000..25ae05b
--- /dev/null
+++ b/debian/wlc.1
@@ -0,0 +1,308 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "WLC" "1" "Jul 08, 2016" "2.7" "Weblate"
+.SH NAME
+wlc \- Weblate Client Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+New in version 2.7: The wlc utility is fully supported since Weblate 2.7. If you are using older version
+some incompatibilities with API might occur.
+
+.SH INSTALATION
+.sp
+The Weblate Client is shipped separately, you need to install wlc to have it,
+it also includes Python module \fBwlc\fP:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+pip install wlc
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SH SYNOPSIS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+wlc [parameter] <command> [options]
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+Commands actually indicate which operation should be performed.
+.SH DESCRIPTION
+.sp
+Weblate Client is Python library and command line utility to manage Weblate remotely
+using api\&. The command line utility can be invoked as \fBwlc\fP and is
+build on \fBwlc\fP\&.
+.SS Global options
+.sp
+The program accepts following global options, which must be entered before subcommand.
+.INDENT 0.0
+.TP
+.B \-\-format {csv,json,text,html}
+Specify output format.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-url URL
+Specify API URL. Overrides value from configuration file, see \fI\%Files\fP\&.
+The URL should end with \fB/api/\fP, for example \fBhttps://hosted.weblate.org/api/\fP\&.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-key KEY
+Specify API user key to use. Overrides value from configuration file, see \fI\%Files\fP\&.
+You can figure out your key in your profile in Weblate.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-config PATH
+Override path to configuration file, see \fI\%Files\fP\&.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-config\-section SECTION
+Override section to use in configuration file, see \fI\%Files\fP\&.
+.UNINDENT
+.SS Subcommands
+.sp
+Currently following subcommands are available:
+.INDENT 0.0
+.TP
+.B version
+Prints current version.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B list\-languages
+List used languages in Weblate.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B list\-projects
+List projects in Weblate.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B list\-components
+List components in Weblate.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B list\-translations
+List translations in Weblate.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B show
+Shows Weblate object (translation, component or project).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B ls
+Lists Weblate object (translation, component or project).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B commit
+Commits changes in Weblate object (translation, component or project).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B pull
+Pulls remote repository changes into Weblate object (translation, component or project).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B push
+Pusches changes in Weblate object into remote repository (translation, component or project).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B repo
+Displays repository status for given Weblate object (translation, component or project).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B statistics
+Displays detailed statistics for given Weblate object (translation or component).
+.UNINDENT
+.SH FILES
+.INDENT 0.0
+.TP
+.B \fB\&.weblate\fP
+Per project configuration file
+.TP
+.B \fB~/.config/weblate\fP
+User configuration file
+.TP
+.B \fB/etc/xdg/weblate\fP
+Global configration file
+.UNINDENT
+.sp
+The program follows XDG specification, so you can adjust placement of config files
+by environment variables \fBXDG_CONFIG_HOME\fP or \fBXDG_CONFIG_DIRS\fP\&.
+.sp
+Following settings can be configured in the \fB[weblate]\fP section (you can
+customize this by \fI\%\-\-config\-section\fP):
+.INDENT 0.0
+.TP
+.B key
+API KEY to access Weblate.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B url
+API server URL, defaults to \fBhttp://127.0.0.1:8000/api/\fP\&.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B translation
+Path of default translation, component or project.
+.UNINDENT
+.sp
+The configuration file is INI file, for example:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+[weblate]
+url = https://hosted.weblate.org/api/
+key = APIKEY
+translation = weblate/master
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+Additionally API keys can be stored in the \fB[keys]\fP section:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+[keys]
+https://hosted.weblate.org/api/ = APIKEY
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+This allows you to store keys in your personal settings, while having
+\fB\&.weblate\fP configuration in the VCS repository so that wlc knows to which
+server it should talk.
+.SH EXAMPLES
+.sp
+Print current program version:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+$ wlc version
+version: 0.1
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+List all projects:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+$ wlc list\-projects
+name: Hello
+slug: hello
+source_language: en
+url: http://example.com/api/projects/hello/
+web: http://weblate.org/
+web_url: http://example.com/projects/hello/
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+You can also let wlc know current project and it will then operate on it:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+$ cat .weblate
+[weblate]
+url = https://hosted.weblate.org/api/
+translation = weblate/master
+
+$ wlc show
+branch: master
+file_format: po
+filemask: weblate/locale/*/LC_MESSAGES/django.po
+git_export: git://git.weblate.org/weblate.git
+license: GPL\-3.0+
+license_url: https://spdx.org/licenses/GPL\-3.0+
+name: master
+new_base: weblate/locale/django.pot
+project: weblate
+repo: git://github.com/nijel/weblate.git
+slug: master
+template:
+url: https://hosted.weblate.org/api/components/weblate/master/
+vcs: git
+web_url: https://hosted.weblate.org/projects/weblate/master/
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+With such setup it is easy to commit pending changes in current project:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+$ wlc commit
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SH AUTHOR
+Michal Čihař
+.SH COPYRIGHT
+2012 - 2016, Michal Čihař
+.\" Generated by docutils manpage writer.
+.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/wlc.git



More information about the Python-modules-commits mailing list