├── .gitignore ├── LICENSE ├── README.md ├── bufr ├── MANIFEST ├── bufr │ ├── _BUFRFile.c │ ├── __init__.py │ ├── deprecated │ │ ├── BUFRFile.c │ │ └── BUFRFile_old.c │ └── scripts │ │ └── bufr2json ├── debian │ ├── README.Debian │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── cron.d.ex │ ├── dirs │ ├── docs │ ├── emacsen-install.ex │ ├── emacsen-remove.ex │ ├── emacsen-startup.ex │ ├── files │ ├── init.d.ex │ ├── init.d.lsb.ex │ ├── manpage.1.ex │ ├── manpage.sgml.ex │ ├── manpage.xml.ex │ ├── menu.ex │ ├── postinst.ex │ ├── postrm.ex │ ├── preinst.ex │ ├── prerm.ex │ ├── pybufr-default.ex │ ├── pybufr.doc-base.EX │ ├── pybufr.postinst.debhelper │ ├── pybufr.prerm.debhelper │ ├── pybufr.substvars │ ├── rules │ └── watch.ex ├── setup.py └── test │ ├── bufrtables │ ├── B0000000000000007000.TXT │ ├── B0000000000000008000.TXT │ ├── B0000000000000009000.TXT │ ├── B0000000000000010000.TXT │ ├── B0000000000000011000.TXT │ ├── B0000000000000012000.TXT │ ├── B0000000000000013000.TXT │ ├── B0000000000000014000.TXT │ ├── B0000000000034011001.TXT │ ├── B0000000000034013001.TXT │ ├── B0000000000059003003.TXT │ ├── B0000000000078011007.TXT │ ├── B0000000000078011008.TXT │ ├── B0000000000089011255.TXT │ ├── B0000000000089012001.TXT │ ├── B0000000000098000000.TXT │ ├── B0000000000098002001.TXT │ ├── B0000000000098006000.TXT │ ├── B0000000000098006001.TXT │ ├── B0000000000098007001.TXT │ ├── B0000000000098008001.TXT │ ├── B0000000000098009001.TXT │ ├── B0000000000098010001.TXT │ ├── B0000000000098011000.TXT │ ├── B0000000000098011001.TXT │ ├── B0000000000098012000.TXT │ ├── B0000000000098012001.TXT │ ├── B0000000000098013001.TXT │ ├── B0000000000098014001.TXT │ ├── B0000000000099010001.TXT │ ├── B0000000000254010001.TXT │ ├── B0000000000254011001.TXT │ ├── C0000000000000007000.TXT │ ├── C0000000000000008000.TXT │ ├── C0000000000000009000.TXT │ ├── C0000000000000010000.TXT │ ├── C0000000000000011000.TXT │ ├── C0000000000000012000.TXT │ ├── C0000000000000013000.TXT │ ├── C0000000000000014000.TXT │ ├── C0000000000034011001.TXT │ ├── C0000000000034013001.TXT │ ├── C0000000000059003003.TXT │ ├── C0000000000078011007.TXT │ ├── C0000000000078011008.TXT │ ├── C0000000000089011255.TXT │ ├── C0000000000089012001.TXT │ ├── C0000000000098000000.TXT │ ├── C0000000000098002001.TXT │ ├── C0000000000098006000.TXT │ ├── C0000000000098006001.TXT │ ├── C0000000000098007001.TXT │ ├── C0000000000098008001.TXT │ ├── C0000000000098009001.TXT │ ├── C0000000000098010001.TXT │ ├── C0000000000098011000.TXT │ ├── C0000000000098011001.TXT │ ├── C0000000000098012000.TXT │ ├── C0000000000098012001.TXT │ ├── C0000000000098013001.TXT │ ├── C0000000000098014001.TXT │ ├── C0000000000099010001.TXT │ ├── C0000000000254010001.TXT │ ├── D0000000000000007000.TXT │ ├── D0000000000000008000.TXT │ ├── D0000000000000009000.TXT │ ├── D0000000000000010000.TXT │ ├── D0000000000000011000.TXT │ ├── D0000000000000012000.TXT │ ├── D0000000000000013000.TXT │ ├── D0000000000000014000.TXT │ ├── D0000000000034011001.TXT │ ├── D0000000000034013001.TXT │ ├── D0000000000059003003.TXT │ ├── D0000000000078011007.TXT │ ├── D0000000000078011008.TXT │ ├── D0000000000089011255.TXT │ ├── D0000000000089012001.TXT │ ├── D0000000000098000000.TXT │ ├── D0000000000098002001.TXT │ ├── D0000000000098006000.TXT │ ├── D0000000000098006001.TXT │ ├── D0000000000098007001.TXT │ ├── D0000000000098008001.TXT │ ├── D0000000000098009001.TXT │ ├── D0000000000098010001.TXT │ ├── D0000000000098011000.TXT │ ├── D0000000000098011001.TXT │ ├── D0000000000098012000.TXT │ ├── D0000000000098012001.TXT │ ├── D0000000000098013001.TXT │ ├── D0000000000098014001.TXT │ ├── D0000000000099010001.TXT │ └── D0000000000254010001.TXT │ ├── metop_mhs.bufr │ └── test.py ├── doc ├── Makefile ├── build │ ├── doctrees │ │ ├── environment.pickle │ │ ├── index.doctree │ │ ├── install.doctree │ │ └── usage-bufr.doctree │ └── html │ │ ├── .buildinfo │ │ ├── _sources │ │ ├── index.txt │ │ ├── install.txt │ │ └── usage-bufr.txt │ │ ├── _static │ │ ├── basic.css │ │ ├── default.css │ │ ├── doctools.js │ │ ├── file.png │ │ ├── jquery.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── sidebar.js │ │ └── underscore.js │ │ ├── genindex.html │ │ ├── index.html │ │ ├── install.html │ │ ├── objects.inv │ │ ├── search.html │ │ ├── searchindex.js │ │ └── usage-bufr.html ├── images │ ├── bufr-python-packages.png │ ├── dep.png │ └── python-bufrtranslationdatabase.png └── source │ ├── conf.py │ ├── index.rst │ ├── install.rst │ └── usage-bufr.rst ├── install_all.sh ├── metadb ├── debian │ ├── README.Debian │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── cron.d.ex │ ├── dirs │ ├── docs │ ├── emacsen-install.ex │ ├── emacsen-remove.ex │ ├── emacsen-startup.ex │ ├── files │ ├── init.d.ex │ ├── init.d.lsb.ex │ ├── manpage.1.ex │ ├── manpage.sgml.ex │ ├── manpage.xml.ex │ ├── menu.ex │ ├── postinst.ex │ ├── postrm.ex │ ├── preinst.ex │ ├── prerm.ex │ ├── pybufr-metadb-default.ex │ ├── pybufr-metadb.doc-base.EX │ ├── rules │ └── watch.ex ├── metadb │ ├── __init__.py │ └── scripts │ │ ├── assign_variables │ │ ├── export_bfr │ │ ├── import_bfr │ │ └── sqlite_view_bufr └── setup.py ├── sqlalchemy-marshall ├── debian │ ├── README.Debian │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── cron.d.ex │ ├── dirs │ ├── docs │ ├── emacsen-install.ex │ ├── emacsen-remove.ex │ ├── emacsen-startup.ex │ ├── files │ ├── init.d.ex │ ├── init.d.lsb.ex │ ├── manpage.1.ex │ ├── manpage.sgml.ex │ ├── manpage.xml.ex │ ├── menu.ex │ ├── postinst.ex │ ├── postrm.ex │ ├── preinst.ex │ ├── prerm.ex │ ├── rules │ ├── sqlalchemy-marshall-default.ex │ ├── sqlalchemy-marshall.doc-base.EX │ ├── sqlalchemy-marshall.postinst.debhelper │ ├── sqlalchemy-marshall.prerm.debhelper │ ├── sqlalchemy-marshall.substvars │ └── watch.ex ├── setup.py └── sqlalchemy_marshall │ └── __init__.py ├── transform ├── debian │ ├── README.Debian │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── cron.d.ex │ ├── dirs │ ├── docs │ ├── emacsen-install.ex │ ├── emacsen-remove.ex │ ├── emacsen-startup.ex │ ├── init.d.ex │ ├── init.d.lsb.ex │ ├── manpage.1.ex │ ├── manpage.sgml.ex │ ├── manpage.xml.ex │ ├── menu.ex │ ├── postinst.ex │ ├── postrm.ex │ ├── preinst.ex │ ├── prerm.ex │ ├── pybufr-transform-default.ex │ ├── pybufr-transform.doc-base.EX │ ├── rules │ └── watch.ex ├── setup.py └── transform │ ├── __init__.py │ ├── bufr2netcdf3.py │ ├── bufr2netcdf3_old.py │ ├── bufr2netcdf4.py │ └── scripts │ ├── bufr2netcdf │ └── bufr2netcdf4 └── xml-marshall ├── debian ├── README.Debian ├── changelog ├── compat ├── control ├── copyright ├── cron.d.ex ├── dirs ├── docs ├── emacsen-install.ex ├── emacsen-remove.ex ├── emacsen-startup.ex ├── files ├── init.d.ex ├── init.d.lsb.ex ├── manpage.1.ex ├── manpage.sgml.ex ├── manpage.xml.ex ├── menu.ex ├── postinst.ex ├── postrm.ex ├── preinst.ex ├── prerm.ex ├── rules ├── watch.ex ├── xml-marshall-default.ex ├── xml-marshall.doc-base.EX ├── xml-marshall.postinst.debhelper ├── xml-marshall.prerm.debhelper └── xml-marshall.substvars ├── setup.py └── xml_marshall └── __init__.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | lib/ 17 | lib64/ 18 | parts/ 19 | sdist/ 20 | var/ 21 | *.egg-info/ 22 | .installed.cfg 23 | *.egg 24 | 25 | # PyInstaller 26 | # Usually these files are written by a python script from a template 27 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 28 | *.manifest 29 | *.spec 30 | 31 | # Installer logs 32 | pip-log.txt 33 | pip-delete-this-directory.txt 34 | 35 | # Unit test / coverage reports 36 | htmlcov/ 37 | .tox/ 38 | .coverage 39 | .cache 40 | nosetests.xml 41 | coverage.xml 42 | 43 | # Translations 44 | *.mo 45 | *.pot 46 | 47 | # Django stuff: 48 | *.log 49 | 50 | # Sphinx documentation 51 | docs/_build/ 52 | 53 | # PyBuilder 54 | target/ 55 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | python-bufr 2 | =========== 3 | 4 | THIS REPO IS NOT MAINTAINED ANYMORE! 5 | If you need to read BUFR files, please check out pybufrkit (https://github.com/ywangd/pybufrkit) or eccodes (https://github.com/ecmwf/eccodes). 6 | 7 | Introduction 8 | ============ 9 | 10 | Generic BUFR file reader written in python. File support is similar to the ECMWF BUFR library. 11 | 12 | Only reading supported for now. 13 | 14 | Depends on 15 | 16 | * ECMWF BUFR library and tables 17 | * python numpy 18 | 19 | This module is part of the Pytroll project. 20 | 21 | The python-bufr module is now available on pypi. See link below for install instructions: Documentation 22 | 23 | Comments and Suggestions 24 | ======================== 25 | 26 | Feel free to make suggestions for updates or new features in the issues tab. Don't be afraid that your might end up under the Committers tab to the right ... Because chances are that you will :-) 27 | 28 | NOW !! what to do with all that BUFR data ... well why not resample it !!! see http://github.com/mraspaud/pyresample/ 29 | 30 | Roadmap 31 | ======= 32 | 33 | * Generic BUFR to NetCDF conversion based on SQL-database variable translation tables ( Done ) 34 | * XML-RPC server/client interface 35 | -------------------------------------------------------------------------------- /bufr/MANIFEST: -------------------------------------------------------------------------------- 1 | setup.py 2 | bufr/_BUFRFile.c 3 | bufr/__init__.py 4 | -------------------------------------------------------------------------------- /bufr/bufr/scripts/bufr2json: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # python-bufr-transform , BUFR variable translation 4 | # 5 | # Copyright (C) 2010 Kristian Rune Larsen 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | # 20 | 21 | 22 | """ Dumps a BUFR file to JSON format """ 23 | 24 | import sys 25 | import getopt 26 | import json 27 | 28 | import bufr 29 | from bufr import BUFRFileEntry 30 | 31 | if __name__ == '__main__': 32 | 33 | def usage(): 34 | """ print basic usage and exit """ 35 | print """USAGE: 36 | bufr2json [ -s start index ] [ -e end index ] 37 | """ 38 | sys.exit(2) 39 | 40 | 41 | try: 42 | optlist, args = getopt.getopt(sys.argv[1:], 'hs:e:',[]) 43 | except IndexError: 44 | usage() 45 | 46 | start_index = 0 47 | end_index = None 48 | for opts in optlist: 49 | if opts[0] == '-h': 50 | usage() 51 | continue 52 | if opts[0] == '-s': 53 | start_index = int(opts[1]) 54 | continue 55 | if opts[0] == '-e': 56 | end_index = int(opts[1]) 57 | continue 58 | 59 | try: 60 | bfn = args[0] 61 | jfn = args[1] 62 | except: 63 | usage() 64 | 65 | class BUFRFileEntryEncoder(json.JSONEncoder): 66 | """ Simple class for encoding BUFRFileEntry 67 | """ 68 | def default(self, obj): 69 | if isinstance(obj, BUFRFileEntry): 70 | return {'index': obj.index , 71 | 'name': obj.name, 72 | 'unit': obj.unit, 73 | 'data': obj.data.tolist() } 74 | return json.JSONEncoder.default(self, obj) 75 | 76 | 77 | bfr = bufr.BUFRFile(bfn) 78 | jfp = open(jfn, 'w') 79 | for i,entries in enumerate(bfr): 80 | if i < start_index: 81 | continue 82 | if end_index: 83 | if i > end_index: 84 | break 85 | for entry in entries: 86 | json.dump(entry, fp=jfp, cls=BUFRFileEntryEncoder, sort_keys=True, indent=4) 87 | jfp.close() 88 | 89 | 90 | -------------------------------------------------------------------------------- /bufr/debian/README.Debian: -------------------------------------------------------------------------------- 1 | python-bufr for Debian 2 | ----------------- 3 | 4 | 5 | 6 | -- Kristian Rune Larsen Mon, 12 Oct 2009 12:11:58 +0200 7 | -------------------------------------------------------------------------------- /bufr/debian/changelog: -------------------------------------------------------------------------------- 1 | python-bufr (0.2-3) unstable; urgency=low 2 | 3 | * Optimization from Tomas Landelius, only the necessary part of the message 4 | is read and unecessary extra copy avoided. 5 | * Spell corrections from Tomas Landelius 6 | 7 | -- Kristian Rune Larsen Fri, 17 Feb 2012 14:41:30 +0100 8 | 9 | python-bufr (0.2-2) unstable; urgency=low 10 | 11 | * Bugfixes, better error handeling i C code. Errors are due to bad input 12 | data. 13 | * Allocates more space for message to handle EUMETSAT SSMIS BUFR files 14 | 15 | -- Kristian Rune Larsen Wed, 02 Nov 2011 12:29:15 +0100 16 | 17 | python-bufr (0.2-1) unstable; urgency=low 18 | 19 | * removed emos dependency 20 | 21 | -- Kristian Rune Larsen Thu, 10 Mar 2011 09:46:13 +0000 22 | 23 | python-bufr (0.2-0) unstable; urgency=low 24 | 25 | * x64 version working 26 | 27 | -- Kristian Rune Larsen Mon, 07 Mar 2011 15:23:45 +0000 28 | 29 | python-bufr (0.1-8) unstable; urgency=low 30 | 31 | * Buildt aginst new emos 377 library 32 | 33 | -- Kristian Rune Larsen Thu, 03 Mar 2011 09:55:38 +0000 34 | 35 | python-bufr (0.1-3) unstable; urgency=low 36 | 37 | * Added index to each bufr variable entry and moved functionality for renaming to python code 38 | 39 | -- Kristian Rune Larsen Tue, 20 Apr 2010 12:11:58 +0200 40 | 41 | python-bufr (0.1-2) unstable; urgency=low 42 | 43 | * Now depends on libemos 44 | 45 | -- Kristian Rune Larsen Mon, 12 Oct 2009 12:11:58 +0200 46 | 47 | python-bufr (0.1-1) unstable; urgency=low 48 | 49 | * Initial release (Closes: #nnnn) 50 | 51 | -- Kristian Rune Larsen Mon, 12 Oct 2009 12:11:58 +0200 52 | 53 | -------------------------------------------------------------------------------- /bufr/debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /bufr/debian/control: -------------------------------------------------------------------------------- 1 | Source: python-bufr 2 | Section: misc 3 | Priority: extra 4 | Maintainer: Kristian Rune Larsen 5 | Build-Depends: debhelper (>= 5), python-numpy, python-dev, emos 6 | Standards-Version: 3.7.2 7 | 8 | Package: python-bufr 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends}, python-numpy 11 | Description: DMI/TI Generic BUFR decoding python module 12 | Based on the ECMWF EMOS or BUFRDC library. 13 | -------------------------------------------------------------------------------- /bufr/debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Kristian Rune Larsen on 2 | Mon, 12 Oct 2009 12:11:58 +0200. 3 | 4 | It was downloaded from 5 | 6 | Upstream Author(s): 7 | 8 | 9 | 10 | 11 | Copyright: 12 | 13 | 14 | 15 | 16 | License: 17 | 18 | 19 | 20 | The Debian packaging is (C) 2009, Kristian Rune Larsen and 21 | is licensed under the GPL, see `/usr/share/common-licenses/GPL'. 22 | 23 | # Please also look if there are files or directories which have a 24 | # different copyright/license attached and list them here. 25 | -------------------------------------------------------------------------------- /bufr/debian/cron.d.ex: -------------------------------------------------------------------------------- 1 | # 2 | # Regular cron jobs for the python-bufr package 3 | # 4 | 0 4 * * * root python-bufr_maintenance 5 | -------------------------------------------------------------------------------- /bufr/debian/dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | usr/sbin 3 | -------------------------------------------------------------------------------- /bufr/debian/docs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/bufr/debian/docs -------------------------------------------------------------------------------- /bufr/debian/emacsen-install.ex: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | # /usr/lib/emacsen-common/packages/install/python-bufr 3 | 4 | # Written by Jim Van Zandt , borrowing heavily 5 | # from the install scripts for gettext by Santiago Vila 6 | # and octave by Dirk Eddelbuettel . 7 | 8 | FLAVOR=$1 9 | PACKAGE=python-bufr 10 | 11 | if [ ${FLAVOR} = emacs ]; then exit 0; fi 12 | 13 | echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} 14 | 15 | #FLAVORTEST=`echo $FLAVOR | cut -c-6` 16 | #if [ ${FLAVORTEST} = xemacs ] ; then 17 | # SITEFLAG="-no-site-file" 18 | #else 19 | # SITEFLAG="--no-site-file" 20 | #fi 21 | FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" 22 | 23 | ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} 24 | ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} 25 | 26 | # Install-info-altdir does not actually exist. 27 | # Maybe somebody will write it. 28 | if test -x /usr/sbin/install-info-altdir; then 29 | echo install/${PACKAGE}: install Info links for ${FLAVOR} 30 | install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz 31 | fi 32 | 33 | install -m 755 -d ${ELCDIR} 34 | cd ${ELDIR} 35 | FILES=`echo *.el` 36 | cp ${FILES} ${ELCDIR} 37 | cd ${ELCDIR} 38 | 39 | cat << EOF > path.el 40 | (setq load-path (cons "." load-path) byte-compile-warnings nil) 41 | EOF 42 | ${FLAVOR} ${FLAGS} ${FILES} 43 | rm -f *.el path.el 44 | 45 | exit 0 46 | -------------------------------------------------------------------------------- /bufr/debian/emacsen-remove.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # /usr/lib/emacsen-common/packages/remove/python-bufr 3 | 4 | FLAVOR=$1 5 | PACKAGE=python-bufr 6 | 7 | if [ ${FLAVOR} != emacs ]; then 8 | if test -x /usr/sbin/install-info-altdir; then 9 | echo remove/${PACKAGE}: removing Info links for ${FLAVOR} 10 | install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/python-bufr.info.gz 11 | fi 12 | 13 | echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} 14 | rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} 15 | fi 16 | -------------------------------------------------------------------------------- /bufr/debian/emacsen-startup.ex: -------------------------------------------------------------------------------- 1 | ;; -*-emacs-lisp-*- 2 | ;; 3 | ;; Emacs startup file, e.g. /etc/emacs/site-start.d/50python-bufr.el 4 | ;; for the Debian python-bufr package 5 | ;; 6 | ;; Originally contributed by Nils Naumann 7 | ;; Modified by Dirk Eddelbuettel 8 | ;; Adapted for dh-make by Jim Van Zandt 9 | 10 | ;; The python-bufr package follows the Debian/GNU Linux 'emacsen' policy and 11 | ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, 12 | ;; xemacs19, emacs20, xemacs20...). The compiled code is then 13 | ;; installed in a subdirectory of the respective site-lisp directory. 14 | ;; We have to add this to the load-path: 15 | (let ((package-dir (concat "/usr/share/" 16 | (symbol-name flavor) 17 | "/site-lisp/python-bufr"))) 18 | ;; If package-dir does not exist, the python-bufr package must have 19 | ;; removed but not purged, and we should skip the setup. 20 | (when (file-directory-p package-dir) 21 | (setq load-path (cons package-dir load-path)) 22 | (autoload 'python-bufr-mode "python-bufr-mode" 23 | "Major mode for editing python-bufr files." t) 24 | (add-to-list 'auto-mode-alist '("\\.python-bufr$" . python-bufr-mode)))) 25 | 26 | -------------------------------------------------------------------------------- /bufr/debian/files: -------------------------------------------------------------------------------- 1 | python-bufr_0.2-3_amd64.deb misc extra 2 | -------------------------------------------------------------------------------- /bufr/debian/init.d.ex: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # skeleton example file to build /etc/init.d/ scripts. 4 | # This file should be used to construct scripts for /etc/init.d. 5 | # 6 | # Written by Miquel van Smoorenburg . 7 | # Modified for Debian 8 | # by Ian Murdock . 9 | # Further changes by Javier Fernandez-Sanguino 10 | # 11 | # Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl 12 | # 13 | 14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15 | DAEMON=/usr/sbin/python-bufr 16 | NAME=python-bufr 17 | DESC=python-bufr 18 | 19 | test -x $DAEMON || exit 0 20 | 21 | LOGDIR=/var/log/python-bufr 22 | PIDFILE=/var/run/$NAME.pid 23 | DODTIME=1 # Time to wait for the server to die, in seconds 24 | # If this value is set too low you might not 25 | # let some servers to die gracefully and 26 | # 'restart' will not work 27 | 28 | # Include python-bufr defaults if available 29 | if [ -f /etc/default/python-bufr ] ; then 30 | . /etc/default/python-bufr 31 | fi 32 | 33 | set -e 34 | 35 | running_pid() 36 | { 37 | # Check if a given process pid's cmdline matches a given name 38 | pid=$1 39 | name=$2 40 | [ -z "$pid" ] && return 1 41 | [ ! -d /proc/$pid ] && return 1 42 | cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` 43 | # Is this the expected child? 44 | [ "$cmd" != "$name" ] && return 1 45 | return 0 46 | } 47 | 48 | running() 49 | { 50 | # Check if the process is running looking at /proc 51 | # (works for all users) 52 | 53 | # No pidfile, probably no daemon present 54 | [ ! -f "$PIDFILE" ] && return 1 55 | # Obtain the pid and check it against the binary name 56 | pid=`cat $PIDFILE` 57 | running_pid $pid $NAME || return 1 58 | return 0 59 | } 60 | 61 | force_stop() { 62 | # Forcefully kill the process 63 | [ ! -f "$PIDFILE" ] && return 64 | if running ; then 65 | kill -15 $pid 66 | # Is it really dead? 67 | [ -n "$DODTIME" ] && sleep "$DODTIME"s 68 | if running ; then 69 | kill -9 $pid 70 | [ -n "$DODTIME" ] && sleep "$DODTIME"s 71 | if running ; then 72 | echo "Cannot kill $LABEL (pid=$pid)!" 73 | exit 1 74 | fi 75 | fi 76 | fi 77 | rm -f $PIDFILE 78 | return 0 79 | } 80 | 81 | case "$1" in 82 | start) 83 | echo -n "Starting $DESC: " 84 | start-stop-daemon --start --quiet --pidfile $PIDFILE \ 85 | --exec $DAEMON -- $DAEMON_OPTS 86 | if running then 87 | echo "$NAME." 88 | else 89 | echo " ERROR." 90 | fi 91 | ;; 92 | stop) 93 | echo -n "Stopping $DESC: " 94 | start-stop-daemon --stop --quiet --pidfile $PIDFILE \ 95 | --exec $DAEMON 96 | echo "$NAME." 97 | ;; 98 | force-stop) 99 | echo -n "Forcefully stopping $DESC: " 100 | force_stop 101 | if ! running then 102 | echo "$NAME." 103 | else 104 | echo " ERROR." 105 | fi 106 | ;; 107 | #reload) 108 | # 109 | # If the daemon can reload its config files on the fly 110 | # for example by sending it SIGHUP, do it here. 111 | # 112 | # If the daemon responds to changes in its config file 113 | # directly anyway, make this a do-nothing entry. 114 | # 115 | # echo "Reloading $DESC configuration files." 116 | # start-stop-daemon --stop --signal 1 --quiet --pidfile \ 117 | # /var/run/$NAME.pid --exec $DAEMON 118 | #;; 119 | force-reload) 120 | # 121 | # If the "reload" option is implemented, move the "force-reload" 122 | # option to the "reload" entry above. If not, "force-reload" is 123 | # just the same as "restart" except that it does nothing if the 124 | # daemon isn't already running. 125 | # check wether $DAEMON is running. If so, restart 126 | start-stop-daemon --stop --test --quiet --pidfile \ 127 | /var/run/$NAME.pid --exec $DAEMON \ 128 | && $0 restart \ 129 | || exit 0 130 | ;; 131 | restart) 132 | echo -n "Restarting $DESC: " 133 | start-stop-daemon --stop --quiet --pidfile \ 134 | /var/run/$NAME.pid --exec $DAEMON 135 | [ -n "$DODTIME" ] && sleep $DODTIME 136 | start-stop-daemon --start --quiet --pidfile \ 137 | /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS 138 | echo "$NAME." 139 | ;; 140 | status) 141 | echo -n "$LABEL is " 142 | if running ; then 143 | echo "running" 144 | else 145 | echo " not running." 146 | exit 1 147 | fi 148 | ;; 149 | *) 150 | N=/etc/init.d/$NAME 151 | # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 152 | echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 153 | exit 1 154 | ;; 155 | esac 156 | 157 | exit 0 158 | -------------------------------------------------------------------------------- /bufr/debian/manpage.1.ex: -------------------------------------------------------------------------------- 1 | .\" Hey, EMACS: -*- nroff -*- 2 | .\" First parameter, NAME, should be all caps 3 | .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection 4 | .\" other parameters are allowed: see man(7), man(1) 5 | .TH PYBUFR SECTION "October 12, 2009" 6 | .\" Please adjust this date whenever revising the manpage. 7 | .\" 8 | .\" Some roff macros, for reference: 9 | .\" .nh disable hyphenation 10 | .\" .hy enable hyphenation 11 | .\" .ad l left justify 12 | .\" .ad b justify to both left and right margins 13 | .\" .nf disable filling 14 | .\" .fi enable filling 15 | .\" .br insert line break 16 | .\" .sp insert n+1 empty lines 17 | .\" for manpage-specific macros, see man(7) 18 | .SH NAME 19 | python-bufr \- program to do something 20 | .SH SYNOPSIS 21 | .B python-bufr 22 | .RI [ options ] " files" ... 23 | .br 24 | .B bar 25 | .RI [ options ] " files" ... 26 | .SH DESCRIPTION 27 | This manual page documents briefly the 28 | .B python-bufr 29 | and 30 | .B bar 31 | commands. 32 | .PP 33 | .\" TeX users may be more comfortable with the \fB\fP and 34 | .\" \fI\fP escape sequences to invode bold face and italics, 35 | .\" respectively. 36 | \fBpython-bufr\fP is a program that... 37 | .SH OPTIONS 38 | These programs follow the usual GNU command line syntax, with long 39 | options starting with two dashes (`-'). 40 | A summary of options is included below. 41 | For a complete description, see the Info files. 42 | .TP 43 | .B \-h, \-\-help 44 | Show summary of options. 45 | .TP 46 | .B \-v, \-\-version 47 | Show version of program. 48 | .SH SEE ALSO 49 | .BR bar (1), 50 | .BR baz (1). 51 | .br 52 | The programs are documented fully by 53 | .IR "The Rise and Fall of a Fooish Bar" , 54 | available via the Info system. 55 | .SH AUTHOR 56 | python-bufr was written by . 57 | .PP 58 | This manual page was written by Kristian Rune Larsen , 59 | for the Debian project (but may be used by others). 60 | -------------------------------------------------------------------------------- /bufr/debian/manpage.xml.ex: -------------------------------------------------------------------------------- 1 | 2 | .
will be generated. You may view the 11 | manual page with: nroff -man .
| less'. A 12 | typical entry in a Makefile or Makefile.am is: 13 | 14 | DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\ 15 | manpages/docbook.xsl 16 | XP=xsltproc -''-nonet 17 | 18 | manpage.1: manpage.dbk 19 | $(XP) $(DB2MAN) $< 20 | 21 | The xsltproc binary is found in the xsltproc package. The 22 | XSL files are in docbook-xsl. Please remember that if you 23 | create the nroff version in one of the debian/rules file 24 | targets (such as build), you will need to include xsltproc 25 | and docbook-xsl in your Build-Depends control field. 26 | 27 | --> 28 | 29 | 30 | FIRSTNAME"> 31 | SURNAME"> 32 | 33 | October 12, 2009"> 34 | 36 | SECTION"> 37 | krl@dmi.dk"> 38 | 39 | PYBUFR"> 40 | 41 | 42 | Debian"> 43 | GNU"> 44 | GPL"> 45 | ]> 46 | 47 | 48 | 49 |
50 | &dhemail; 51 |
52 | 53 | 2007 54 | &dhusername; 55 | 56 | &dhdate; 57 |
58 | 59 | &dhucpackage; 60 | 61 | &dhsection; 62 | 63 | 64 | &dhpackage; 65 | 66 | program to do something 67 | 68 | 69 | 70 | &dhpackage; 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | DESCRIPTION 79 | 80 | This manual page documents briefly the 81 | &dhpackage; and bar 82 | commands. 83 | 84 | This manual page was written for the &debian; distribution 85 | because the original program does not have a manual page. 86 | Instead, it has documentation in the &gnu; 87 | Info format; see below. 88 | 89 | &dhpackage; is a program that... 90 | 91 | 92 | 93 | OPTIONS 94 | 95 | These programs follow the usual &gnu; command line syntax, 96 | with long options starting with two dashes (`-'). A summary of 97 | options is included below. For a complete description, see the 98 | Info files. 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | Show summary of options. 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Show version of program. 115 | 116 | 117 | 118 | 119 | 120 | SEE ALSO 121 | 122 | bar (1), baz (1). 123 | 124 | The programs are documented fully by The Rise and 125 | Fall of a Fooish Bar available via the 126 | Info system. 127 | 128 | 129 | AUTHOR 130 | 131 | This manual page was written by &dhusername; &dhemail; for 132 | the &debian; system (but may be used by others). Permission is 133 | granted to copy, distribute and/or modify this document under 134 | the terms of the &gnu; General Public License, Version 2 any 135 | later version published by the Free Software Foundation. 136 | 137 | 138 | On Debian systems, the complete text of the GNU General Public 139 | License can be found in /usr/share/common-licenses/GPL. 140 | 141 | 142 | 143 |
144 | 145 | -------------------------------------------------------------------------------- /bufr/debian/menu.ex: -------------------------------------------------------------------------------- 1 | ?package(python-bufr):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ 2 | title="python-bufr" command="/usr/bin/python-bufr" 3 | -------------------------------------------------------------------------------- /bufr/debian/postinst.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for python-bufr 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see http://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | ;; 24 | 25 | abort-upgrade|abort-remove|abort-deconfigure) 26 | ;; 27 | 28 | *) 29 | echo "postinst called with unknown argument \`$1'" >&2 30 | exit 1 31 | ;; 32 | esac 33 | 34 | # dh_installdeb will replace this with shell code automatically 35 | # generated by other debhelper scripts. 36 | 37 | #DEBHELPER# 38 | 39 | exit 0 40 | 41 | 42 | -------------------------------------------------------------------------------- /bufr/debian/postrm.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for python-bufr 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `purge' 11 | # * `upgrade' 12 | # * `failed-upgrade' 13 | # * `abort-install' 14 | # * `abort-install' 15 | # * `abort-upgrade' 16 | # * `disappear' 17 | # 18 | # for details, see http://www.debian.org/doc/debian-policy/ or 19 | # the debian-policy package 20 | 21 | 22 | case "$1" in 23 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 24 | ;; 25 | 26 | *) 27 | echo "postrm called with unknown argument \`$1'" >&2 28 | exit 1 29 | ;; 30 | esac 31 | 32 | # dh_installdeb will replace this with shell code automatically 33 | # generated by other debhelper scripts. 34 | 35 | #DEBHELPER# 36 | 37 | exit 0 38 | 39 | 40 | -------------------------------------------------------------------------------- /bufr/debian/preinst.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # preinst script for python-bufr 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `install' 10 | # * `install' 11 | # * `upgrade' 12 | # * `abort-upgrade' 13 | # for details, see http://www.debian.org/doc/debian-policy/ or 14 | # the debian-policy package 15 | 16 | 17 | case "$1" in 18 | install|upgrade) 19 | ;; 20 | 21 | abort-upgrade) 22 | ;; 23 | 24 | *) 25 | echo "preinst called with unknown argument \`$1'" >&2 26 | exit 1 27 | ;; 28 | esac 29 | 30 | # dh_installdeb will replace this with shell code automatically 31 | # generated by other debhelper scripts. 32 | 33 | #DEBHELPER# 34 | 35 | exit 0 36 | 37 | 38 | -------------------------------------------------------------------------------- /bufr/debian/prerm.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # prerm script for python-bufr 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `upgrade' 11 | # * `failed-upgrade' 12 | # * `remove' `in-favour' 13 | # * `deconfigure' `in-favour' 14 | # `removing' 15 | # 16 | # for details, see http://www.debian.org/doc/debian-policy/ or 17 | # the debian-policy package 18 | 19 | 20 | case "$1" in 21 | remove|upgrade|deconfigure) 22 | ;; 23 | 24 | failed-upgrade) 25 | ;; 26 | 27 | *) 28 | echo "prerm called with unknown argument \`$1'" >&2 29 | exit 1 30 | ;; 31 | esac 32 | 33 | # dh_installdeb will replace this with shell code automatically 34 | # generated by other debhelper scripts. 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | 40 | 41 | -------------------------------------------------------------------------------- /bufr/debian/pybufr-default.ex: -------------------------------------------------------------------------------- 1 | # Defaults for python-bufr initscript 2 | # sourced by /etc/init.d/python-bufr 3 | # installed at /etc/default/python-bufr by the maintainer scripts 4 | 5 | # 6 | # This is a POSIX shell fragment 7 | # 8 | 9 | # Additional options that are passed to the Daemon. 10 | DAEMON_OPTS="" 11 | -------------------------------------------------------------------------------- /bufr/debian/pybufr.doc-base.EX: -------------------------------------------------------------------------------- 1 | Document: python-bufr 2 | Title: Debian python-bufr Manual 3 | Author: 4 | Abstract: This manual describes what python-bufr is 5 | and how it can be used to 6 | manage online manuals on Debian systems. 7 | Section: unknown 8 | 9 | Format: debiandoc-sgml 10 | Files: /usr/share/doc/python-bufr/python-bufr.sgml.gz 11 | 12 | Format: postscript 13 | Files: /usr/share/doc/python-bufr/python-bufr.ps.gz 14 | 15 | Format: text 16 | Files: /usr/share/doc/python-bufr/python-bufr.text.gz 17 | 18 | Format: HTML 19 | Index: /usr/share/doc/python-bufr/html/index.html 20 | Files: /usr/share/doc/python-bufr/html/*.html 21 | 22 | 23 | -------------------------------------------------------------------------------- /bufr/debian/pybufr.postinst.debhelper: -------------------------------------------------------------------------------- 1 | # Automatically added by dh_pysupport 2 | if which update-python-modules >/dev/null 2>&1; then 3 | update-python-modules pybufr 4 | fi 5 | # End automatically added section 6 | -------------------------------------------------------------------------------- /bufr/debian/pybufr.prerm.debhelper: -------------------------------------------------------------------------------- 1 | # Automatically added by dh_pysupport 2 | if which update-python-modules >/dev/null 2>&1; then 3 | update-python-modules -c pybufr 4 | fi 5 | # End automatically added section 6 | -------------------------------------------------------------------------------- /bufr/debian/pybufr.substvars: -------------------------------------------------------------------------------- 1 | shlibs:Depends=libc6 (>= 2.3.6-6~), libc6 (>= 2.4), libgfortran3 (>= 4.3) 2 | misc:Depends= 3 | -------------------------------------------------------------------------------- /bufr/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | 13 | 14 | 15 | configure: configure-stamp 16 | configure-stamp: 17 | dh_testdir 18 | # Add here commands to configure the package. 19 | 20 | touch configure-stamp 21 | 22 | 23 | build: build-stamp 24 | 25 | build-stamp: configure-stamp 26 | dh_testdir 27 | 28 | # Add here commands to compile the package. 29 | BUFR_LIBRARY_PATH=/opt/lib/emos BUFR_TABLES=/opt/lib/emos/bufrtables/ LDFLAGS="-L/opt/lib/emos -lemos" python setup.py build 30 | #docbook-to-man debian/python-bufr.sgml > python-bufr.1 31 | 32 | touch $@ 33 | 34 | clean: 35 | dh_testdir 36 | dh_testroot 37 | rm -f build-stamp configure-stamp 38 | 39 | # Add here commands to clean up after the build process. 40 | rm -rf $(CURDIR)/build $(CURDIR)/debian/python-bufr 41 | 42 | dh_clean 43 | 44 | install: build 45 | dh_testdir 46 | dh_testroot 47 | dh_clean -k 48 | dh_installdirs 49 | 50 | # Add here commands to install the package into debian/bufr. 51 | BUFR_LIBRARY_PATH=/opt/lib/emos BUFR_TABLES=/opt/lib/emos/bufrtables/ python setup.py install --root=$(CURDIR)/debian/python-bufr --prefix=/opt 52 | 53 | 54 | # Build architecture-independent files here. 55 | binary-indep: build install 56 | # We have nothing to do by default. 57 | 58 | # Build architecture-dependent files here. 59 | binary-arch: build install 60 | dh_testdir 61 | dh_testroot 62 | dh_installchangelogs 63 | dh_installdocs 64 | dh_installexamples 65 | # dh_install 66 | # dh_installmenu 67 | # dh_installdebconf 68 | # dh_installlogrotate 69 | # dh_installemacsen 70 | # dh_installpam 71 | # dh_installmime 72 | dh_pysupport 73 | # dh_installinit 74 | # dh_installcron 75 | # dh_installinfo 76 | dh_installman 77 | dh_link 78 | dh_strip 79 | dh_compress 80 | dh_fixperms 81 | # dh_perl 82 | # dh_makeshlibs 83 | dh_installdeb 84 | dh_shlibdeps 85 | dh_gencontrol 86 | dh_md5sums 87 | dh_builddeb 88 | 89 | binary: binary-indep binary-arch 90 | .PHONY: build clean binary-indep binary-arch binary install configure 91 | -------------------------------------------------------------------------------- /bufr/debian/watch.ex: -------------------------------------------------------------------------------- 1 | # Example watch control file for uscan 2 | # Rename this file to "watch" and then you can run the "uscan" command 3 | # to check for upstream updates and more. 4 | # See uscan(1) for format 5 | 6 | # Compulsory line, this is a version 3 file 7 | version=3 8 | 9 | # Uncomment to examine a Webpage 10 | # 11 | #http://www.example.com/downloads.php python-bufr-(.*)\.tar\.gz 12 | 13 | # Uncomment to examine a Webserver directory 14 | #http://www.example.com/pub/python-bufr-(.*)\.tar\.gz 15 | 16 | # Uncommment to examine a FTP server 17 | #ftp://ftp.example.com/pub/python-bufr-(.*)\.tar\.gz debian uupdate 18 | 19 | # Uncomment to find new files on sourceforge, for debscripts >= 2.9 20 | # http://sf.net/python-bufr/python-bufr-(.*)\.tar\.gz 21 | 22 | 23 | -------------------------------------------------------------------------------- /bufr/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # python-bufr , wrapper for ECMWF BUFR library 4 | # 5 | # Copyright (C) 2012 Kristian Rune Larsen 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | # 20 | 21 | """ install using LDFLAGS=-L/ CFLAGS=-I/ python setup.py install """ 22 | 23 | import os 24 | import sys 25 | from setuptools import setup, Extension 26 | 27 | BUFRFile = Extension('bufr/_BUFRFile', 28 | sources = ['bufr/_BUFRFile.c',], 29 | extra_compile_args = ['-O3','-g','-fstack-protector-all', 30 | '-D_FORTIFY_SOURCE=2'], 31 | extra_link_args = [], 32 | libraries = ['gfortran',],) 33 | setup(name='python-bufr', 34 | version='0.2-6', 35 | description='Generic Python BUFR file reader based on the ECMWF BUFR library', 36 | author='Kristian Rune Larsen', 37 | author_email='krl@dmi.dk', 38 | download_url="http://python-bufr.googlecode.com/files/python-bufr-0.2-5.tar.gz", 39 | url="http://python-bufr.googlecode.com/", 40 | install_requires=['numpy',], 41 | classifiers=[ 42 | 'Development Status :: 5 - Production/Stable', 43 | 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 44 | 'Programming Language :: Python', 45 | 'Operating System :: OS Independent', 46 | 'Intended Audience :: Science/Research', 47 | 'Topic :: Scientific/Engineering' 48 | ], 49 | packages = ['bufr'], 50 | ext_modules = [ BUFRFile, ] 51 | ) 52 | -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000000007000.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000000008000.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000000009000.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000000010000.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000000011000.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000000012000.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000000013000.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000000014000.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098014001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000034011001.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000034013001.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000059003003.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000078011007.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000078011008.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000089011255.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000089012001.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000098007001.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000098008001.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000098009001.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000098010001.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000098011000.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000098011001.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000098012000.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000098012001.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000099010001.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/B0000000000254010001.TXT: -------------------------------------------------------------------------------- 1 | B0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000000007000.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000000008000.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000000009000.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000000010000.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000000011000.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000000012000.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000000013000.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000000014000.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098014001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000034011001.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000034013001.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000059003003.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000078011007.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000078011008.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000089011255.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000089012001.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098000000.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/bufr/test/bufrtables/C0000000000098000000.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098002001.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/bufr/test/bufrtables/C0000000000098002001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098006000.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/bufr/test/bufrtables/C0000000000098006000.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098006001.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/bufr/test/bufrtables/C0000000000098006001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098007001.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098008001.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098009001.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098010001.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098011000.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098011001.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098012000.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098012001.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098013001.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/bufr/test/bufrtables/C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000098014001.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/bufr/test/bufrtables/C0000000000098014001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000099010001.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/C0000000000254010001.TXT: -------------------------------------------------------------------------------- 1 | C0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000000007000.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000000008000.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000000009000.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000000010000.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000000011000.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000000012000.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000000013000.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000000014000.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098014001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000034011001.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000034013001.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000059003003.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000078011007.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000078011008.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000089011255.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000089012001.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000098007001.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000098008001.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000098009001.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000098010001.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000098011000.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000098011001.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000098012000.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000098012001.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000099010001.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/bufrtables/D0000000000254010001.TXT: -------------------------------------------------------------------------------- 1 | D0000000000098013001.TXT -------------------------------------------------------------------------------- /bufr/test/metop_mhs.bufr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/bufr/test/metop_mhs.bufr -------------------------------------------------------------------------------- /bufr/test/test.py: -------------------------------------------------------------------------------- 1 | # python-bufr , wrapper for ECMWF BUFR library 2 | # 3 | # Copyright (C) 2012 Kristian Rune Larsen 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | # 18 | 19 | import os 20 | import sys 21 | import unittest 22 | 23 | import bufr 24 | 25 | test_dir = os.path.dirname(os.path.abspath(__file__)) 26 | 27 | class TestBUFRFile(unittest.TestCase): 28 | 29 | def setUp(self): 30 | os.environ['BUFR_TABLES'] = test_dir + "/bufrtables/" 31 | os.environ['PRINT_TABLE_NAMES'] = "false" 32 | 33 | def test_bufr_read(self): 34 | """Test reading data and data quality on Metop-A MHS BUFR file""" 35 | 36 | test_file = os.path.join(test_dir, "metop_mhs.bufr") 37 | bfr = bufr.BUFRFile(test_file) 38 | data = bfr.next() 39 | self.assertEqual(data[0].name.strip(' '), "TOVS/ATOVS PRODUCT QUALIFIER") 40 | self.assertEqual(data[0].data[0], 3) 41 | self.assertEqual(data[0].unit.strip(' '), "CODE TABLE 8070") 42 | self.assertEqual(data[0].index, 0) 43 | 44 | def test_bufr_interate(self): 45 | """Test reading all data, last entry""" 46 | 47 | test_file = os.path.join(test_dir, "metop_mhs.bufr") 48 | bfr = bufr.BUFRFile(test_file) 49 | for i,data in enumerate(bfr): 50 | pass 51 | self.assertEqual(i, 3) 52 | self.assertEqual(data[0].name.strip(' '), "TOVS/ATOVS PRODUCT QUALIFIER") 53 | self.assertEqual(data[0].data[0], 3) 54 | self.assertEqual(data[0].unit.strip(' '), "CODE TABLE 8070") 55 | self.assertEqual(data[0].index, 0) 56 | 57 | if __name__ == '__main__': 58 | unittest.main() 59 | 60 | -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 14 | 15 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest 16 | 17 | help: 18 | @echo "Please use \`make ' where is one of" 19 | @echo " html to make standalone HTML files" 20 | @echo " dirhtml to make HTML files named index.html in directories" 21 | @echo " singlehtml to make a single large HTML file" 22 | @echo " pickle to make pickle files" 23 | @echo " json to make JSON files" 24 | @echo " htmlhelp to make HTML files and a HTML help project" 25 | @echo " qthelp to make HTML files and a qthelp project" 26 | @echo " devhelp to make HTML files and a Devhelp project" 27 | @echo " epub to make an epub" 28 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 29 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 30 | @echo " text to make text files" 31 | @echo " man to make manual pages" 32 | @echo " changes to make an overview of all changed/added/deprecated items" 33 | @echo " linkcheck to check all external links for integrity" 34 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 35 | 36 | clean: 37 | -rm -rf $(BUILDDIR)/* 38 | 39 | html: 40 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 41 | @echo 42 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 43 | 44 | dirhtml: 45 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 46 | @echo 47 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 48 | 49 | singlehtml: 50 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 51 | @echo 52 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 53 | 54 | pickle: 55 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 56 | @echo 57 | @echo "Build finished; now you can process the pickle files." 58 | 59 | json: 60 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 61 | @echo 62 | @echo "Build finished; now you can process the JSON files." 63 | 64 | htmlhelp: 65 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 66 | @echo 67 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 68 | ".hhp project file in $(BUILDDIR)/htmlhelp." 69 | 70 | qthelp: 71 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 72 | @echo 73 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 74 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 75 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Python-bufr.qhcp" 76 | @echo "To view the help file:" 77 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Python-bufr.qhc" 78 | 79 | devhelp: 80 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 81 | @echo 82 | @echo "Build finished." 83 | @echo "To view the help file:" 84 | @echo "# mkdir -p $$HOME/.local/share/devhelp/Python-bufr" 85 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Python-bufr" 86 | @echo "# devhelp" 87 | 88 | epub: 89 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 90 | @echo 91 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 92 | 93 | latex: 94 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 95 | @echo 96 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 97 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 98 | "(use \`make latexpdf' here to do that automatically)." 99 | 100 | latexpdf: 101 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 102 | @echo "Running LaTeX files through pdflatex..." 103 | make -C $(BUILDDIR)/latex all-pdf 104 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 105 | 106 | text: 107 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 108 | @echo 109 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 110 | 111 | man: 112 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 113 | @echo 114 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 115 | 116 | changes: 117 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 118 | @echo 119 | @echo "The overview file is in $(BUILDDIR)/changes." 120 | 121 | linkcheck: 122 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 123 | @echo 124 | @echo "Link check complete; look for any errors in the above output " \ 125 | "or in $(BUILDDIR)/linkcheck/output.txt." 126 | 127 | doctest: 128 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 129 | @echo "Testing of doctests in the sources finished, look at the " \ 130 | "results in $(BUILDDIR)/doctest/output.txt." 131 | -------------------------------------------------------------------------------- /doc/build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/doc/build/doctrees/environment.pickle -------------------------------------------------------------------------------- /doc/build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/doc/build/doctrees/index.doctree -------------------------------------------------------------------------------- /doc/build/doctrees/install.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/doc/build/doctrees/install.doctree -------------------------------------------------------------------------------- /doc/build/doctrees/usage-bufr.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/doc/build/doctrees/usage-bufr.doctree -------------------------------------------------------------------------------- /doc/build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 591af0babd3a4103fca029fa1c6c0d57 4 | tags: fbb0d17656682115ca4d033fb2f83ba1 5 | -------------------------------------------------------------------------------- /doc/build/html/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. Python-bufr documentation master file, created by 2 | sphinx-quickstart on Tue May 15 10:39:22 2012. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to Python-bufr's documentation! 7 | ======================================= 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | install 15 | usage-bufr 16 | 17 | .. automodule:: bufr 18 | :members: 19 | 20 | Indices and tables 21 | ================== 22 | 23 | * :ref:`genindex` 24 | * :ref:`modindex` 25 | * :ref:`search` 26 | 27 | -------------------------------------------------------------------------------- /doc/build/html/_sources/usage-bufr.txt: -------------------------------------------------------------------------------- 1 | 2 | Usage 3 | ===== 4 | 5 | The debian packages install the python packages and scripts in `/opt` hence you will need to set the following variables (in bash):: 6 | 7 | export PATH=$PATH:/opt/bin 8 | export PYTHONPATH=/opt/lib/python2.5/site-packages/ 9 | 10 | If you have an alternative path to your bufr tables you will need to set:: 11 | 12 | export BUFR_TABLES=/path/bufrtables/ 13 | 14 | *Remember* the trailing `/` 15 | 16 | By default the ECMWF BUFR library writes out some status information every time a new BUFR file is opened. To supress the status info you will need to set the following variable:: 17 | 18 | export PRINT_TABLE_NAMES = false 19 | 20 | Reading and Inspecting BUFR data 21 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22 | 23 | This assumes the above variables are correctly set.:: 24 | 25 | Python 2.5.2 (r252:60911, Jul 22 2009, 15:35:03) 26 | [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 27 | Type "help", "copyright", "credits" or "license" for more information. 28 | >>> import bufr 29 | >>> bfr = bufr.BUFRFile('NPR_TDIB.SA_D10108_S1823_E2008_B3353637_NS') 30 | 31 | This will open the BUFR file.:: 32 | 33 | >>> n = bfr.next() 34 | ECMWF 35 | 36 | BUFR DECODING SOFTWARE VERSION - 7.2 37 | 1 APRIL 2007. 38 | 39 | 40 | 41 | Your path for bufr tables is : 42 | /home/krl/bufrtest/bufrtables/ 43 | BUFR TABLES TO BE LOADED B0000000300007004001.TXT,D0000000300007004001.TXT 44 | 45 | The BUFRFile object is a iterator and supports the 'next()' method. This means that you can use the BUFRFile object in a for-loop:: 46 | 47 | for n in bfr: print n[0] 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /doc/build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/doc/build/html/_static/file.png -------------------------------------------------------------------------------- /doc/build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/doc/build/html/_static/minus.png -------------------------------------------------------------------------------- /doc/build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/doc/build/html/_static/plus.png -------------------------------------------------------------------------------- /doc/build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .hll { background-color: #ffffcc } 2 | .c { color: #408090; font-style: italic } /* Comment */ 3 | .err { border: 1px solid #FF0000 } /* Error */ 4 | .k { color: #007020; font-weight: bold } /* Keyword */ 5 | .o { color: #666666 } /* Operator */ 6 | .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 7 | .cp { color: #007020 } /* Comment.Preproc */ 8 | .c1 { color: #408090; font-style: italic } /* Comment.Single */ 9 | .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 10 | .gd { color: #A00000 } /* Generic.Deleted */ 11 | .ge { font-style: italic } /* Generic.Emph */ 12 | .gr { color: #FF0000 } /* Generic.Error */ 13 | .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 14 | .gi { color: #00A000 } /* Generic.Inserted */ 15 | .go { color: #303030 } /* Generic.Output */ 16 | .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 17 | .gs { font-weight: bold } /* Generic.Strong */ 18 | .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 19 | .gt { color: #0040D0 } /* Generic.Traceback */ 20 | .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 21 | .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 22 | .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 23 | .kp { color: #007020 } /* Keyword.Pseudo */ 24 | .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 25 | .kt { color: #902000 } /* Keyword.Type */ 26 | .m { color: #208050 } /* Literal.Number */ 27 | .s { color: #4070a0 } /* Literal.String */ 28 | .na { color: #4070a0 } /* Name.Attribute */ 29 | .nb { color: #007020 } /* Name.Builtin */ 30 | .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 31 | .no { color: #60add5 } /* Name.Constant */ 32 | .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 33 | .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 34 | .ne { color: #007020 } /* Name.Exception */ 35 | .nf { color: #06287e } /* Name.Function */ 36 | .nl { color: #002070; font-weight: bold } /* Name.Label */ 37 | .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 38 | .nt { color: #062873; font-weight: bold } /* Name.Tag */ 39 | .nv { color: #bb60d5 } /* Name.Variable */ 40 | .ow { color: #007020; font-weight: bold } /* Operator.Word */ 41 | .w { color: #bbbbbb } /* Text.Whitespace */ 42 | .mf { color: #208050 } /* Literal.Number.Float */ 43 | .mh { color: #208050 } /* Literal.Number.Hex */ 44 | .mi { color: #208050 } /* Literal.Number.Integer */ 45 | .mo { color: #208050 } /* Literal.Number.Oct */ 46 | .sb { color: #4070a0 } /* Literal.String.Backtick */ 47 | .sc { color: #4070a0 } /* Literal.String.Char */ 48 | .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 49 | .s2 { color: #4070a0 } /* Literal.String.Double */ 50 | .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 51 | .sh { color: #4070a0 } /* Literal.String.Heredoc */ 52 | .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 53 | .sx { color: #c65d09 } /* Literal.String.Other */ 54 | .sr { color: #235388 } /* Literal.String.Regex */ 55 | .s1 { color: #4070a0 } /* Literal.String.Single */ 56 | .ss { color: #517918 } /* Literal.String.Symbol */ 57 | .bp { color: #007020 } /* Name.Builtin.Pseudo */ 58 | .vc { color: #bb60d5 } /* Name.Variable.Class */ 59 | .vg { color: #bb60d5 } /* Name.Variable.Global */ 60 | .vi { color: #bb60d5 } /* Name.Variable.Instance */ 61 | .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /doc/build/html/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Index — Python-bufr v0.2.5 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 37 | 38 |
39 |
40 |
41 |
42 | 43 | 44 |

Index

45 | 46 |
47 | 48 |
49 | 50 | 51 |
52 |
53 |
54 |
55 |
56 | 57 | 58 | 59 | 71 | 72 |
73 |
74 |
75 |
76 | 85 | 89 | 90 | -------------------------------------------------------------------------------- /doc/build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/doc/build/html/objects.inv -------------------------------------------------------------------------------- /doc/build/html/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Search — Python-bufr v0.2.5 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 43 | 44 |
45 |
46 |
47 |
48 | 49 |

Search

50 |
51 | 52 |

53 | Please activate JavaScript to enable the search 54 | functionality. 55 |

56 |
57 |

58 | From here you can search these documents. Enter your search 59 | words into the box below and click "search". Note that the search 60 | function will automatically search for all of the words. Pages 61 | containing fewer words won't appear in the result list. 62 |

63 |
64 | 65 | 66 | 67 |
68 | 69 |
70 | 71 |
72 | 73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | 91 | 95 | 96 | -------------------------------------------------------------------------------- /doc/build/html/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({objects:{},terms:{code:1,linux_gfortrana64:1,help:2,ouput:[],softwar:[1,2],thi:[1,2],move:1,becaus:1,follow:[1,2],user:1,find:1,x84_64:1,note:1,onli:1,depend:[0,1],nice:1,copyright:2,how:1,configur:1,print_table_nam:2,platform:1,add:1,want:1,appli:1,main:1,real:1,"case":1,npr_tdib:2,scipi:1,everi:2,string:1,get:1,read:[0,1,2],pypi:1,know:1,gfortran:1,veri:1,ajust:[],now:1,exact:1,bufrdc:1,python2:2,edit:1,emo:1,list:1,iter:2,ldflag:1,adjust:1,have:[1,2],output:1,architectur:1,page:[0,1],mean:2,compil:1,www:1,smaller:1,old:1,manual:1,some:[1,2],back:1,see:1,"export":2,result:1,download:1,home:2,cat:1,time:2,librari:[1,2],out:[1,2],variabl:[1,2],index:0,what:1,correctli:2,pattern:1,fpic:1,fflag:1,anywai:1,content:0,"switch":1,version:2,between:1,print:[1,2],"new":[1,2],forth:1,method:2,altern:2,run:1,build_librari:1,inspect:[0,2],usag:[0,2],let:1,repositori:1,found:1,path:[1,2],sinc:1,bash:2,both:1,search:0,could:1,credit:2,krl:2,fals:2,chang:1,com:1,think:1,first:1,load:2,pleas:1,cflag:1,distibut:[],pythonpath:2,modul:[0,1],ubuntu:[1,2],prefer:1,easy_instal:1,apt:1,library_dir:1,instruct:1,set:2,linux:1,instal:[0,1,2],txt:2,open:2,your:[1,2],prefre:[],sourc:1,from:1,ecmwf:[1,2],wai:1,script:[1,2],licens:2,support:2,question:1,two:1,empti:1,next:2,includ:1,recommend:1,type:2,tell:1,hesit:1,unam:1,sort:1,setup:1,bit:1,libbufr:1,python:[0,1,2],readm:1,untar:1,notic:1,warn:1,trail:2,flag:1,numpi:1,info:2,wide:1,bfr:2,"default":[1,2],dmi:1,remov:1,work:1,googlecod:1,r252:2,below:1,can:[1,2],assum:2,rerun:1,otherwis:1,deb:1,more:[1,2],root:1,howev:1,loop:2,sa_d10108_s1823_e2008_b3353637_n:2,bin:2,linux2:2,"1ubuntu3":2,abov:2,creat:1,"int":1,sudo:1,henc:2,site:2,indic:0,proporli:1,bufrtabl:2,packag:[1,2],bufrfil:2,right:1,file:[1,2],tabl:[0,2],pip:1,"import":2,option:1,bufr_tabl:2,gcc:2,d0000000300007004001:2,multipl:1,welcom:0,lib:2,etc:1,make:1,hovev:[],bufr:[0,1,2],virtual:1,write:2,also:1,need:[1,2],html:1,decod:[1,2],build:1,rememb:2,bufrtest:2,opt:[1,2],command:1,you:[1,2],document:0,config:1,updat:1,virtualenv:1,product:1,http:1,distribut:1,normal:1,lucid:1,object:2,statu:2,supress:2,befor:1,jul:2,"_compil":1,data:[0,1,2],debian:[1,2],org:1,googl:1,svn:1,"short":1,eof:1,choos:1,directori:1,later:1,descript:1,b0000000300007004001:2,thought:1,inform:2,which:1,environ:1,fortran:1,clean:1,april:2,avoid:1},objtypes:{},titles:["Welcome to Python-bufr’s documentation!","Install","Usage"],objnames:{},filenames:["index","install","usage-bufr"]}) -------------------------------------------------------------------------------- /doc/images/bufr-python-packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/doc/images/bufr-python-packages.png -------------------------------------------------------------------------------- /doc/images/dep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/doc/images/dep.png -------------------------------------------------------------------------------- /doc/images/python-bufrtranslationdatabase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/doc/images/python-bufrtranslationdatabase.png -------------------------------------------------------------------------------- /doc/source/index.rst: -------------------------------------------------------------------------------- 1 | .. Python-bufr documentation master file, created by 2 | sphinx-quickstart on Tue May 15 10:39:22 2012. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to Python-bufr's documentation! 7 | ======================================= 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | install 15 | usage-bufr 16 | 17 | .. automodule:: bufr 18 | :members: 19 | 20 | Indices and tables 21 | ================== 22 | 23 | * :ref:`genindex` 24 | * :ref:`modindex` 25 | * :ref:`search` 26 | 27 | -------------------------------------------------------------------------------- /doc/source/install.rst: -------------------------------------------------------------------------------- 1 | Install 2 | ======= 3 | 4 | Short description on how to install the python-bufr module from source 5 | 6 | Dependencies 7 | ~~~~~~~~~~~~ 8 | 9 | The following dependencies are needed for the python-bufr package to work 10 | 11 | * ECMWF BUFR decoding library http://www.ecmwf.int/products/data/software/download/bufr.html 12 | * Python Numpy http://numpy.scipy.org/ 13 | 14 | If you are using easy_install or pip you only need to manually install the ECMWF bufr library. 15 | 16 | .. warning:: 17 | 18 | Note that the ECMWF bufr library needs to be compiled with the -fPIC option 19 | both for the C and Fortran code please see instructions below. 20 | 21 | You can use both the bufrdc library (default) and the emos library from 22 | ECMWF. In case you want to use the emos library you will have to change the 23 | library_dirs variable i the setup.py file. 24 | 25 | Some notes for old users. The dependencies of the packages have moved back and 26 | forth between the ECMWF Bufrdc package and the ECMWF Emos package ... it is not 27 | very nice I know. I thought that the Emos library was more widely used and the 28 | Ubuntu 10.04 distribution included an Emos Debian package so I switched to the 29 | Emos package. Now I have moved back to the bufrdc package since the Emos 30 | package in the Ubuntu distribution will not work anyway because you need to 31 | adjust the compiler flags. The Bufrdc package us preferred right now because it 32 | is smaller. Please do not hesitate to let me know if you think otherwise. 33 | 34 | ECMWF BUFR Library 35 | ++++++++++++++++++ 36 | 37 | Follow the install instructions in the package README file and use the 38 | **build_library** and **install scripts**. However before you run the script you will 39 | need to change the configuration file for you platform. The configuration files 40 | can be found in config directory. 41 | 42 | 43 | The config files are sorted by OS, architecture and compiler 44 | 45 | The OS can be found using the following command:: 46 | 47 | uname -s | tr '[A-Z]' '[a-z]' 48 | 49 | E.g the output of this command could be *Linux*. 50 | 51 | The platform can be found using the following command:: 52 | 53 | uname -m 54 | 55 | E.g the output of this command could be *x84_64* 56 | 57 | I normally choose to use the *gfortran* compiler, and if I avoid the 64 bit reals 58 | that the **build_library** script questions me for the resulting configuration file 59 | will be:: 60 | 61 | config/config.linux_gfortranA64 62 | 63 | following the pattern:: 64 | 65 | config.<_compiler> 66 | 67 | Notice that for the default compiler the '_compiler' will be an empty string. 68 | 69 | You will need to edit the file and add the option *-fPIC* to the *CFLAGS* and 70 | *FFLAGS* variables. 71 | 72 | If you do not know which file to edit the build_library script prints it out, 73 | so you can run the script first, find the config file, edit it and then rerun 74 | the build_library script. 75 | 76 | .. warning:: 77 | 78 | Note that by default the build_library script will create a libbufr.a that 79 | is read-only. This results in that that 'make clean' will not work 80 | proporly. You will have to manually remove the libbufr.a library from the 81 | root source directory. This also applies for the directories and libraries 82 | installed using the install script included in the source. 83 | 84 | 85 | Install Python-Bufr 86 | ~~~~~~~~~~~~~~~~~~~~ 87 | 88 | There are multiple ways to install the python-bufr code. At DMI we use debian 89 | packages , you can install from source or you can use the pypi package. 90 | 91 | In the two later cases I recommend that you install using a virtual 92 | environment. See http://pypi.python.org/pypi/virtualenv 93 | 94 | Install Using the Pypi Package 95 | ++++++++++++++++++++++++++++++ 96 | 97 | To install using pypi use the following commands:: 98 | 99 | LDFLAGS=-L pip install python-bufr 100 | 101 | The *LDFLAGS* variable tells the installation script in what directory to find 102 | the *libbufr.a* library. 103 | 104 | Install Using Source 105 | ++++++++++++++++++++ 106 | 107 | Download the source package from the google-code download page. Untar the 108 | package and run the setup.py script:: 109 | 110 | LDFLAGS=-L python setup.py install 111 | 112 | The *LDFLAGS* variable tells the installation script in what directory to find 113 | the *libbufr.a* library. 114 | 115 | Install Using Debian Packages 116 | +++++++++++++++++++++++++++++ 117 | 118 | The debian packages are build for an Ubuntu 10.04 lucid 64 bit. Only install 119 | the packages if you have this exact OS and architecture. 120 | 121 | First add the python-bufr repository your apt sources list:: 122 | 123 | sudo -s # be root otherwise cat will not work 124 | cat << EOF > /etc/apt/sources.list.d/python-bufr.list 125 | # 126 | # python bufr repository 127 | deb http://python-bufr.googlecode.com/svn/apt lucid main 128 | EOF 129 | 130 | apt-get update 131 | apt-get install python-bufr 132 | 133 | 134 | This will install python-bufr and a new emos library in into the */opt* directory. 135 | 136 | -------------------------------------------------------------------------------- /doc/source/usage-bufr.rst: -------------------------------------------------------------------------------- 1 | 2 | Usage 3 | ===== 4 | 5 | The debian packages install the python packages and scripts in `/opt` hence you will need to set the following variables (in bash):: 6 | 7 | export PATH=$PATH:/opt/bin 8 | export PYTHONPATH=/opt/lib/python2.5/site-packages/ 9 | 10 | If you have an alternative path to your bufr tables you will need to set:: 11 | 12 | export BUFR_TABLES=/path/bufrtables/ 13 | 14 | *Remember* the trailing `/` 15 | 16 | By default the ECMWF BUFR library writes out some status information every time a new BUFR file is opened. To supress the status info you will need to set the following variable:: 17 | 18 | export PRINT_TABLE_NAMES = false 19 | 20 | Reading and Inspecting BUFR data 21 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22 | 23 | This assumes the above variables are correctly set.:: 24 | 25 | Python 2.5.2 (r252:60911, Jul 22 2009, 15:35:03) 26 | [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 27 | Type "help", "copyright", "credits" or "license" for more information. 28 | >>> import bufr 29 | >>> bfr = bufr.BUFRFile('NPR_TDIB.SA_D10108_S1823_E2008_B3353637_NS') 30 | 31 | This will open the BUFR file.:: 32 | 33 | >>> n = bfr.next() 34 | ECMWF 35 | 36 | BUFR DECODING SOFTWARE VERSION - 7.2 37 | 1 APRIL 2007. 38 | 39 | 40 | 41 | Your path for bufr tables is : 42 | /home/krl/bufrtest/bufrtables/ 43 | BUFR TABLES TO BE LOADED B0000000300007004001.TXT,D0000000300007004001.TXT 44 | 45 | The BUFRFile object is a iterator and supports the 'next()' method. This means that you can use the BUFRFile object in a for-loop:: 46 | 47 | for n in bfr: print n[0] 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /install_all.sh: -------------------------------------------------------------------------------- 1 | 2 | py=`which python` 3 | echo "Using python as $py" 4 | 5 | list="bufr xml-marshall sqlalchemy-marshall metadb transform" 6 | for p in $list; do 7 | echo "======= Now in $p" 8 | cd $p && rm -rf build && python setup.py build && python setup.py install && cd .. 9 | echo "======= Done with $p" 10 | done 11 | -------------------------------------------------------------------------------- /metadb/debian/README.Debian: -------------------------------------------------------------------------------- 1 | python-bufr-metadb for Debian 2 | ------------------------ 3 | 4 | 5 | 6 | -- Kristian Rune Larsen Mon, 12 Oct 2009 13:26:32 +0200 7 | -------------------------------------------------------------------------------- /metadb/debian/changelog: -------------------------------------------------------------------------------- 1 | python-bufr-metadb (0.1-3) unstable; urgency=low 2 | 3 | * Optimized database queries 4 | * Added extra parameters to BUFR description table 5 | 6 | -- Kristian Rune Larsen Wed, 02 Nov 2011 12:52:25 +0100 7 | 8 | python-bufr-metadb (0.1-2) unstable; urgency=low 9 | 10 | * Changed pybufr references to bufr 11 | 12 | -- Kristian Rune Larsen Fri, 23 Apr 2010 13:26:32 +0200 13 | 14 | python-bufr-metadb (0.1-1) unstable; urgency=low 15 | 16 | * Initial release (Closes: #nnnn) 17 | 18 | -- Kristian Rune Larsen Mon, 12 Oct 2009 13:26:32 +0200 19 | 20 | -------------------------------------------------------------------------------- /metadb/debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /metadb/debian/control: -------------------------------------------------------------------------------- 1 | Source: python-bufr-metadb 2 | Section: misc 3 | Priority: extra 4 | Maintainer: Kristian Rune Larsen 5 | Build-Depends: debhelper (>= 5) 6 | Standards-Version: 3.7.2 7 | 8 | Package: python-bufr-metadb 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends}, python-bufr, python-sqlalchemy-marshall 11 | Description: DMI/TI BUFR DB Interface package 12 | Provides the interface layer for BUFR translation to variable 13 | mapping database. 14 | -------------------------------------------------------------------------------- /metadb/debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Kristian Rune Larsen on 2 | Mon, 12 Oct 2009 13:26:32 +0200. 3 | 4 | It was downloaded from 5 | 6 | Upstream Author(s): 7 | 8 | 9 | 10 | 11 | Copyright: 12 | 13 | 14 | 15 | 16 | License: 17 | 18 | 19 | 20 | The Debian packaging is (C) 2009, Kristian Rune Larsen and 21 | is licensed under the GPL, see `/usr/share/common-licenses/GPL'. 22 | 23 | # Please also look if there are files or directories which have a 24 | # different copyright/license attached and list them here. 25 | -------------------------------------------------------------------------------- /metadb/debian/cron.d.ex: -------------------------------------------------------------------------------- 1 | # 2 | # Regular cron jobs for the python-bufr-metadb package 3 | # 4 | 0 4 * * * root python-bufr-metadb_maintenance 5 | -------------------------------------------------------------------------------- /metadb/debian/dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | usr/sbin 3 | -------------------------------------------------------------------------------- /metadb/debian/docs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/metadb/debian/docs -------------------------------------------------------------------------------- /metadb/debian/emacsen-install.ex: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | # /usr/lib/emacsen-common/packages/install/python-bufr-metadb 3 | 4 | # Written by Jim Van Zandt , borrowing heavily 5 | # from the install scripts for gettext by Santiago Vila 6 | # and octave by Dirk Eddelbuettel . 7 | 8 | FLAVOR=$1 9 | PACKAGE=python-bufr-metadb 10 | 11 | if [ ${FLAVOR} = emacs ]; then exit 0; fi 12 | 13 | echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} 14 | 15 | #FLAVORTEST=`echo $FLAVOR | cut -c-6` 16 | #if [ ${FLAVORTEST} = xemacs ] ; then 17 | # SITEFLAG="-no-site-file" 18 | #else 19 | # SITEFLAG="--no-site-file" 20 | #fi 21 | FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" 22 | 23 | ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} 24 | ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} 25 | 26 | # Install-info-altdir does not actually exist. 27 | # Maybe somebody will write it. 28 | if test -x /usr/sbin/install-info-altdir; then 29 | echo install/${PACKAGE}: install Info links for ${FLAVOR} 30 | install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz 31 | fi 32 | 33 | install -m 755 -d ${ELCDIR} 34 | cd ${ELDIR} 35 | FILES=`echo *.el` 36 | cp ${FILES} ${ELCDIR} 37 | cd ${ELCDIR} 38 | 39 | cat << EOF > path.el 40 | (setq load-path (cons "." load-path) byte-compile-warnings nil) 41 | EOF 42 | ${FLAVOR} ${FLAGS} ${FILES} 43 | rm -f *.el path.el 44 | 45 | exit 0 46 | -------------------------------------------------------------------------------- /metadb/debian/emacsen-remove.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # /usr/lib/emacsen-common/packages/remove/python-bufr-metadb 3 | 4 | FLAVOR=$1 5 | PACKAGE=python-bufr-metadb 6 | 7 | if [ ${FLAVOR} != emacs ]; then 8 | if test -x /usr/sbin/install-info-altdir; then 9 | echo remove/${PACKAGE}: removing Info links for ${FLAVOR} 10 | install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/python-bufr-metadb.info.gz 11 | fi 12 | 13 | echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} 14 | rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} 15 | fi 16 | -------------------------------------------------------------------------------- /metadb/debian/emacsen-startup.ex: -------------------------------------------------------------------------------- 1 | ;; -*-emacs-lisp-*- 2 | ;; 3 | ;; Emacs startup file, e.g. /etc/emacs/site-start.d/50python-bufr-metadb.el 4 | ;; for the Debian python-bufr-metadb package 5 | ;; 6 | ;; Originally contributed by Nils Naumann 7 | ;; Modified by Dirk Eddelbuettel 8 | ;; Adapted for dh-make by Jim Van Zandt 9 | 10 | ;; The python-bufr-metadb package follows the Debian/GNU Linux 'emacsen' policy and 11 | ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, 12 | ;; xemacs19, emacs20, xemacs20...). The compiled code is then 13 | ;; installed in a subdirectory of the respective site-lisp directory. 14 | ;; We have to add this to the load-path: 15 | (let ((package-dir (concat "/usr/share/" 16 | (symbol-name flavor) 17 | "/site-lisp/python-bufr-metadb"))) 18 | ;; If package-dir does not exist, the python-bufr-metadb package must have 19 | ;; removed but not purged, and we should skip the setup. 20 | (when (file-directory-p package-dir) 21 | (setq load-path (cons package-dir load-path)) 22 | (autoload 'python-bufr-metadb-mode "python-bufr-metadb-mode" 23 | "Major mode for editing python-bufr-metadb files." t) 24 | (add-to-list 'auto-mode-alist '("\\.python-bufr-metadb$" . python-bufr-metadb-mode)))) 25 | 26 | -------------------------------------------------------------------------------- /metadb/debian/files: -------------------------------------------------------------------------------- 1 | python-bufr-metadb_0.1-3_amd64.deb misc extra 2 | -------------------------------------------------------------------------------- /metadb/debian/init.d.ex: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # skeleton example file to build /etc/init.d/ scripts. 4 | # This file should be used to construct scripts for /etc/init.d. 5 | # 6 | # Written by Miquel van Smoorenburg . 7 | # Modified for Debian 8 | # by Ian Murdock . 9 | # Further changes by Javier Fernandez-Sanguino 10 | # 11 | # Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl 12 | # 13 | 14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15 | DAEMON=/usr/sbin/python-bufr-metadb 16 | NAME=python-bufr-metadb 17 | DESC=python-bufr-metadb 18 | 19 | test -x $DAEMON || exit 0 20 | 21 | LOGDIR=/var/log/python-bufr-metadb 22 | PIDFILE=/var/run/$NAME.pid 23 | DODTIME=1 # Time to wait for the server to die, in seconds 24 | # If this value is set too low you might not 25 | # let some servers to die gracefully and 26 | # 'restart' will not work 27 | 28 | # Include python-bufr-metadb defaults if available 29 | if [ -f /etc/default/python-bufr-metadb ] ; then 30 | . /etc/default/python-bufr-metadb 31 | fi 32 | 33 | set -e 34 | 35 | running_pid() 36 | { 37 | # Check if a given process pid's cmdline matches a given name 38 | pid=$1 39 | name=$2 40 | [ -z "$pid" ] && return 1 41 | [ ! -d /proc/$pid ] && return 1 42 | cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` 43 | # Is this the expected child? 44 | [ "$cmd" != "$name" ] && return 1 45 | return 0 46 | } 47 | 48 | running() 49 | { 50 | # Check if the process is running looking at /proc 51 | # (works for all users) 52 | 53 | # No pidfile, probably no daemon present 54 | [ ! -f "$PIDFILE" ] && return 1 55 | # Obtain the pid and check it against the binary name 56 | pid=`cat $PIDFILE` 57 | running_pid $pid $NAME || return 1 58 | return 0 59 | } 60 | 61 | force_stop() { 62 | # Forcefully kill the process 63 | [ ! -f "$PIDFILE" ] && return 64 | if running ; then 65 | kill -15 $pid 66 | # Is it really dead? 67 | [ -n "$DODTIME" ] && sleep "$DODTIME"s 68 | if running ; then 69 | kill -9 $pid 70 | [ -n "$DODTIME" ] && sleep "$DODTIME"s 71 | if running ; then 72 | echo "Cannot kill $LABEL (pid=$pid)!" 73 | exit 1 74 | fi 75 | fi 76 | fi 77 | rm -f $PIDFILE 78 | return 0 79 | } 80 | 81 | case "$1" in 82 | start) 83 | echo -n "Starting $DESC: " 84 | start-stop-daemon --start --quiet --pidfile $PIDFILE \ 85 | --exec $DAEMON -- $DAEMON_OPTS 86 | if running then 87 | echo "$NAME." 88 | else 89 | echo " ERROR." 90 | fi 91 | ;; 92 | stop) 93 | echo -n "Stopping $DESC: " 94 | start-stop-daemon --stop --quiet --pidfile $PIDFILE \ 95 | --exec $DAEMON 96 | echo "$NAME." 97 | ;; 98 | force-stop) 99 | echo -n "Forcefully stopping $DESC: " 100 | force_stop 101 | if ! running then 102 | echo "$NAME." 103 | else 104 | echo " ERROR." 105 | fi 106 | ;; 107 | #reload) 108 | # 109 | # If the daemon can reload its config files on the fly 110 | # for example by sending it SIGHUP, do it here. 111 | # 112 | # If the daemon responds to changes in its config file 113 | # directly anyway, make this a do-nothing entry. 114 | # 115 | # echo "Reloading $DESC configuration files." 116 | # start-stop-daemon --stop --signal 1 --quiet --pidfile \ 117 | # /var/run/$NAME.pid --exec $DAEMON 118 | #;; 119 | force-reload) 120 | # 121 | # If the "reload" option is implemented, move the "force-reload" 122 | # option to the "reload" entry above. If not, "force-reload" is 123 | # just the same as "restart" except that it does nothing if the 124 | # daemon isn't already running. 125 | # check wether $DAEMON is running. If so, restart 126 | start-stop-daemon --stop --test --quiet --pidfile \ 127 | /var/run/$NAME.pid --exec $DAEMON \ 128 | && $0 restart \ 129 | || exit 0 130 | ;; 131 | restart) 132 | echo -n "Restarting $DESC: " 133 | start-stop-daemon --stop --quiet --pidfile \ 134 | /var/run/$NAME.pid --exec $DAEMON 135 | [ -n "$DODTIME" ] && sleep $DODTIME 136 | start-stop-daemon --start --quiet --pidfile \ 137 | /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS 138 | echo "$NAME." 139 | ;; 140 | status) 141 | echo -n "$LABEL is " 142 | if running ; then 143 | echo "running" 144 | else 145 | echo " not running." 146 | exit 1 147 | fi 148 | ;; 149 | *) 150 | N=/etc/init.d/$NAME 151 | # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 152 | echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 153 | exit 1 154 | ;; 155 | esac 156 | 157 | exit 0 158 | -------------------------------------------------------------------------------- /metadb/debian/manpage.1.ex: -------------------------------------------------------------------------------- 1 | .\" Hey, EMACS: -*- nroff -*- 2 | .\" First parameter, NAME, should be all caps 3 | .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection 4 | .\" other parameters are allowed: see man(7), man(1) 5 | .TH PYBUFR-METADB SECTION "October 12, 2009" 6 | .\" Please adjust this date whenever revising the manpage. 7 | .\" 8 | .\" Some roff macros, for reference: 9 | .\" .nh disable hyphenation 10 | .\" .hy enable hyphenation 11 | .\" .ad l left justify 12 | .\" .ad b justify to both left and right margins 13 | .\" .nf disable filling 14 | .\" .fi enable filling 15 | .\" .br insert line break 16 | .\" .sp insert n+1 empty lines 17 | .\" for manpage-specific macros, see man(7) 18 | .SH NAME 19 | python-bufr-metadb \- program to do something 20 | .SH SYNOPSIS 21 | .B python-bufr-metadb 22 | .RI [ options ] " files" ... 23 | .br 24 | .B bar 25 | .RI [ options ] " files" ... 26 | .SH DESCRIPTION 27 | This manual page documents briefly the 28 | .B python-bufr-metadb 29 | and 30 | .B bar 31 | commands. 32 | .PP 33 | .\" TeX users may be more comfortable with the \fB\fP and 34 | .\" \fI\fP escape sequences to invode bold face and italics, 35 | .\" respectively. 36 | \fBpython-bufr-metadb\fP is a program that... 37 | .SH OPTIONS 38 | These programs follow the usual GNU command line syntax, with long 39 | options starting with two dashes (`-'). 40 | A summary of options is included below. 41 | For a complete description, see the Info files. 42 | .TP 43 | .B \-h, \-\-help 44 | Show summary of options. 45 | .TP 46 | .B \-v, \-\-version 47 | Show version of program. 48 | .SH SEE ALSO 49 | .BR bar (1), 50 | .BR baz (1). 51 | .br 52 | The programs are documented fully by 53 | .IR "The Rise and Fall of a Fooish Bar" , 54 | available via the Info system. 55 | .SH AUTHOR 56 | python-bufr-metadb was written by . 57 | .PP 58 | This manual page was written by Kristian Rune Larsen , 59 | for the Debian project (but may be used by others). 60 | -------------------------------------------------------------------------------- /metadb/debian/manpage.xml.ex: -------------------------------------------------------------------------------- 1 | 2 | .
will be generated. You may view the 11 | manual page with: nroff -man .
| less'. A 12 | typical entry in a Makefile or Makefile.am is: 13 | 14 | DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\ 15 | manpages/docbook.xsl 16 | XP=xsltproc -''-nonet 17 | 18 | manpage.1: manpage.dbk 19 | $(XP) $(DB2MAN) $< 20 | 21 | The xsltproc binary is found in the xsltproc package. The 22 | XSL files are in docbook-xsl. Please remember that if you 23 | create the nroff version in one of the debian/rules file 24 | targets (such as build), you will need to include xsltproc 25 | and docbook-xsl in your Build-Depends control field. 26 | 27 | --> 28 | 29 | 30 | FIRSTNAME"> 31 | SURNAME"> 32 | 33 | October 12, 2009"> 34 | 36 | SECTION"> 37 | krl@dmi.dk"> 38 | 39 | PYBUFR-METADB"> 40 | 41 | 42 | Debian"> 43 | GNU"> 44 | GPL"> 45 | ]> 46 | 47 | 48 | 49 |
50 | &dhemail; 51 |
52 | 53 | 2007 54 | &dhusername; 55 | 56 | &dhdate; 57 |
58 | 59 | &dhucpackage; 60 | 61 | &dhsection; 62 | 63 | 64 | &dhpackage; 65 | 66 | program to do something 67 | 68 | 69 | 70 | &dhpackage; 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | DESCRIPTION 79 | 80 | This manual page documents briefly the 81 | &dhpackage; and bar 82 | commands. 83 | 84 | This manual page was written for the &debian; distribution 85 | because the original program does not have a manual page. 86 | Instead, it has documentation in the &gnu; 87 | Info format; see below. 88 | 89 | &dhpackage; is a program that... 90 | 91 | 92 | 93 | OPTIONS 94 | 95 | These programs follow the usual &gnu; command line syntax, 96 | with long options starting with two dashes (`-'). A summary of 97 | options is included below. For a complete description, see the 98 | Info files. 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | Show summary of options. 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Show version of program. 115 | 116 | 117 | 118 | 119 | 120 | SEE ALSO 121 | 122 | bar (1), baz (1). 123 | 124 | The programs are documented fully by The Rise and 125 | Fall of a Fooish Bar available via the 126 | Info system. 127 | 128 | 129 | AUTHOR 130 | 131 | This manual page was written by &dhusername; &dhemail; for 132 | the &debian; system (but may be used by others). Permission is 133 | granted to copy, distribute and/or modify this document under 134 | the terms of the &gnu; General Public License, Version 2 any 135 | later version published by the Free Software Foundation. 136 | 137 | 138 | On Debian systems, the complete text of the GNU General Public 139 | License can be found in /usr/share/common-licenses/GPL. 140 | 141 | 142 | 143 |
144 | 145 | -------------------------------------------------------------------------------- /metadb/debian/menu.ex: -------------------------------------------------------------------------------- 1 | ?package(python-bufr-metadb):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ 2 | title="python-bufr-metadb" command="/usr/bin/python-bufr-metadb" 3 | -------------------------------------------------------------------------------- /metadb/debian/postinst.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for python-bufr-metadb 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see http://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | ;; 24 | 25 | abort-upgrade|abort-remove|abort-deconfigure) 26 | ;; 27 | 28 | *) 29 | echo "postinst called with unknown argument \`$1'" >&2 30 | exit 1 31 | ;; 32 | esac 33 | 34 | # dh_installdeb will replace this with shell code automatically 35 | # generated by other debhelper scripts. 36 | 37 | #DEBHELPER# 38 | 39 | exit 0 40 | 41 | 42 | -------------------------------------------------------------------------------- /metadb/debian/postrm.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for python-bufr-metadb 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `purge' 11 | # * `upgrade' 12 | # * `failed-upgrade' 13 | # * `abort-install' 14 | # * `abort-install' 15 | # * `abort-upgrade' 16 | # * `disappear' 17 | # 18 | # for details, see http://www.debian.org/doc/debian-policy/ or 19 | # the debian-policy package 20 | 21 | 22 | case "$1" in 23 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 24 | ;; 25 | 26 | *) 27 | echo "postrm called with unknown argument \`$1'" >&2 28 | exit 1 29 | ;; 30 | esac 31 | 32 | # dh_installdeb will replace this with shell code automatically 33 | # generated by other debhelper scripts. 34 | 35 | #DEBHELPER# 36 | 37 | exit 0 38 | 39 | 40 | -------------------------------------------------------------------------------- /metadb/debian/preinst.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # preinst script for python-bufr-metadb 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `install' 10 | # * `install' 11 | # * `upgrade' 12 | # * `abort-upgrade' 13 | # for details, see http://www.debian.org/doc/debian-policy/ or 14 | # the debian-policy package 15 | 16 | 17 | case "$1" in 18 | install|upgrade) 19 | ;; 20 | 21 | abort-upgrade) 22 | ;; 23 | 24 | *) 25 | echo "preinst called with unknown argument \`$1'" >&2 26 | exit 1 27 | ;; 28 | esac 29 | 30 | # dh_installdeb will replace this with shell code automatically 31 | # generated by other debhelper scripts. 32 | 33 | #DEBHELPER# 34 | 35 | exit 0 36 | 37 | 38 | -------------------------------------------------------------------------------- /metadb/debian/prerm.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # prerm script for python-bufr-metadb 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `upgrade' 11 | # * `failed-upgrade' 12 | # * `remove' `in-favour' 13 | # * `deconfigure' `in-favour' 14 | # `removing' 15 | # 16 | # for details, see http://www.debian.org/doc/debian-policy/ or 17 | # the debian-policy package 18 | 19 | 20 | case "$1" in 21 | remove|upgrade|deconfigure) 22 | ;; 23 | 24 | failed-upgrade) 25 | ;; 26 | 27 | *) 28 | echo "prerm called with unknown argument \`$1'" >&2 29 | exit 1 30 | ;; 31 | esac 32 | 33 | # dh_installdeb will replace this with shell code automatically 34 | # generated by other debhelper scripts. 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | 40 | 41 | -------------------------------------------------------------------------------- /metadb/debian/pybufr-metadb-default.ex: -------------------------------------------------------------------------------- 1 | # Defaults for python-bufr-metadb initscript 2 | # sourced by /etc/init.d/python-bufr-metadb 3 | # installed at /etc/default/python-bufr-metadb by the maintainer scripts 4 | 5 | # 6 | # This is a POSIX shell fragment 7 | # 8 | 9 | # Additional options that are passed to the Daemon. 10 | DAEMON_OPTS="" 11 | -------------------------------------------------------------------------------- /metadb/debian/pybufr-metadb.doc-base.EX: -------------------------------------------------------------------------------- 1 | Document: python-bufr-metadb 2 | Title: Debian python-bufr-metadb Manual 3 | Author: 4 | Abstract: This manual describes what python-bufr-metadb is 5 | and how it can be used to 6 | manage online manuals on Debian systems. 7 | Section: unknown 8 | 9 | Format: debiandoc-sgml 10 | Files: /usr/share/doc/python-bufr-metadb/python-bufr-metadb.sgml.gz 11 | 12 | Format: postscript 13 | Files: /usr/share/doc/python-bufr-metadb/python-bufr-metadb.ps.gz 14 | 15 | Format: text 16 | Files: /usr/share/doc/python-bufr-metadb/python-bufr-metadb.text.gz 17 | 18 | Format: HTML 19 | Index: /usr/share/doc/python-bufr-metadb/html/index.html 20 | Files: /usr/share/doc/python-bufr-metadb/html/*.html 21 | 22 | 23 | -------------------------------------------------------------------------------- /metadb/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | 13 | 14 | 15 | configure: configure-stamp 16 | configure-stamp: 17 | dh_testdir 18 | # Add here commands to configure the package. 19 | 20 | touch configure-stamp 21 | 22 | 23 | build: build-stamp 24 | 25 | build-stamp: configure-stamp 26 | dh_testdir 27 | 28 | # Add here commands to compile the package. 29 | python setup.py build 30 | #docbook-to-man debian/python-bufr-metadb.sgml > python-bufr-metadb.1 31 | 32 | touch $@ 33 | 34 | clean: 35 | dh_testdir 36 | dh_testroot 37 | rm -f build-stamp configure-stamp 38 | 39 | # Add here commands to clean up after the build process. 40 | rm -rf $(CURDIR)/build $(CURDIR)/debian/python-bufr-metadb 41 | 42 | dh_clean 43 | 44 | install: build 45 | dh_testdir 46 | dh_testroot 47 | dh_clean -k 48 | dh_installdirs 49 | 50 | # Add here commands to install the package into debian/python-bufr-metadb. 51 | python setup.py install --root=$(CURDIR)/debian/python-bufr-metadb --prefix=/opt 52 | 53 | 54 | # Build architecture-independent files here. 55 | binary-indep: build install 56 | # We have nothing to do by default. 57 | 58 | # Build architecture-dependent files here. 59 | binary-arch: build install 60 | dh_testdir 61 | dh_testroot 62 | dh_installchangelogs 63 | dh_installdocs 64 | dh_installexamples 65 | # dh_install 66 | # dh_installmenu 67 | # dh_installdebconf 68 | # dh_installlogrotate 69 | # dh_installemacsen 70 | # dh_installpam 71 | # dh_installmime 72 | dh_pysupport 73 | # dh_installinit 74 | # dh_installcron 75 | # dh_installinfo 76 | dh_installman 77 | dh_link 78 | dh_strip 79 | dh_compress 80 | dh_fixperms 81 | # dh_perl 82 | # dh_makeshlibs 83 | dh_installdeb 84 | dh_shlibdeps 85 | dh_gencontrol 86 | dh_md5sums 87 | dh_builddeb 88 | 89 | binary: binary-indep binary-arch 90 | .PHONY: build clean binary-indep binary-arch binary install configure 91 | -------------------------------------------------------------------------------- /metadb/debian/watch.ex: -------------------------------------------------------------------------------- 1 | # Example watch control file for uscan 2 | # Rename this file to "watch" and then you can run the "uscan" command 3 | # to check for upstream updates and more. 4 | # See uscan(1) for format 5 | 6 | # Compulsory line, this is a version 3 file 7 | version=3 8 | 9 | # Uncomment to examine a Webpage 10 | # 11 | #http://www.example.com/downloads.php python-bufr-metadb-(.*)\.tar\.gz 12 | 13 | # Uncomment to examine a Webserver directory 14 | #http://www.example.com/pub/python-bufr-metadb-(.*)\.tar\.gz 15 | 16 | # Uncommment to examine a FTP server 17 | #ftp://ftp.example.com/pub/python-bufr-metadb-(.*)\.tar\.gz debian uupdate 18 | 19 | # Uncomment to find new files on sourceforge, for debscripts >= 2.9 20 | # http://sf.net/python-bufr-metadb/python-bufr-metadb-(.*)\.tar\.gz 21 | 22 | 23 | -------------------------------------------------------------------------------- /metadb/metadb/scripts/export_bfr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # 4 | # python-bufr-metadb , BUFR variable translation database 5 | # 6 | # Copyright (C) 2010 Kristian Rune Larsen 7 | # 8 | # This program is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | # 21 | 22 | """ 23 | Exports entire database as xml 24 | 25 | """ 26 | 27 | __revision__ = 0.1 28 | 29 | import bufr 30 | import bufr.metadb as bufrmetadb 31 | import sys 32 | import os 33 | import getopt 34 | 35 | 36 | def usage(): 37 | """Prints basic usage and exits""" 38 | print """USAGE: 39 | export_bfr [-hl] -c connection url -i instrument 40 | 41 | ARGUMENTS: 42 | -c : connection url to database 43 | 44 | OPTION: 45 | -l : list available instruments 46 | -h : this message 47 | -i : only export selected instrument 48 | 49 | Command will dump database to stdout as xml. 50 | 51 | """ 52 | sys.exit(2) 53 | 54 | # main 55 | optlist, args = getopt.getopt(sys.argv[1:], 'c:i:hl') 56 | 57 | connection_url = None 58 | instr = None 59 | do_list = False 60 | 61 | for opts in optlist: 62 | if opts[0] == '-c': 63 | connection_url = opts[1] 64 | continue 65 | if opts[0] == '-i': 66 | instr = opts[1] 67 | continue 68 | if opts[0] == '-l': 69 | do_list = True 70 | continue 71 | if opts[0] == '-h': 72 | usage() 73 | 74 | conn = None 75 | if connection_url is None: 76 | usage() 77 | 78 | conn = bufrmetadb.BUFRDescDBConn( connection_url ) 79 | 80 | # Print instrument names to stdout 81 | if do_list: 82 | instrs = conn.get_instrument_names() 83 | for i in instrs: 84 | print i 85 | sys.exit(0) 86 | 87 | # Dump all varables for specific instrument 88 | if instr is not None: 89 | conn.dump_xml(bufrmetadb.BUFRDesc, instr ) 90 | sys.exit(0) 91 | 92 | # Dump entire database 93 | conn.dump_xml(bufrmetadb.BUFRDesc ) 94 | 95 | sys.exit(0) 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /metadb/metadb/scripts/import_bfr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # 4 | # 5 | # Author Kristian Rune Larsen 6 | 7 | 8 | """ import XML or bufr file into database """ 9 | 10 | __revision__ = 0.1 11 | 12 | import bufr 13 | import bufr.metadb as bufrmetadb 14 | import sys 15 | import os 16 | import getopt 17 | 18 | 19 | def usage(): 20 | """Prints basic usage and exits""" 21 | print """USAGE: 22 | import_bfr [-c connection url] [-s start index] <-i instrument> <-g glob> filename 23 | 24 | filename : Can either be an xml file or a BUFR file. File type is determined using 25 | filename extension. 26 | 27 | -i : instrument, only needed when importing BUFR files, otherwise ignored 28 | -g : glob, only needed when importing BUFR files, otherwise ignored 29 | -s : start index , used when imporing BUFR files 30 | 31 | """ 32 | sys.exit(2) 33 | 34 | # main 35 | optlist, args = getopt.getopt(sys.argv[1:], 'c:i:g:s:') 36 | 37 | try: 38 | ifn = args[0] 39 | except Exception, e: 40 | print " Not enough arguments " 41 | usage() 42 | 43 | connection_url = None 44 | instr = None 45 | fglob = None 46 | index = 1 47 | 48 | for opts in optlist: 49 | if opts[0] == '-i': 50 | instr = opts[1] 51 | continue 52 | if opts[0] == '-g': 53 | fglob = opts[1] 54 | continue 55 | if opts[0] == '-c': 56 | connection_url = opts[1] 57 | continue 58 | if opts[0] == '-s': 59 | index = int(opts[1]) 60 | continue 61 | 62 | # 63 | # Test if we have enough arguments for BUFR import 64 | # 65 | 66 | if '.xml' not in ifn: 67 | if instr is None or fglob is None: 68 | print "Instrument and glob needs to be set when importing BUFR files" 69 | usage() 70 | # 71 | # Start connection to database 72 | # 73 | 74 | conn = None 75 | if connection_url is None: 76 | conn = bufrmetadb.BUFRDescDBConn() 77 | else: 78 | conn = bufrmetadb.BUFRDescDBConn( connection_url ) 79 | 80 | # 81 | # import into database 82 | # 83 | 84 | # insert XML and exit, guard statement 85 | if '.xml' in ifn: 86 | conn.import_xml(ifn) 87 | sys.exit(0) 88 | 89 | # 90 | # Handle BUFR input 91 | # 92 | 93 | bfr = bufr.BUFRFile(ifn) 94 | 95 | # insert BUFR file 96 | for i in range(index): 97 | section = bfr.next() 98 | 99 | # get info from file 100 | bufr_info = bufr.get_bfr_info(bfr) 101 | conn.insert_bufr_keys(instr,fglob,bufr_info, index) 102 | 103 | sys.exit(0) 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /metadb/metadb/scripts/sqlite_view_bufr: -------------------------------------------------------------------------------- 1 | 2 | # Create view in parameter database 3 | drop view if exists param_values; 4 | create view param_values as select 5 | bufr_desc.name as desc, 6 | bufr_var.name as var, 7 | bufr_var.id as varid, 8 | bufr_var.seq as seq, 9 | bufr_param_type.name as param, 10 | bufr_param.id as paramid, 11 | bufr_param.bparam_data as data, 12 | bufr_data_type.ptype as datatype 13 | from bufr_param 14 | inner join bufr_var on bufr_param.bufr_var_id = varid 15 | inner join bufr_param_type on bufr_param.bufr_param_type_id = bufr_param_type.id 16 | inner join bufr_desc on bufr_var.bdesc_id = bufr_desc.id 17 | inner join bufr_data_type on bufr_data_type.id = bufr_param_type.bufr_data_type_id; 18 | 19 | CREATE TRIGGER update_parameter 20 | INSTEAD OF UPDATE ON param_values BEGIN 21 | UPDATE bufr_param set bparam_data = new.data where bufr_param.id = new.paramid; 22 | END; 23 | 24 | -------------------------------------------------------------------------------- /metadb/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup, Extension 2 | 3 | setup(name='bufr-metadb', 4 | version='0.2-2', 5 | description='Translates BUFR variable names and units', 6 | author='Kristian Rune Larsen', 7 | author_email='krl@dmi.dk', 8 | maintainer='Kristian Rune Larsen', 9 | maintainer_email='krl@dmi.dk', 10 | package_dir = {'bufr/metadb': './metadb',}, 11 | packages = ['bufr/metadb',], 12 | scripts = ['metadb/scripts/import_bfr','metadb/scripts/export_bfr','metadb/scripts/assign_variables'], 13 | ) 14 | 15 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/README.Debian: -------------------------------------------------------------------------------- 1 | python-sqlalchemy-marshall for Debian 2 | ------------------------------ 3 | 4 | 5 | 6 | -- Kristian Rune Larsen Mon, 12 Oct 2009 13:52:47 +0200 7 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/changelog: -------------------------------------------------------------------------------- 1 | python-sqlalchemy-marshall (0.1-1) unstable; urgency=low 2 | 3 | * initial release 4 | 5 | -- Kristian Rune Larsen Mon, 12 Oct 2009 13:52:47 +0200 6 | 7 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/control: -------------------------------------------------------------------------------- 1 | Source: python-sqlalchemy-marshall 2 | Section: misc 3 | Priority: extra 4 | Maintainer: Kristian Rune Larsen 5 | Build-Depends: debhelper (>= 5) 6 | Standards-Version: 3.7.2 7 | 8 | Package: python-sqlalchemy-marshall 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends}, python-xml-marshall, python-sqlalchemy 11 | Description: DMI/TI Generic XML serialization for SQL Alchemy 12 | Provides functionality to make XML dumps of a SQL Alchemy database 13 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Kristian Rune Larsen on 2 | Mon, 12 Oct 2009 13:52:47 +0200. 3 | 4 | It was downloaded from 5 | 6 | Upstream Author(s): 7 | 8 | 9 | 10 | 11 | Copyright: 12 | 13 | 14 | 15 | 16 | License: 17 | 18 | 19 | 20 | The Debian packaging is (C) 2009, Kristian Rune Larsen and 21 | is licensed under the GPL, see `/usr/share/common-licenses/GPL'. 22 | 23 | # Please also look if there are files or directories which have a 24 | # different copyright/license attached and list them here. 25 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/cron.d.ex: -------------------------------------------------------------------------------- 1 | # 2 | # Regular cron jobs for the python-sqlalchemy-marshall package 3 | # 4 | 0 4 * * * root python-sqlalchemy-marshall_maintenance 5 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | usr/sbin 3 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/docs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/sqlalchemy-marshall/debian/docs -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/emacsen-install.ex: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | # /usr/lib/emacsen-common/packages/install/python-sqlalchemy-marshall 3 | 4 | # Written by Jim Van Zandt , borrowing heavily 5 | # from the install scripts for gettext by Santiago Vila 6 | # and octave by Dirk Eddelbuettel . 7 | 8 | FLAVOR=$1 9 | PACKAGE=python-sqlalchemy-marshall 10 | 11 | if [ ${FLAVOR} = emacs ]; then exit 0; fi 12 | 13 | echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} 14 | 15 | #FLAVORTEST=`echo $FLAVOR | cut -c-6` 16 | #if [ ${FLAVORTEST} = xemacs ] ; then 17 | # SITEFLAG="-no-site-file" 18 | #else 19 | # SITEFLAG="--no-site-file" 20 | #fi 21 | FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" 22 | 23 | ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} 24 | ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} 25 | 26 | # Install-info-altdir does not actually exist. 27 | # Maybe somebody will write it. 28 | if test -x /usr/sbin/install-info-altdir; then 29 | echo install/${PACKAGE}: install Info links for ${FLAVOR} 30 | install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz 31 | fi 32 | 33 | install -m 755 -d ${ELCDIR} 34 | cd ${ELDIR} 35 | FILES=`echo *.el` 36 | cp ${FILES} ${ELCDIR} 37 | cd ${ELCDIR} 38 | 39 | cat << EOF > path.el 40 | (setq load-path (cons "." load-path) byte-compile-warnings nil) 41 | EOF 42 | ${FLAVOR} ${FLAGS} ${FILES} 43 | rm -f *.el path.el 44 | 45 | exit 0 46 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/emacsen-remove.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # /usr/lib/emacsen-common/packages/remove/python-sqlalchemy-marshall 3 | 4 | FLAVOR=$1 5 | PACKAGE=python-sqlalchemy-marshall 6 | 7 | if [ ${FLAVOR} != emacs ]; then 8 | if test -x /usr/sbin/install-info-altdir; then 9 | echo remove/${PACKAGE}: removing Info links for ${FLAVOR} 10 | install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/python-sqlalchemy-marshall.info.gz 11 | fi 12 | 13 | echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} 14 | rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} 15 | fi 16 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/emacsen-startup.ex: -------------------------------------------------------------------------------- 1 | ;; -*-emacs-lisp-*- 2 | ;; 3 | ;; Emacs startup file, e.g. /etc/emacs/site-start.d/50python-sqlalchemy-marshall.el 4 | ;; for the Debian python-sqlalchemy-marshall package 5 | ;; 6 | ;; Originally contributed by Nils Naumann 7 | ;; Modified by Dirk Eddelbuettel 8 | ;; Adapted for dh-make by Jim Van Zandt 9 | 10 | ;; The python-sqlalchemy-marshall package follows the Debian/GNU Linux 'emacsen' policy and 11 | ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, 12 | ;; xemacs19, emacs20, xemacs20...). The compiled code is then 13 | ;; installed in a subdirectory of the respective site-lisp directory. 14 | ;; We have to add this to the load-path: 15 | (let ((package-dir (concat "/usr/share/" 16 | (symbol-name flavor) 17 | "/site-lisp/python-sqlalchemy-marshall"))) 18 | ;; If package-dir does not exist, the python-sqlalchemy-marshall package must have 19 | ;; removed but not purged, and we should skip the setup. 20 | (when (file-directory-p package-dir) 21 | (setq load-path (cons package-dir load-path)) 22 | (autoload 'python-sqlalchemy-marshall-mode "python-sqlalchemy-marshall-mode" 23 | "Major mode for editing python-sqlalchemy-marshall files." t) 24 | (add-to-list 'auto-mode-alist '("\\.python-sqlalchemy-marshall$" . python-sqlalchemy-marshall-mode)))) 25 | 26 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/files: -------------------------------------------------------------------------------- 1 | python-sqlalchemy-marshall_0.1-1_amd64.deb misc extra 2 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/init.d.ex: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # skeleton example file to build /etc/init.d/ scripts. 4 | # This file should be used to construct scripts for /etc/init.d. 5 | # 6 | # Written by Miquel van Smoorenburg . 7 | # Modified for Debian 8 | # by Ian Murdock . 9 | # Further changes by Javier Fernandez-Sanguino 10 | # 11 | # Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl 12 | # 13 | 14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15 | DAEMON=/usr/sbin/python-sqlalchemy-marshall 16 | NAME=python-sqlalchemy-marshall 17 | DESC=python-sqlalchemy-marshall 18 | 19 | test -x $DAEMON || exit 0 20 | 21 | LOGDIR=/var/log/python-sqlalchemy-marshall 22 | PIDFILE=/var/run/$NAME.pid 23 | DODTIME=1 # Time to wait for the server to die, in seconds 24 | # If this value is set too low you might not 25 | # let some servers to die gracefully and 26 | # 'restart' will not work 27 | 28 | # Include python-sqlalchemy-marshall defaults if available 29 | if [ -f /etc/default/python-sqlalchemy-marshall ] ; then 30 | . /etc/default/python-sqlalchemy-marshall 31 | fi 32 | 33 | set -e 34 | 35 | running_pid() 36 | { 37 | # Check if a given process pid's cmdline matches a given name 38 | pid=$1 39 | name=$2 40 | [ -z "$pid" ] && return 1 41 | [ ! -d /proc/$pid ] && return 1 42 | cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` 43 | # Is this the expected child? 44 | [ "$cmd" != "$name" ] && return 1 45 | return 0 46 | } 47 | 48 | running() 49 | { 50 | # Check if the process is running looking at /proc 51 | # (works for all users) 52 | 53 | # No pidfile, probably no daemon present 54 | [ ! -f "$PIDFILE" ] && return 1 55 | # Obtain the pid and check it against the binary name 56 | pid=`cat $PIDFILE` 57 | running_pid $pid $NAME || return 1 58 | return 0 59 | } 60 | 61 | force_stop() { 62 | # Forcefully kill the process 63 | [ ! -f "$PIDFILE" ] && return 64 | if running ; then 65 | kill -15 $pid 66 | # Is it really dead? 67 | [ -n "$DODTIME" ] && sleep "$DODTIME"s 68 | if running ; then 69 | kill -9 $pid 70 | [ -n "$DODTIME" ] && sleep "$DODTIME"s 71 | if running ; then 72 | echo "Cannot kill $LABEL (pid=$pid)!" 73 | exit 1 74 | fi 75 | fi 76 | fi 77 | rm -f $PIDFILE 78 | return 0 79 | } 80 | 81 | case "$1" in 82 | start) 83 | echo -n "Starting $DESC: " 84 | start-stop-daemon --start --quiet --pidfile $PIDFILE \ 85 | --exec $DAEMON -- $DAEMON_OPTS 86 | if running then 87 | echo "$NAME." 88 | else 89 | echo " ERROR." 90 | fi 91 | ;; 92 | stop) 93 | echo -n "Stopping $DESC: " 94 | start-stop-daemon --stop --quiet --pidfile $PIDFILE \ 95 | --exec $DAEMON 96 | echo "$NAME." 97 | ;; 98 | force-stop) 99 | echo -n "Forcefully stopping $DESC: " 100 | force_stop 101 | if ! running then 102 | echo "$NAME." 103 | else 104 | echo " ERROR." 105 | fi 106 | ;; 107 | #reload) 108 | # 109 | # If the daemon can reload its config files on the fly 110 | # for example by sending it SIGHUP, do it here. 111 | # 112 | # If the daemon responds to changes in its config file 113 | # directly anyway, make this a do-nothing entry. 114 | # 115 | # echo "Reloading $DESC configuration files." 116 | # start-stop-daemon --stop --signal 1 --quiet --pidfile \ 117 | # /var/run/$NAME.pid --exec $DAEMON 118 | #;; 119 | force-reload) 120 | # 121 | # If the "reload" option is implemented, move the "force-reload" 122 | # option to the "reload" entry above. If not, "force-reload" is 123 | # just the same as "restart" except that it does nothing if the 124 | # daemon isn't already running. 125 | # check wether $DAEMON is running. If so, restart 126 | start-stop-daemon --stop --test --quiet --pidfile \ 127 | /var/run/$NAME.pid --exec $DAEMON \ 128 | && $0 restart \ 129 | || exit 0 130 | ;; 131 | restart) 132 | echo -n "Restarting $DESC: " 133 | start-stop-daemon --stop --quiet --pidfile \ 134 | /var/run/$NAME.pid --exec $DAEMON 135 | [ -n "$DODTIME" ] && sleep $DODTIME 136 | start-stop-daemon --start --quiet --pidfile \ 137 | /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS 138 | echo "$NAME." 139 | ;; 140 | status) 141 | echo -n "$LABEL is " 142 | if running ; then 143 | echo "running" 144 | else 145 | echo " not running." 146 | exit 1 147 | fi 148 | ;; 149 | *) 150 | N=/etc/init.d/$NAME 151 | # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 152 | echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 153 | exit 1 154 | ;; 155 | esac 156 | 157 | exit 0 158 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/manpage.1.ex: -------------------------------------------------------------------------------- 1 | .\" Hey, EMACS: -*- nroff -*- 2 | .\" First parameter, NAME, should be all caps 3 | .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection 4 | .\" other parameters are allowed: see man(7), man(1) 5 | .TH SQLALCHEMY-MARSHALL SECTION "October 12, 2009" 6 | .\" Please adjust this date whenever revising the manpage. 7 | .\" 8 | .\" Some roff macros, for reference: 9 | .\" .nh disable hyphenation 10 | .\" .hy enable hyphenation 11 | .\" .ad l left justify 12 | .\" .ad b justify to both left and right margins 13 | .\" .nf disable filling 14 | .\" .fi enable filling 15 | .\" .br insert line break 16 | .\" .sp insert n+1 empty lines 17 | .\" for manpage-specific macros, see man(7) 18 | .SH NAME 19 | python-sqlalchemy-marshall \- program to do something 20 | .SH SYNOPSIS 21 | .B python-sqlalchemy-marshall 22 | .RI [ options ] " files" ... 23 | .br 24 | .B bar 25 | .RI [ options ] " files" ... 26 | .SH DESCRIPTION 27 | This manual page documents briefly the 28 | .B python-sqlalchemy-marshall 29 | and 30 | .B bar 31 | commands. 32 | .PP 33 | .\" TeX users may be more comfortable with the \fB\fP and 34 | .\" \fI\fP escape sequences to invode bold face and italics, 35 | .\" respectively. 36 | \fBpython-sqlalchemy-marshall\fP is a program that... 37 | .SH OPTIONS 38 | These programs follow the usual GNU command line syntax, with long 39 | options starting with two dashes (`-'). 40 | A summary of options is included below. 41 | For a complete description, see the Info files. 42 | .TP 43 | .B \-h, \-\-help 44 | Show summary of options. 45 | .TP 46 | .B \-v, \-\-version 47 | Show version of program. 48 | .SH SEE ALSO 49 | .BR bar (1), 50 | .BR baz (1). 51 | .br 52 | The programs are documented fully by 53 | .IR "The Rise and Fall of a Fooish Bar" , 54 | available via the Info system. 55 | .SH AUTHOR 56 | python-sqlalchemy-marshall was written by . 57 | .PP 58 | This manual page was written by Kristian Rune Larsen , 59 | for the Debian project (but may be used by others). 60 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/manpage.xml.ex: -------------------------------------------------------------------------------- 1 | 2 | .
will be generated. You may view the 11 | manual page with: nroff -man .
| less'. A 12 | typical entry in a Makefile or Makefile.am is: 13 | 14 | DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\ 15 | manpages/docbook.xsl 16 | XP=xsltproc -''-nonet 17 | 18 | manpage.1: manpage.dbk 19 | $(XP) $(DB2MAN) $< 20 | 21 | The xsltproc binary is found in the xsltproc package. The 22 | XSL files are in docbook-xsl. Please remember that if you 23 | create the nroff version in one of the debian/rules file 24 | targets (such as build), you will need to include xsltproc 25 | and docbook-xsl in your Build-Depends control field. 26 | 27 | --> 28 | 29 | 30 | FIRSTNAME"> 31 | SURNAME"> 32 | 33 | October 12, 2009"> 34 | 36 | SECTION"> 37 | krl@dmi.dk"> 38 | 39 | SQLALCHEMY-MARSHALL"> 40 | 41 | 42 | Debian"> 43 | GNU"> 44 | GPL"> 45 | ]> 46 | 47 | 48 | 49 |
50 | &dhemail; 51 |
52 | 53 | 2007 54 | &dhusername; 55 | 56 | &dhdate; 57 |
58 | 59 | &dhucpackage; 60 | 61 | &dhsection; 62 | 63 | 64 | &dhpackage; 65 | 66 | program to do something 67 | 68 | 69 | 70 | &dhpackage; 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | DESCRIPTION 79 | 80 | This manual page documents briefly the 81 | &dhpackage; and bar 82 | commands. 83 | 84 | This manual page was written for the &debian; distribution 85 | because the original program does not have a manual page. 86 | Instead, it has documentation in the &gnu; 87 | Info format; see below. 88 | 89 | &dhpackage; is a program that... 90 | 91 | 92 | 93 | OPTIONS 94 | 95 | These programs follow the usual &gnu; command line syntax, 96 | with long options starting with two dashes (`-'). A summary of 97 | options is included below. For a complete description, see the 98 | Info files. 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | Show summary of options. 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Show version of program. 115 | 116 | 117 | 118 | 119 | 120 | SEE ALSO 121 | 122 | bar (1), baz (1). 123 | 124 | The programs are documented fully by The Rise and 125 | Fall of a Fooish Bar available via the 126 | Info system. 127 | 128 | 129 | AUTHOR 130 | 131 | This manual page was written by &dhusername; &dhemail; for 132 | the &debian; system (but may be used by others). Permission is 133 | granted to copy, distribute and/or modify this document under 134 | the terms of the &gnu; General Public License, Version 2 any 135 | later version published by the Free Software Foundation. 136 | 137 | 138 | On Debian systems, the complete text of the GNU General Public 139 | License can be found in /usr/share/common-licenses/GPL. 140 | 141 | 142 | 143 |
144 | 145 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/menu.ex: -------------------------------------------------------------------------------- 1 | ?package(python-sqlalchemy-marshall):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ 2 | title="python-sqlalchemy-marshall" command="/usr/bin/python-sqlalchemy-marshall" 3 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/postinst.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for python-sqlalchemy-marshall 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see http://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | ;; 24 | 25 | abort-upgrade|abort-remove|abort-deconfigure) 26 | ;; 27 | 28 | *) 29 | echo "postinst called with unknown argument \`$1'" >&2 30 | exit 1 31 | ;; 32 | esac 33 | 34 | # dh_installdeb will replace this with shell code automatically 35 | # generated by other debhelper scripts. 36 | 37 | #DEBHELPER# 38 | 39 | exit 0 40 | 41 | 42 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/postrm.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for python-sqlalchemy-marshall 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `purge' 11 | # * `upgrade' 12 | # * `failed-upgrade' 13 | # * `abort-install' 14 | # * `abort-install' 15 | # * `abort-upgrade' 16 | # * `disappear' 17 | # 18 | # for details, see http://www.debian.org/doc/debian-policy/ or 19 | # the debian-policy package 20 | 21 | 22 | case "$1" in 23 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 24 | ;; 25 | 26 | *) 27 | echo "postrm called with unknown argument \`$1'" >&2 28 | exit 1 29 | ;; 30 | esac 31 | 32 | # dh_installdeb will replace this with shell code automatically 33 | # generated by other debhelper scripts. 34 | 35 | #DEBHELPER# 36 | 37 | exit 0 38 | 39 | 40 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/preinst.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # preinst script for python-sqlalchemy-marshall 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `install' 10 | # * `install' 11 | # * `upgrade' 12 | # * `abort-upgrade' 13 | # for details, see http://www.debian.org/doc/debian-policy/ or 14 | # the debian-policy package 15 | 16 | 17 | case "$1" in 18 | install|upgrade) 19 | ;; 20 | 21 | abort-upgrade) 22 | ;; 23 | 24 | *) 25 | echo "preinst called with unknown argument \`$1'" >&2 26 | exit 1 27 | ;; 28 | esac 29 | 30 | # dh_installdeb will replace this with shell code automatically 31 | # generated by other debhelper scripts. 32 | 33 | #DEBHELPER# 34 | 35 | exit 0 36 | 37 | 38 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/prerm.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # prerm script for python-sqlalchemy-marshall 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `upgrade' 11 | # * `failed-upgrade' 12 | # * `remove' `in-favour' 13 | # * `deconfigure' `in-favour' 14 | # `removing' 15 | # 16 | # for details, see http://www.debian.org/doc/debian-policy/ or 17 | # the debian-policy package 18 | 19 | 20 | case "$1" in 21 | remove|upgrade|deconfigure) 22 | ;; 23 | 24 | failed-upgrade) 25 | ;; 26 | 27 | *) 28 | echo "prerm called with unknown argument \`$1'" >&2 29 | exit 1 30 | ;; 31 | esac 32 | 33 | # dh_installdeb will replace this with shell code automatically 34 | # generated by other debhelper scripts. 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | 40 | 41 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | 13 | 14 | 15 | configure: configure-stamp 16 | configure-stamp: 17 | dh_testdir 18 | # Add here commands to configure the package. 19 | 20 | touch configure-stamp 21 | 22 | 23 | build: build-stamp 24 | 25 | build-stamp: configure-stamp 26 | dh_testdir 27 | 28 | # Add here commands to compile the package. 29 | python setup.py build 30 | #docbook-to-man debian/python-sqlalchemy-marshall.sgml > python-sqlalchemy-marshall.1 31 | 32 | touch $@ 33 | 34 | clean: 35 | dh_testdir 36 | dh_testroot 37 | rm -f build-stamp configure-stamp 38 | 39 | # Add here commands to clean up after the build process. 40 | rm -rf $(CURDIR)/build $(CURDIR)/debian/python-sqlalchemy-marshall 41 | 42 | dh_clean 43 | 44 | install: build 45 | dh_testdir 46 | dh_testroot 47 | dh_clean -k 48 | dh_installdirs 49 | 50 | # Add here commands to install the package into debian/python-sqlalchemy-marshall. 51 | python setup.py install --root=$(CURDIR)/debian/python-sqlalchemy-marshall --prefix=/opt 52 | 53 | 54 | # Build architecture-independent files here. 55 | binary-indep: build install 56 | # We have nothing to do by default. 57 | 58 | # Build architecture-dependent files here. 59 | binary-arch: build install 60 | dh_testdir 61 | dh_testroot 62 | dh_installchangelogs 63 | dh_installdocs 64 | dh_installexamples 65 | # dh_install 66 | # dh_installmenu 67 | # dh_installdebconf 68 | # dh_installlogrotate 69 | # dh_installemacsen 70 | # dh_installpam 71 | # dh_installmime 72 | dh_pysupport 73 | # dh_installinit 74 | # dh_installcron 75 | # dh_installinfo 76 | dh_installman 77 | dh_link 78 | dh_strip 79 | dh_compress 80 | dh_fixperms 81 | # dh_perl 82 | # dh_makeshlibs 83 | dh_installdeb 84 | dh_shlibdeps 85 | dh_gencontrol 86 | dh_md5sums 87 | dh_builddeb 88 | 89 | binary: binary-indep binary-arch 90 | .PHONY: build clean binary-indep binary-arch binary install configure 91 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/sqlalchemy-marshall-default.ex: -------------------------------------------------------------------------------- 1 | # Defaults for python-sqlalchemy-marshall initscript 2 | # sourced by /etc/init.d/python-sqlalchemy-marshall 3 | # installed at /etc/default/python-sqlalchemy-marshall by the maintainer scripts 4 | 5 | # 6 | # This is a POSIX shell fragment 7 | # 8 | 9 | # Additional options that are passed to the Daemon. 10 | DAEMON_OPTS="" 11 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/sqlalchemy-marshall.doc-base.EX: -------------------------------------------------------------------------------- 1 | Document: python-sqlalchemy-marshall 2 | Title: Debian python-sqlalchemy-marshall Manual 3 | Author: 4 | Abstract: This manual describes what python-sqlalchemy-marshall is 5 | and how it can be used to 6 | manage online manuals on Debian systems. 7 | Section: unknown 8 | 9 | Format: debiandoc-sgml 10 | Files: /usr/share/doc/python-sqlalchemy-marshall/python-sqlalchemy-marshall.sgml.gz 11 | 12 | Format: postscript 13 | Files: /usr/share/doc/python-sqlalchemy-marshall/python-sqlalchemy-marshall.ps.gz 14 | 15 | Format: text 16 | Files: /usr/share/doc/python-sqlalchemy-marshall/python-sqlalchemy-marshall.text.gz 17 | 18 | Format: HTML 19 | Index: /usr/share/doc/python-sqlalchemy-marshall/html/index.html 20 | Files: /usr/share/doc/python-sqlalchemy-marshall/html/*.html 21 | 22 | 23 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/sqlalchemy-marshall.postinst.debhelper: -------------------------------------------------------------------------------- 1 | # Automatically added by dh_pysupport 2 | if which update-python-modules >/dev/null 2>&1; then 3 | update-python-modules python-sqlalchemy-marshall 4 | fi 5 | # End automatically added section 6 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/sqlalchemy-marshall.prerm.debhelper: -------------------------------------------------------------------------------- 1 | # Automatically added by dh_pysupport 2 | if which update-python-modules >/dev/null 2>&1; then 3 | update-python-modules -c python-sqlalchemy-marshall 4 | fi 5 | # End automatically added section 6 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/sqlalchemy-marshall.substvars: -------------------------------------------------------------------------------- 1 | python:Versions=2.4, 2.3, 2.5 2 | python:Depends=python-support (>= 0.7.1) 3 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/debian/watch.ex: -------------------------------------------------------------------------------- 1 | # Example watch control file for uscan 2 | # Rename this file to "watch" and then you can run the "uscan" command 3 | # to check for upstream updates and more. 4 | # See uscan(1) for format 5 | 6 | # Compulsory line, this is a version 3 file 7 | version=3 8 | 9 | # Uncomment to examine a Webpage 10 | # 11 | #http://www.example.com/downloads.php python-sqlalchemy-marshall-(.*)\.tar\.gz 12 | 13 | # Uncomment to examine a Webserver directory 14 | #http://www.example.com/pub/python-sqlalchemy-marshall-(.*)\.tar\.gz 15 | 16 | # Uncommment to examine a FTP server 17 | #ftp://ftp.example.com/pub/python-sqlalchemy-marshall-(.*)\.tar\.gz debian uupdate 18 | 19 | # Uncomment to find new files on sourceforge, for debscripts >= 2.9 20 | # http://sf.net/python-sqlalchemy-marshall/python-sqlalchemy-marshall-(.*)\.tar\.gz 21 | 22 | 23 | -------------------------------------------------------------------------------- /sqlalchemy-marshall/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from distutils.core import setup 4 | 5 | setup(name='sqlalchemy_marshall', 6 | version='1.0', 7 | description='Genric module for dumping and reading SQLAlchemy XML object ', 8 | author='Kristian Rune Larsen', 9 | author_email='krl@dmi.dk', 10 | packages=['sqlalchemy_marshall',], 11 | ) 12 | -------------------------------------------------------------------------------- /transform/debian/README.Debian: -------------------------------------------------------------------------------- 1 | python-bufr-transform for Debian 2 | --------------------------- 3 | 4 | 5 | 6 | -- Kristian Rune Larsen Mon, 12 Oct 2009 13:30:01 +0200 7 | -------------------------------------------------------------------------------- /transform/debian/changelog: -------------------------------------------------------------------------------- 1 | python-bufr-transform (0.1-2) unstable; urgency=low 2 | 3 | * More robust implementation. 4 | * Changed to using pynetcdf4 ... DMI specific package !!! 5 | * Handles transposed sections 6 | 7 | -- Kristian Rune Larsen Mon, 12 Oct 2009 13:30:01 +0200 8 | 9 | python-bufr-transform (0.1-1) unstable; urgency=low 10 | 11 | * Initial release (Closes: #nnnn) 12 | 13 | -- Kristian Rune Larsen Mon, 12 Oct 2009 13:30:01 +0200 14 | 15 | -------------------------------------------------------------------------------- /transform/debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /transform/debian/control: -------------------------------------------------------------------------------- 1 | Source: python-bufr-transform 2 | Section: misc 3 | Priority: extra 4 | Maintainer: Kristian Rune Larsen 5 | Build-Depends: debhelper (>= 5) 6 | Standards-Version: 3.7.2 7 | 8 | Package: python-bufr-transform 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends}, python-bufr-metadb, pynetcdf4 11 | Description: DMI/TI prodvides BUFR translation scripts 12 | Currently only bufr2netcdf script provided. 13 | -------------------------------------------------------------------------------- /transform/debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Kristian Rune Larsen on 2 | Mon, 12 Oct 2009 13:30:01 +0200. 3 | 4 | It was downloaded from 5 | 6 | Upstream Author(s): 7 | 8 | 9 | 10 | 11 | Copyright: 12 | 13 | 14 | 15 | 16 | License: 17 | 18 | 19 | 20 | The Debian packaging is (C) 2009, Kristian Rune Larsen and 21 | is licensed under the GPL, see `/usr/share/common-licenses/GPL'. 22 | 23 | # Please also look if there are files or directories which have a 24 | # different copyright/license attached and list them here. 25 | -------------------------------------------------------------------------------- /transform/debian/cron.d.ex: -------------------------------------------------------------------------------- 1 | # 2 | # Regular cron jobs for the python-bufr-transform package 3 | # 4 | 0 4 * * * root python-bufr-transform_maintenance 5 | -------------------------------------------------------------------------------- /transform/debian/dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | usr/sbin 3 | -------------------------------------------------------------------------------- /transform/debian/docs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/transform/debian/docs -------------------------------------------------------------------------------- /transform/debian/emacsen-install.ex: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | # /usr/lib/emacsen-common/packages/install/python-bufr-transform 3 | 4 | # Written by Jim Van Zandt , borrowing heavily 5 | # from the install scripts for gettext by Santiago Vila 6 | # and octave by Dirk Eddelbuettel . 7 | 8 | FLAVOR=$1 9 | PACKAGE=python-bufr-transform 10 | 11 | if [ ${FLAVOR} = emacs ]; then exit 0; fi 12 | 13 | echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} 14 | 15 | #FLAVORTEST=`echo $FLAVOR | cut -c-6` 16 | #if [ ${FLAVORTEST} = xemacs ] ; then 17 | # SITEFLAG="-no-site-file" 18 | #else 19 | # SITEFLAG="--no-site-file" 20 | #fi 21 | FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" 22 | 23 | ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} 24 | ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} 25 | 26 | # Install-info-altdir does not actually exist. 27 | # Maybe somebody will write it. 28 | if test -x /usr/sbin/install-info-altdir; then 29 | echo install/${PACKAGE}: install Info links for ${FLAVOR} 30 | install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz 31 | fi 32 | 33 | install -m 755 -d ${ELCDIR} 34 | cd ${ELDIR} 35 | FILES=`echo *.el` 36 | cp ${FILES} ${ELCDIR} 37 | cd ${ELCDIR} 38 | 39 | cat << EOF > path.el 40 | (setq load-path (cons "." load-path) byte-compile-warnings nil) 41 | EOF 42 | ${FLAVOR} ${FLAGS} ${FILES} 43 | rm -f *.el path.el 44 | 45 | exit 0 46 | -------------------------------------------------------------------------------- /transform/debian/emacsen-remove.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # /usr/lib/emacsen-common/packages/remove/python-bufr-transform 3 | 4 | FLAVOR=$1 5 | PACKAGE=python-bufr-transform 6 | 7 | if [ ${FLAVOR} != emacs ]; then 8 | if test -x /usr/sbin/install-info-altdir; then 9 | echo remove/${PACKAGE}: removing Info links for ${FLAVOR} 10 | install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/python-bufr-transform.info.gz 11 | fi 12 | 13 | echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} 14 | rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} 15 | fi 16 | -------------------------------------------------------------------------------- /transform/debian/emacsen-startup.ex: -------------------------------------------------------------------------------- 1 | ;; -*-emacs-lisp-*- 2 | ;; 3 | ;; Emacs startup file, e.g. /etc/emacs/site-start.d/50python-bufr-transform.el 4 | ;; for the Debian python-bufr-transform package 5 | ;; 6 | ;; Originally contributed by Nils Naumann 7 | ;; Modified by Dirk Eddelbuettel 8 | ;; Adapted for dh-make by Jim Van Zandt 9 | 10 | ;; The python-bufr-transform package follows the Debian/GNU Linux 'emacsen' policy and 11 | ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, 12 | ;; xemacs19, emacs20, xemacs20...). The compiled code is then 13 | ;; installed in a subdirectory of the respective site-lisp directory. 14 | ;; We have to add this to the load-path: 15 | (let ((package-dir (concat "/usr/share/" 16 | (symbol-name flavor) 17 | "/site-lisp/python-bufr-transform"))) 18 | ;; If package-dir does not exist, the python-bufr-transform package must have 19 | ;; removed but not purged, and we should skip the setup. 20 | (when (file-directory-p package-dir) 21 | (setq load-path (cons package-dir load-path)) 22 | (autoload 'python-bufr-transform-mode "python-bufr-transform-mode" 23 | "Major mode for editing python-bufr-transform files." t) 24 | (add-to-list 'auto-mode-alist '("\\.python-bufr-transform$" . python-bufr-transform-mode)))) 25 | 26 | -------------------------------------------------------------------------------- /transform/debian/init.d.ex: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # skeleton example file to build /etc/init.d/ scripts. 4 | # This file should be used to construct scripts for /etc/init.d. 5 | # 6 | # Written by Miquel van Smoorenburg . 7 | # Modified for Debian 8 | # by Ian Murdock . 9 | # Further changes by Javier Fernandez-Sanguino 10 | # 11 | # Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl 12 | # 13 | 14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15 | DAEMON=/usr/sbin/python-bufr-transform 16 | NAME=python-bufr-transform 17 | DESC=python-bufr-transform 18 | 19 | test -x $DAEMON || exit 0 20 | 21 | LOGDIR=/var/log/python-bufr-transform 22 | PIDFILE=/var/run/$NAME.pid 23 | DODTIME=1 # Time to wait for the server to die, in seconds 24 | # If this value is set too low you might not 25 | # let some servers to die gracefully and 26 | # 'restart' will not work 27 | 28 | # Include python-bufr-transform defaults if available 29 | if [ -f /etc/default/python-bufr-transform ] ; then 30 | . /etc/default/python-bufr-transform 31 | fi 32 | 33 | set -e 34 | 35 | running_pid() 36 | { 37 | # Check if a given process pid's cmdline matches a given name 38 | pid=$1 39 | name=$2 40 | [ -z "$pid" ] && return 1 41 | [ ! -d /proc/$pid ] && return 1 42 | cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` 43 | # Is this the expected child? 44 | [ "$cmd" != "$name" ] && return 1 45 | return 0 46 | } 47 | 48 | running() 49 | { 50 | # Check if the process is running looking at /proc 51 | # (works for all users) 52 | 53 | # No pidfile, probably no daemon present 54 | [ ! -f "$PIDFILE" ] && return 1 55 | # Obtain the pid and check it against the binary name 56 | pid=`cat $PIDFILE` 57 | running_pid $pid $NAME || return 1 58 | return 0 59 | } 60 | 61 | force_stop() { 62 | # Forcefully kill the process 63 | [ ! -f "$PIDFILE" ] && return 64 | if running ; then 65 | kill -15 $pid 66 | # Is it really dead? 67 | [ -n "$DODTIME" ] && sleep "$DODTIME"s 68 | if running ; then 69 | kill -9 $pid 70 | [ -n "$DODTIME" ] && sleep "$DODTIME"s 71 | if running ; then 72 | echo "Cannot kill $LABEL (pid=$pid)!" 73 | exit 1 74 | fi 75 | fi 76 | fi 77 | rm -f $PIDFILE 78 | return 0 79 | } 80 | 81 | case "$1" in 82 | start) 83 | echo -n "Starting $DESC: " 84 | start-stop-daemon --start --quiet --pidfile $PIDFILE \ 85 | --exec $DAEMON -- $DAEMON_OPTS 86 | if running then 87 | echo "$NAME." 88 | else 89 | echo " ERROR." 90 | fi 91 | ;; 92 | stop) 93 | echo -n "Stopping $DESC: " 94 | start-stop-daemon --stop --quiet --pidfile $PIDFILE \ 95 | --exec $DAEMON 96 | echo "$NAME." 97 | ;; 98 | force-stop) 99 | echo -n "Forcefully stopping $DESC: " 100 | force_stop 101 | if ! running then 102 | echo "$NAME." 103 | else 104 | echo " ERROR." 105 | fi 106 | ;; 107 | #reload) 108 | # 109 | # If the daemon can reload its config files on the fly 110 | # for example by sending it SIGHUP, do it here. 111 | # 112 | # If the daemon responds to changes in its config file 113 | # directly anyway, make this a do-nothing entry. 114 | # 115 | # echo "Reloading $DESC configuration files." 116 | # start-stop-daemon --stop --signal 1 --quiet --pidfile \ 117 | # /var/run/$NAME.pid --exec $DAEMON 118 | #;; 119 | force-reload) 120 | # 121 | # If the "reload" option is implemented, move the "force-reload" 122 | # option to the "reload" entry above. If not, "force-reload" is 123 | # just the same as "restart" except that it does nothing if the 124 | # daemon isn't already running. 125 | # check wether $DAEMON is running. If so, restart 126 | start-stop-daemon --stop --test --quiet --pidfile \ 127 | /var/run/$NAME.pid --exec $DAEMON \ 128 | && $0 restart \ 129 | || exit 0 130 | ;; 131 | restart) 132 | echo -n "Restarting $DESC: " 133 | start-stop-daemon --stop --quiet --pidfile \ 134 | /var/run/$NAME.pid --exec $DAEMON 135 | [ -n "$DODTIME" ] && sleep $DODTIME 136 | start-stop-daemon --start --quiet --pidfile \ 137 | /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS 138 | echo "$NAME." 139 | ;; 140 | status) 141 | echo -n "$LABEL is " 142 | if running ; then 143 | echo "running" 144 | else 145 | echo " not running." 146 | exit 1 147 | fi 148 | ;; 149 | *) 150 | N=/etc/init.d/$NAME 151 | # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 152 | echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 153 | exit 1 154 | ;; 155 | esac 156 | 157 | exit 0 158 | -------------------------------------------------------------------------------- /transform/debian/manpage.1.ex: -------------------------------------------------------------------------------- 1 | .\" Hey, EMACS: -*- nroff -*- 2 | .\" First parameter, NAME, should be all caps 3 | .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection 4 | .\" other parameters are allowed: see man(7), man(1) 5 | .TH PYBUFR-TRANSFORM SECTION "October 12, 2009" 6 | .\" Please adjust this date whenever revising the manpage. 7 | .\" 8 | .\" Some roff macros, for reference: 9 | .\" .nh disable hyphenation 10 | .\" .hy enable hyphenation 11 | .\" .ad l left justify 12 | .\" .ad b justify to both left and right margins 13 | .\" .nf disable filling 14 | .\" .fi enable filling 15 | .\" .br insert line break 16 | .\" .sp insert n+1 empty lines 17 | .\" for manpage-specific macros, see man(7) 18 | .SH NAME 19 | python-bufr-transform \- program to do something 20 | .SH SYNOPSIS 21 | .B python-bufr-transform 22 | .RI [ options ] " files" ... 23 | .br 24 | .B bar 25 | .RI [ options ] " files" ... 26 | .SH DESCRIPTION 27 | This manual page documents briefly the 28 | .B python-bufr-transform 29 | and 30 | .B bar 31 | commands. 32 | .PP 33 | .\" TeX users may be more comfortable with the \fB\fP and 34 | .\" \fI\fP escape sequences to invode bold face and italics, 35 | .\" respectively. 36 | \fBpython-bufr-transform\fP is a program that... 37 | .SH OPTIONS 38 | These programs follow the usual GNU command line syntax, with long 39 | options starting with two dashes (`-'). 40 | A summary of options is included below. 41 | For a complete description, see the Info files. 42 | .TP 43 | .B \-h, \-\-help 44 | Show summary of options. 45 | .TP 46 | .B \-v, \-\-version 47 | Show version of program. 48 | .SH SEE ALSO 49 | .BR bar (1), 50 | .BR baz (1). 51 | .br 52 | The programs are documented fully by 53 | .IR "The Rise and Fall of a Fooish Bar" , 54 | available via the Info system. 55 | .SH AUTHOR 56 | python-bufr-transform was written by . 57 | .PP 58 | This manual page was written by Kristian Rune Larsen , 59 | for the Debian project (but may be used by others). 60 | -------------------------------------------------------------------------------- /transform/debian/manpage.xml.ex: -------------------------------------------------------------------------------- 1 | 2 | .
will be generated. You may view the 11 | manual page with: nroff -man .
| less'. A 12 | typical entry in a Makefile or Makefile.am is: 13 | 14 | DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\ 15 | manpages/docbook.xsl 16 | XP=xsltproc -''-nonet 17 | 18 | manpage.1: manpage.dbk 19 | $(XP) $(DB2MAN) $< 20 | 21 | The xsltproc binary is found in the xsltproc package. The 22 | XSL files are in docbook-xsl. Please remember that if you 23 | create the nroff version in one of the debian/rules file 24 | targets (such as build), you will need to include xsltproc 25 | and docbook-xsl in your Build-Depends control field. 26 | 27 | --> 28 | 29 | 30 | FIRSTNAME"> 31 | SURNAME"> 32 | 33 | October 12, 2009"> 34 | 36 | SECTION"> 37 | krl@dmi.dk"> 38 | 39 | PYBUFR-TRANSFORM"> 40 | 41 | 42 | Debian"> 43 | GNU"> 44 | GPL"> 45 | ]> 46 | 47 | 48 | 49 |
50 | &dhemail; 51 |
52 | 53 | 2007 54 | &dhusername; 55 | 56 | &dhdate; 57 |
58 | 59 | &dhucpackage; 60 | 61 | &dhsection; 62 | 63 | 64 | &dhpackage; 65 | 66 | program to do something 67 | 68 | 69 | 70 | &dhpackage; 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | DESCRIPTION 79 | 80 | This manual page documents briefly the 81 | &dhpackage; and bar 82 | commands. 83 | 84 | This manual page was written for the &debian; distribution 85 | because the original program does not have a manual page. 86 | Instead, it has documentation in the &gnu; 87 | Info format; see below. 88 | 89 | &dhpackage; is a program that... 90 | 91 | 92 | 93 | OPTIONS 94 | 95 | These programs follow the usual &gnu; command line syntax, 96 | with long options starting with two dashes (`-'). A summary of 97 | options is included below. For a complete description, see the 98 | Info files. 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | Show summary of options. 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Show version of program. 115 | 116 | 117 | 118 | 119 | 120 | SEE ALSO 121 | 122 | bar (1), baz (1). 123 | 124 | The programs are documented fully by The Rise and 125 | Fall of a Fooish Bar available via the 126 | Info system. 127 | 128 | 129 | AUTHOR 130 | 131 | This manual page was written by &dhusername; &dhemail; for 132 | the &debian; system (but may be used by others). Permission is 133 | granted to copy, distribute and/or modify this document under 134 | the terms of the &gnu; General Public License, Version 2 any 135 | later version published by the Free Software Foundation. 136 | 137 | 138 | On Debian systems, the complete text of the GNU General Public 139 | License can be found in /usr/share/common-licenses/GPL. 140 | 141 | 142 | 143 |
144 | 145 | -------------------------------------------------------------------------------- /transform/debian/menu.ex: -------------------------------------------------------------------------------- 1 | ?package(python-bufr-transform):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ 2 | title="python-bufr-transform" command="/usr/bin/python-bufr-transform" 3 | -------------------------------------------------------------------------------- /transform/debian/postinst.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for python-bufr-transform 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see http://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | ;; 24 | 25 | abort-upgrade|abort-remove|abort-deconfigure) 26 | ;; 27 | 28 | *) 29 | echo "postinst called with unknown argument \`$1'" >&2 30 | exit 1 31 | ;; 32 | esac 33 | 34 | # dh_installdeb will replace this with shell code automatically 35 | # generated by other debhelper scripts. 36 | 37 | #DEBHELPER# 38 | 39 | exit 0 40 | 41 | 42 | -------------------------------------------------------------------------------- /transform/debian/postrm.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for python-bufr-transform 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `purge' 11 | # * `upgrade' 12 | # * `failed-upgrade' 13 | # * `abort-install' 14 | # * `abort-install' 15 | # * `abort-upgrade' 16 | # * `disappear' 17 | # 18 | # for details, see http://www.debian.org/doc/debian-policy/ or 19 | # the debian-policy package 20 | 21 | 22 | case "$1" in 23 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 24 | ;; 25 | 26 | *) 27 | echo "postrm called with unknown argument \`$1'" >&2 28 | exit 1 29 | ;; 30 | esac 31 | 32 | # dh_installdeb will replace this with shell code automatically 33 | # generated by other debhelper scripts. 34 | 35 | #DEBHELPER# 36 | 37 | exit 0 38 | 39 | 40 | -------------------------------------------------------------------------------- /transform/debian/preinst.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # preinst script for python-bufr-transform 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `install' 10 | # * `install' 11 | # * `upgrade' 12 | # * `abort-upgrade' 13 | # for details, see http://www.debian.org/doc/debian-policy/ or 14 | # the debian-policy package 15 | 16 | 17 | case "$1" in 18 | install|upgrade) 19 | ;; 20 | 21 | abort-upgrade) 22 | ;; 23 | 24 | *) 25 | echo "preinst called with unknown argument \`$1'" >&2 26 | exit 1 27 | ;; 28 | esac 29 | 30 | # dh_installdeb will replace this with shell code automatically 31 | # generated by other debhelper scripts. 32 | 33 | #DEBHELPER# 34 | 35 | exit 0 36 | 37 | 38 | -------------------------------------------------------------------------------- /transform/debian/prerm.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # prerm script for python-bufr-transform 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `upgrade' 11 | # * `failed-upgrade' 12 | # * `remove' `in-favour' 13 | # * `deconfigure' `in-favour' 14 | # `removing' 15 | # 16 | # for details, see http://www.debian.org/doc/debian-policy/ or 17 | # the debian-policy package 18 | 19 | 20 | case "$1" in 21 | remove|upgrade|deconfigure) 22 | ;; 23 | 24 | failed-upgrade) 25 | ;; 26 | 27 | *) 28 | echo "prerm called with unknown argument \`$1'" >&2 29 | exit 1 30 | ;; 31 | esac 32 | 33 | # dh_installdeb will replace this with shell code automatically 34 | # generated by other debhelper scripts. 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | 40 | 41 | -------------------------------------------------------------------------------- /transform/debian/pybufr-transform-default.ex: -------------------------------------------------------------------------------- 1 | # Defaults for pybufr-transform initscript 2 | # sourced by /etc/init.d/pybufr-transform 3 | # installed at /etc/default/pybufr-transform by the maintainer scripts 4 | 5 | # 6 | # This is a POSIX shell fragment 7 | # 8 | 9 | # Additional options that are passed to the Daemon. 10 | DAEMON_OPTS="" 11 | -------------------------------------------------------------------------------- /transform/debian/pybufr-transform.doc-base.EX: -------------------------------------------------------------------------------- 1 | Document: pybufr-transform 2 | Title: Debian pybufr-transform Manual 3 | Author: 4 | Abstract: This manual describes what pybufr-transform is 5 | and how it can be used to 6 | manage online manuals on Debian systems. 7 | Section: unknown 8 | 9 | Format: debiandoc-sgml 10 | Files: /usr/share/doc/pybufr-transform/pybufr-transform.sgml.gz 11 | 12 | Format: postscript 13 | Files: /usr/share/doc/pybufr-transform/pybufr-transform.ps.gz 14 | 15 | Format: text 16 | Files: /usr/share/doc/pybufr-transform/pybufr-transform.text.gz 17 | 18 | Format: HTML 19 | Index: /usr/share/doc/pybufr-transform/html/index.html 20 | Files: /usr/share/doc/pybufr-transform/html/*.html 21 | 22 | 23 | -------------------------------------------------------------------------------- /transform/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | 13 | 14 | 15 | configure: configure-stamp 16 | configure-stamp: 17 | dh_testdir 18 | # Add here commands to configure the package. 19 | 20 | touch configure-stamp 21 | 22 | 23 | build: build-stamp 24 | 25 | build-stamp: configure-stamp 26 | dh_testdir 27 | 28 | # Add here commands to compile the package. 29 | python setup.py build 30 | #docbook-to-man debian/python-bufr-transform.sgml > python-bufr-transform.1 31 | 32 | touch $@ 33 | 34 | clean: 35 | dh_testdir 36 | dh_testroot 37 | rm -f build-stamp configure-stamp 38 | 39 | # Add here commands to clean up after the build process. 40 | rm -rf $(CURDIR)/debian/python-bufr-transform 41 | 42 | 43 | dh_clean 44 | 45 | install: build 46 | dh_testdir 47 | dh_testroot 48 | dh_clean -k 49 | dh_installdirs 50 | 51 | # Add here commands to install the package into debian/python-bufr-transform. 52 | python setup.py install --root=$(CURDIR)/debian/python-bufr-transform --prefix=/opt 53 | 54 | 55 | # Build architecture-independent files here. 56 | binary-indep: build install 57 | # We have nothing to do by default. 58 | 59 | # Build architecture-dependent files here. 60 | binary-arch: build install 61 | dh_testdir 62 | dh_testroot 63 | dh_installchangelogs 64 | dh_installdocs 65 | dh_installexamples 66 | # dh_install 67 | # dh_installmenu 68 | # dh_installdebconf 69 | # dh_installlogrotate 70 | # dh_installemacsen 71 | # dh_installpam 72 | # dh_installmime 73 | dh_pysupport 74 | # dh_installinit 75 | # dh_installcron 76 | # dh_installinfo 77 | dh_installman 78 | dh_link 79 | dh_strip 80 | dh_compress 81 | dh_fixperms 82 | # dh_perl 83 | # dh_makeshlibs 84 | dh_installdeb 85 | dh_shlibdeps 86 | dh_gencontrol 87 | dh_md5sums 88 | dh_builddeb 89 | 90 | binary: binary-indep binary-arch 91 | .PHONY: build clean binary-indep binary-arch binary install configure 92 | -------------------------------------------------------------------------------- /transform/debian/watch.ex: -------------------------------------------------------------------------------- 1 | # Example watch control file for uscan 2 | # Rename this file to "watch" and then you can run the "uscan" command 3 | # to check for upstream updates and more. 4 | # See uscan(1) for format 5 | 6 | # Compulsory line, this is a version 3 file 7 | version=3 8 | 9 | # Uncomment to examine a Webpage 10 | # 11 | #http://www.example.com/downloads.php python-bufr-transform-(.*)\.tar\.gz 12 | 13 | # Uncomment to examine a Webserver directory 14 | #http://www.example.com/pub/python-bufr-transform-(.*)\.tar\.gz 15 | 16 | # Uncommment to examine a FTP server 17 | #ftp://ftp.example.com/pub/python-bufr-transform-(.*)\.tar\.gz debian uupdate 18 | 19 | # Uncomment to find new files on sourceforge, for debscripts >= 2.9 20 | # http://sf.net/python-bufr-transform/python-bufr-transform-(.*)\.tar\.gz 21 | 22 | 23 | -------------------------------------------------------------------------------- /transform/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup, Extension 2 | 3 | setup(name='bufr-transform', 4 | version='0.2-2', 5 | description='Translates BUFR variable names and units', 6 | author='Kristian Rune Larsen', 7 | author_email='krl@dmi.dk', 8 | maintainer='Kristian Rune Larsen', 9 | maintainer_email='krl@dmi.dk', 10 | packages = ['bufr/transform',], 11 | package_dir = {'bufr/transform': './transform',}, 12 | scripts = ['transform/scripts/bufr2netcdf', 13 | 'transform/scripts/bufr2netcdf4'], 14 | ) 15 | 16 | -------------------------------------------------------------------------------- /transform/transform/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | ''' 4 | File: __init__.py 5 | Author: Kristian Rune Larsen 6 | Description: Facade for transforming BUFR files 7 | ''' 8 | 9 | class BUFR2NetCDFError(Exception): 10 | """ Simple exception for handeling errors """ 11 | pass 12 | 13 | def netcdf_datatype(type_name): 14 | """ converts numpy datatype to NetCDF datatype 15 | 16 | all floats are converted to doubles 17 | all integers are converted to 4 byte int 18 | all chars are converted to NetCDF byte-type 19 | 20 | """ 21 | if 'float' in type_name: 22 | return 'd' 23 | if 'int' in type_name: 24 | return 'i' 25 | if 'long' in type_name: 26 | return 'i' 27 | if 'string' in type_name: 28 | return 'b' 29 | 30 | raise BUFR2NetCDFError("Cannot convert %s to NetCDF compatible type" %\ 31 | type_name) 32 | 33 | def bufr2netcdf(input_bufr_file, output_nc_file, netcdf='netcdf4', 34 | database_url='sqlite:///bufr.db'): 35 | """Facade method for extracting instrument type from filename and decoding 36 | BUFR all at once""" 37 | from bufr import metadb 38 | 39 | # get instruments from database 40 | conn = metadb.BUFRDescDBConn(database_url) 41 | instr = conn.get_instrument_from_filename(input_bufr_file) 42 | 43 | # Transform BUFR file 44 | if netcdf == 'netcdf4': 45 | from bufr.transform import bufr2netcdf4 46 | bufr2netcdf4.bufr2netcdf(instr, input_bufr_file, output_nc_file, database_url) 47 | elif netcdf == 'netcdf3': 48 | from bufr.transform import bufr2netcdf3 49 | bufr2netcdf3.bufr2netcdf(instr, input_bufr_file, output_nc_file, database_url) 50 | else: 51 | raise BUFR2NetCDFError("Invalid netcdf argument \ 52 | valid arguments are 'netcdf4' and 'netcdf3'") 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /transform/transform/scripts/bufr2netcdf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # python-bufr-transform , BUFR variable translation 4 | # 5 | # Copyright (C) 2010 Kristian Rune Larsen 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | # 20 | 21 | 22 | """ converts any BUFR file to NetCDF, variable name mapping based on database """ 23 | 24 | __revision__ = 0.1 25 | 26 | 27 | import bufr.metadb as bufrmetadb 28 | from bufr.transform import bufr2netcdf 29 | 30 | import sys 31 | import getopt 32 | 33 | if __name__ == '__main__': 34 | 35 | def usage(): 36 | """ print basic usage and exit """ 37 | print """USAGE: 38 | bufr2netcdf [-c database connection url] [-l] 39 | 40 | -c: Set database url 41 | -l: dry run, lists instruments 42 | 43 | """ 44 | sys.exit(2) 45 | 46 | list_instr = False 47 | dburl = None 48 | 49 | try: 50 | optlist, args = getopt.getopt(sys.argv[1:], 'c:lh', []) 51 | except IndexError: 52 | usage() 53 | 54 | for opts in optlist: 55 | if opts[0] == '-c': 56 | dburl = opts[1] 57 | continue 58 | if opts[0] == '-l': 59 | list_instr = True 60 | continue 61 | if opts[0] == '-h': 62 | usage() 63 | continue 64 | 65 | if list_instr: 66 | # list instruments and exit 67 | conn = None 68 | if dburl is not None: 69 | conn = bufrmetadb.BUFRDescDBConn(dburl) 70 | else: 71 | conn = bufrmetadb.BUFRDescDBConn() 72 | instr_names = conn.get_instrument_names() 73 | instr_descriptions = conn.get_instrument_descriptions() 74 | for name, descr in zip(instr_names, instr_descriptions): 75 | print "%s\t%s" % (name, descr) 76 | sys.exit(0) 77 | try: 78 | instr = args[0] 79 | bfn = args[1] 80 | ncfn = args[2] 81 | except: 82 | usage() 83 | 84 | if dburl is not None: 85 | bufr2netcdf.bufr2netcdf(instr, bfn, ncfn, dburl=dburl) 86 | else: 87 | bufr2netcdf.bufr2netcdf(instr, bfn, ncfn) 88 | 89 | 90 | -------------------------------------------------------------------------------- /transform/transform/scripts/bufr2netcdf4: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # python-bufr-transform , BUFR variable translation 4 | # 5 | # Copyright (C) 2010 Kristian Rune Larsen 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | # 20 | 21 | 22 | """ converts any BUFR file to NetCDF, variable name mapping based on database """ 23 | 24 | __revision__ = 0.1 25 | 26 | 27 | import bufr.metadb as bufrmetadb 28 | from bufr.transform import bufr2netcdf4 29 | 30 | import sys 31 | import getopt 32 | 33 | if __name__ == '__main__': 34 | 35 | def usage(): 36 | """ print basic usage and exit """ 37 | print """USAGE: 38 | bufr2netcdf [-c database connection url] [-l] 39 | 40 | -c: Set database url 41 | -l: dry run, lists instruments 42 | 43 | """ 44 | sys.exit(2) 45 | 46 | list_instr = False 47 | dburl = None 48 | 49 | try: 50 | optlist, args = getopt.getopt(sys.argv[1:], 'c:lh', []) 51 | except IndexError: 52 | usage() 53 | 54 | for opts in optlist: 55 | if opts[0] == '-c': 56 | dburl = opts[1] 57 | continue 58 | if opts[0] == '-l': 59 | list_instr = True 60 | continue 61 | if opts[0] == '-h': 62 | usage() 63 | continue 64 | 65 | if list_instr: 66 | # list instruments and exit 67 | conn = None 68 | if dburl is not None: 69 | conn = bufrmetadb.BUFRDescDBConn(dburl) 70 | else: 71 | conn = bufrmetadb.BUFRDescDBConn() 72 | instr_names = conn.get_instrument_names() 73 | instr_descriptions = conn.get_instrument_descriptions() 74 | for name, descr in zip(instr_names, instr_descriptions): 75 | print "%s\t%s" % (name, descr) 76 | sys.exit(0) 77 | try: 78 | instr = args[0] 79 | bfn = args[1] 80 | ncfn = args[2] 81 | except: 82 | usage() 83 | 84 | if dburl is not None: 85 | bufr2netcdf4.bufr2netcdf(instr, bfn, ncfn, dburl=dburl) 86 | else: 87 | bufr2netcdf4.bufr2netcdf(instr, bfn, ncfn) 88 | 89 | 90 | -------------------------------------------------------------------------------- /xml-marshall/debian/README.Debian: -------------------------------------------------------------------------------- 1 | python-xml-marshall for Debian 2 | ----------------------- 3 | 4 | 5 | 6 | -- Kristian Rune Larsen Mon, 12 Oct 2009 13:56:23 +0200 7 | -------------------------------------------------------------------------------- /xml-marshall/debian/changelog: -------------------------------------------------------------------------------- 1 | python-xml-marshall (0.1-1) unstable; urgency=low 2 | 3 | * initial release 4 | 5 | -- Kristian Rune Larsen Mon, 12 Oct 2009 13:56:23 +0200 6 | 7 | -------------------------------------------------------------------------------- /xml-marshall/debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /xml-marshall/debian/control: -------------------------------------------------------------------------------- 1 | Source: python-xml-marshall 2 | Section: misc 3 | Priority: extra 4 | Maintainer: Kristian Rune Larsen 5 | Build-Depends: debhelper (>= 5) 6 | Standards-Version: 3.7.2 7 | 8 | Package: python-xml-marshall 9 | Architecture: any 10 | Depends: ${shlibs:Depends}, ${misc:Depends} 11 | Description: DMI/TI python generic XML serialization 12 | Provides serialization handles for complex python objects. 13 | Primitive objects work out of the box. 14 | -------------------------------------------------------------------------------- /xml-marshall/debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Kristian Rune Larsen on 2 | Mon, 12 Oct 2009 13:56:23 +0200. 3 | 4 | It was downloaded from 5 | 6 | Upstream Author(s): 7 | 8 | 9 | 10 | 11 | Copyright: 12 | 13 | 14 | 15 | 16 | License: 17 | 18 | 19 | 20 | The Debian packaging is (C) 2009, Kristian Rune Larsen and 21 | is licensed under the GPL, see `/usr/share/common-licenses/GPL'. 22 | 23 | # Please also look if there are files or directories which have a 24 | # different copyright/license attached and list them here. 25 | -------------------------------------------------------------------------------- /xml-marshall/debian/cron.d.ex: -------------------------------------------------------------------------------- 1 | # 2 | # Regular cron jobs for the python-xml-marshall package 3 | # 4 | 0 4 * * * root python-xml-marshall_maintenance 5 | -------------------------------------------------------------------------------- /xml-marshall/debian/dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | usr/sbin 3 | -------------------------------------------------------------------------------- /xml-marshall/debian/docs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pytroll/python-bufr/f2a48ab73dd113aa54111029f0700367cf955f50/xml-marshall/debian/docs -------------------------------------------------------------------------------- /xml-marshall/debian/emacsen-install.ex: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | # /usr/lib/emacsen-common/packages/install/python-xml-marshall 3 | 4 | # Written by Jim Van Zandt , borrowing heavily 5 | # from the install scripts for gettext by Santiago Vila 6 | # and octave by Dirk Eddelbuettel . 7 | 8 | FLAVOR=$1 9 | PACKAGE=python-xml-marshall 10 | 11 | if [ ${FLAVOR} = emacs ]; then exit 0; fi 12 | 13 | echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} 14 | 15 | #FLAVORTEST=`echo $FLAVOR | cut -c-6` 16 | #if [ ${FLAVORTEST} = xemacs ] ; then 17 | # SITEFLAG="-no-site-file" 18 | #else 19 | # SITEFLAG="--no-site-file" 20 | #fi 21 | FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" 22 | 23 | ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} 24 | ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} 25 | 26 | # Install-info-altdir does not actually exist. 27 | # Maybe somebody will write it. 28 | if test -x /usr/sbin/install-info-altdir; then 29 | echo install/${PACKAGE}: install Info links for ${FLAVOR} 30 | install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz 31 | fi 32 | 33 | install -m 755 -d ${ELCDIR} 34 | cd ${ELDIR} 35 | FILES=`echo *.el` 36 | cp ${FILES} ${ELCDIR} 37 | cd ${ELCDIR} 38 | 39 | cat << EOF > path.el 40 | (setq load-path (cons "." load-path) byte-compile-warnings nil) 41 | EOF 42 | ${FLAVOR} ${FLAGS} ${FILES} 43 | rm -f *.el path.el 44 | 45 | exit 0 46 | -------------------------------------------------------------------------------- /xml-marshall/debian/emacsen-remove.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # /usr/lib/emacsen-common/packages/remove/python-xml-marshall 3 | 4 | FLAVOR=$1 5 | PACKAGE=python-xml-marshall 6 | 7 | if [ ${FLAVOR} != emacs ]; then 8 | if test -x /usr/sbin/install-info-altdir; then 9 | echo remove/${PACKAGE}: removing Info links for ${FLAVOR} 10 | install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/python-xml-marshall.info.gz 11 | fi 12 | 13 | echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} 14 | rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} 15 | fi 16 | -------------------------------------------------------------------------------- /xml-marshall/debian/emacsen-startup.ex: -------------------------------------------------------------------------------- 1 | ;; -*-emacs-lisp-*- 2 | ;; 3 | ;; Emacs startup file, e.g. /etc/emacs/site-start.d/50python-xml-marshall.el 4 | ;; for the Debian python-xml-marshall package 5 | ;; 6 | ;; Originally contributed by Nils Naumann 7 | ;; Modified by Dirk Eddelbuettel 8 | ;; Adapted for dh-make by Jim Van Zandt 9 | 10 | ;; The python-xml-marshall package follows the Debian/GNU Linux 'emacsen' policy and 11 | ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, 12 | ;; xemacs19, emacs20, xemacs20...). The compiled code is then 13 | ;; installed in a subdirectory of the respective site-lisp directory. 14 | ;; We have to add this to the load-path: 15 | (let ((package-dir (concat "/usr/share/" 16 | (symbol-name flavor) 17 | "/site-lisp/python-xml-marshall"))) 18 | ;; If package-dir does not exist, the python-xml-marshall package must have 19 | ;; removed but not purged, and we should skip the setup. 20 | (when (file-directory-p package-dir) 21 | (setq load-path (cons package-dir load-path)) 22 | (autoload 'python-xml-marshall-mode "python-xml-marshall-mode" 23 | "Major mode for editing python-xml-marshall files." t) 24 | (add-to-list 'auto-mode-alist '("\\.python-xml-marshall$" . python-xml-marshall-mode)))) 25 | 26 | -------------------------------------------------------------------------------- /xml-marshall/debian/files: -------------------------------------------------------------------------------- 1 | python-xml-marshall_0.1-1_amd64.deb misc extra 2 | -------------------------------------------------------------------------------- /xml-marshall/debian/init.d.ex: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # skeleton example file to build /etc/init.d/ scripts. 4 | # This file should be used to construct scripts for /etc/init.d. 5 | # 6 | # Written by Miquel van Smoorenburg . 7 | # Modified for Debian 8 | # by Ian Murdock . 9 | # Further changes by Javier Fernandez-Sanguino 10 | # 11 | # Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl 12 | # 13 | 14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15 | DAEMON=/usr/sbin/python-xml-marshall 16 | NAME=python-xml-marshall 17 | DESC=python-xml-marshall 18 | 19 | test -x $DAEMON || exit 0 20 | 21 | LOGDIR=/var/log/python-xml-marshall 22 | PIDFILE=/var/run/$NAME.pid 23 | DODTIME=1 # Time to wait for the server to die, in seconds 24 | # If this value is set too low you might not 25 | # let some servers to die gracefully and 26 | # 'restart' will not work 27 | 28 | # Include python-xml-marshall defaults if available 29 | if [ -f /etc/default/python-xml-marshall ] ; then 30 | . /etc/default/python-xml-marshall 31 | fi 32 | 33 | set -e 34 | 35 | running_pid() 36 | { 37 | # Check if a given process pid's cmdline matches a given name 38 | pid=$1 39 | name=$2 40 | [ -z "$pid" ] && return 1 41 | [ ! -d /proc/$pid ] && return 1 42 | cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` 43 | # Is this the expected child? 44 | [ "$cmd" != "$name" ] && return 1 45 | return 0 46 | } 47 | 48 | running() 49 | { 50 | # Check if the process is running looking at /proc 51 | # (works for all users) 52 | 53 | # No pidfile, probably no daemon present 54 | [ ! -f "$PIDFILE" ] && return 1 55 | # Obtain the pid and check it against the binary name 56 | pid=`cat $PIDFILE` 57 | running_pid $pid $NAME || return 1 58 | return 0 59 | } 60 | 61 | force_stop() { 62 | # Forcefully kill the process 63 | [ ! -f "$PIDFILE" ] && return 64 | if running ; then 65 | kill -15 $pid 66 | # Is it really dead? 67 | [ -n "$DODTIME" ] && sleep "$DODTIME"s 68 | if running ; then 69 | kill -9 $pid 70 | [ -n "$DODTIME" ] && sleep "$DODTIME"s 71 | if running ; then 72 | echo "Cannot kill $LABEL (pid=$pid)!" 73 | exit 1 74 | fi 75 | fi 76 | fi 77 | rm -f $PIDFILE 78 | return 0 79 | } 80 | 81 | case "$1" in 82 | start) 83 | echo -n "Starting $DESC: " 84 | start-stop-daemon --start --quiet --pidfile $PIDFILE \ 85 | --exec $DAEMON -- $DAEMON_OPTS 86 | if running then 87 | echo "$NAME." 88 | else 89 | echo " ERROR." 90 | fi 91 | ;; 92 | stop) 93 | echo -n "Stopping $DESC: " 94 | start-stop-daemon --stop --quiet --pidfile $PIDFILE \ 95 | --exec $DAEMON 96 | echo "$NAME." 97 | ;; 98 | force-stop) 99 | echo -n "Forcefully stopping $DESC: " 100 | force_stop 101 | if ! running then 102 | echo "$NAME." 103 | else 104 | echo " ERROR." 105 | fi 106 | ;; 107 | #reload) 108 | # 109 | # If the daemon can reload its config files on the fly 110 | # for example by sending it SIGHUP, do it here. 111 | # 112 | # If the daemon responds to changes in its config file 113 | # directly anyway, make this a do-nothing entry. 114 | # 115 | # echo "Reloading $DESC configuration files." 116 | # start-stop-daemon --stop --signal 1 --quiet --pidfile \ 117 | # /var/run/$NAME.pid --exec $DAEMON 118 | #;; 119 | force-reload) 120 | # 121 | # If the "reload" option is implemented, move the "force-reload" 122 | # option to the "reload" entry above. If not, "force-reload" is 123 | # just the same as "restart" except that it does nothing if the 124 | # daemon isn't already running. 125 | # check wether $DAEMON is running. If so, restart 126 | start-stop-daemon --stop --test --quiet --pidfile \ 127 | /var/run/$NAME.pid --exec $DAEMON \ 128 | && $0 restart \ 129 | || exit 0 130 | ;; 131 | restart) 132 | echo -n "Restarting $DESC: " 133 | start-stop-daemon --stop --quiet --pidfile \ 134 | /var/run/$NAME.pid --exec $DAEMON 135 | [ -n "$DODTIME" ] && sleep $DODTIME 136 | start-stop-daemon --start --quiet --pidfile \ 137 | /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS 138 | echo "$NAME." 139 | ;; 140 | status) 141 | echo -n "$LABEL is " 142 | if running ; then 143 | echo "running" 144 | else 145 | echo " not running." 146 | exit 1 147 | fi 148 | ;; 149 | *) 150 | N=/etc/init.d/$NAME 151 | # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 152 | echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 153 | exit 1 154 | ;; 155 | esac 156 | 157 | exit 0 158 | -------------------------------------------------------------------------------- /xml-marshall/debian/manpage.1.ex: -------------------------------------------------------------------------------- 1 | .\" Hey, EMACS: -*- nroff -*- 2 | .\" First parameter, NAME, should be all caps 3 | .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection 4 | .\" other parameters are allowed: see man(7), man(1) 5 | .TH XML-MARSHALL SECTION "October 12, 2009" 6 | .\" Please adjust this date whenever revising the manpage. 7 | .\" 8 | .\" Some roff macros, for reference: 9 | .\" .nh disable hyphenation 10 | .\" .hy enable hyphenation 11 | .\" .ad l left justify 12 | .\" .ad b justify to both left and right margins 13 | .\" .nf disable filling 14 | .\" .fi enable filling 15 | .\" .br insert line break 16 | .\" .sp insert n+1 empty lines 17 | .\" for manpage-specific macros, see man(7) 18 | .SH NAME 19 | python-xml-marshall \- program to do something 20 | .SH SYNOPSIS 21 | .B python-xml-marshall 22 | .RI [ options ] " files" ... 23 | .br 24 | .B bar 25 | .RI [ options ] " files" ... 26 | .SH DESCRIPTION 27 | This manual page documents briefly the 28 | .B python-xml-marshall 29 | and 30 | .B bar 31 | commands. 32 | .PP 33 | .\" TeX users may be more comfortable with the \fB\fP and 34 | .\" \fI\fP escape sequences to invode bold face and italics, 35 | .\" respectively. 36 | \fBpython-xml-marshall\fP is a program that... 37 | .SH OPTIONS 38 | These programs follow the usual GNU command line syntax, with long 39 | options starting with two dashes (`-'). 40 | A summary of options is included below. 41 | For a complete description, see the Info files. 42 | .TP 43 | .B \-h, \-\-help 44 | Show summary of options. 45 | .TP 46 | .B \-v, \-\-version 47 | Show version of program. 48 | .SH SEE ALSO 49 | .BR bar (1), 50 | .BR baz (1). 51 | .br 52 | The programs are documented fully by 53 | .IR "The Rise and Fall of a Fooish Bar" , 54 | available via the Info system. 55 | .SH AUTHOR 56 | python-xml-marshall was written by . 57 | .PP 58 | This manual page was written by Kristian Rune Larsen , 59 | for the Debian project (but may be used by others). 60 | -------------------------------------------------------------------------------- /xml-marshall/debian/manpage.xml.ex: -------------------------------------------------------------------------------- 1 | 2 | .
will be generated. You may view the 11 | manual page with: nroff -man .
| less'. A 12 | typical entry in a Makefile or Makefile.am is: 13 | 14 | DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\ 15 | manpages/docbook.xsl 16 | XP=xsltproc -''-nonet 17 | 18 | manpage.1: manpage.dbk 19 | $(XP) $(DB2MAN) $< 20 | 21 | The xsltproc binary is found in the xsltproc package. The 22 | XSL files are in docbook-xsl. Please remember that if you 23 | create the nroff version in one of the debian/rules file 24 | targets (such as build), you will need to include xsltproc 25 | and docbook-xsl in your Build-Depends control field. 26 | 27 | --> 28 | 29 | 30 | FIRSTNAME"> 31 | SURNAME"> 32 | 33 | October 12, 2009"> 34 | 36 | SECTION"> 37 | krl@dmi.dk"> 38 | 39 | XML-MARSHALL"> 40 | 41 | 42 | Debian"> 43 | GNU"> 44 | GPL"> 45 | ]> 46 | 47 | 48 | 49 |
50 | &dhemail; 51 |
52 | 53 | 2007 54 | &dhusername; 55 | 56 | &dhdate; 57 |
58 | 59 | &dhucpackage; 60 | 61 | &dhsection; 62 | 63 | 64 | &dhpackage; 65 | 66 | program to do something 67 | 68 | 69 | 70 | &dhpackage; 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | DESCRIPTION 79 | 80 | This manual page documents briefly the 81 | &dhpackage; and bar 82 | commands. 83 | 84 | This manual page was written for the &debian; distribution 85 | because the original program does not have a manual page. 86 | Instead, it has documentation in the &gnu; 87 | Info format; see below. 88 | 89 | &dhpackage; is a program that... 90 | 91 | 92 | 93 | OPTIONS 94 | 95 | These programs follow the usual &gnu; command line syntax, 96 | with long options starting with two dashes (`-'). A summary of 97 | options is included below. For a complete description, see the 98 | Info files. 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | Show summary of options. 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Show version of program. 115 | 116 | 117 | 118 | 119 | 120 | SEE ALSO 121 | 122 | bar (1), baz (1). 123 | 124 | The programs are documented fully by The Rise and 125 | Fall of a Fooish Bar available via the 126 | Info system. 127 | 128 | 129 | AUTHOR 130 | 131 | This manual page was written by &dhusername; &dhemail; for 132 | the &debian; system (but may be used by others). Permission is 133 | granted to copy, distribute and/or modify this document under 134 | the terms of the &gnu; General Public License, Version 2 any 135 | later version published by the Free Software Foundation. 136 | 137 | 138 | On Debian systems, the complete text of the GNU General Public 139 | License can be found in /usr/share/common-licenses/GPL. 140 | 141 | 142 | 143 |
144 | 145 | -------------------------------------------------------------------------------- /xml-marshall/debian/menu.ex: -------------------------------------------------------------------------------- 1 | ?package(python-xml-marshall):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ 2 | title="python-xml-marshall" command="/usr/bin/python-xml-marshall" 3 | -------------------------------------------------------------------------------- /xml-marshall/debian/postinst.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for python-xml-marshall 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see http://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | ;; 24 | 25 | abort-upgrade|abort-remove|abort-deconfigure) 26 | ;; 27 | 28 | *) 29 | echo "postinst called with unknown argument \`$1'" >&2 30 | exit 1 31 | ;; 32 | esac 33 | 34 | # dh_installdeb will replace this with shell code automatically 35 | # generated by other debhelper scripts. 36 | 37 | #DEBHELPER# 38 | 39 | exit 0 40 | 41 | 42 | -------------------------------------------------------------------------------- /xml-marshall/debian/postrm.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for python-xml-marshall 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `purge' 11 | # * `upgrade' 12 | # * `failed-upgrade' 13 | # * `abort-install' 14 | # * `abort-install' 15 | # * `abort-upgrade' 16 | # * `disappear' 17 | # 18 | # for details, see http://www.debian.org/doc/debian-policy/ or 19 | # the debian-policy package 20 | 21 | 22 | case "$1" in 23 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 24 | ;; 25 | 26 | *) 27 | echo "postrm called with unknown argument \`$1'" >&2 28 | exit 1 29 | ;; 30 | esac 31 | 32 | # dh_installdeb will replace this with shell code automatically 33 | # generated by other debhelper scripts. 34 | 35 | #DEBHELPER# 36 | 37 | exit 0 38 | 39 | 40 | -------------------------------------------------------------------------------- /xml-marshall/debian/preinst.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # preinst script for python-xml-marshall 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `install' 10 | # * `install' 11 | # * `upgrade' 12 | # * `abort-upgrade' 13 | # for details, see http://www.debian.org/doc/debian-policy/ or 14 | # the debian-policy package 15 | 16 | 17 | case "$1" in 18 | install|upgrade) 19 | ;; 20 | 21 | abort-upgrade) 22 | ;; 23 | 24 | *) 25 | echo "preinst called with unknown argument \`$1'" >&2 26 | exit 1 27 | ;; 28 | esac 29 | 30 | # dh_installdeb will replace this with shell code automatically 31 | # generated by other debhelper scripts. 32 | 33 | #DEBHELPER# 34 | 35 | exit 0 36 | 37 | 38 | -------------------------------------------------------------------------------- /xml-marshall/debian/prerm.ex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # prerm script for python-xml-marshall 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `upgrade' 11 | # * `failed-upgrade' 12 | # * `remove' `in-favour' 13 | # * `deconfigure' `in-favour' 14 | # `removing' 15 | # 16 | # for details, see http://www.debian.org/doc/debian-policy/ or 17 | # the debian-policy package 18 | 19 | 20 | case "$1" in 21 | remove|upgrade|deconfigure) 22 | ;; 23 | 24 | failed-upgrade) 25 | ;; 26 | 27 | *) 28 | echo "prerm called with unknown argument \`$1'" >&2 29 | exit 1 30 | ;; 31 | esac 32 | 33 | # dh_installdeb will replace this with shell code automatically 34 | # generated by other debhelper scripts. 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | 40 | 41 | -------------------------------------------------------------------------------- /xml-marshall/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | 13 | 14 | 15 | configure: configure-stamp 16 | configure-stamp: 17 | dh_testdir 18 | # Add here commands to configure the package. 19 | 20 | touch configure-stamp 21 | 22 | 23 | build: build-stamp 24 | 25 | build-stamp: configure-stamp 26 | dh_testdir 27 | 28 | # Add here commands to compile the package. 29 | python setup.py build 30 | #docbook-to-man debian/python-xml-marshall.sgml > python-xml-marshall.1 31 | 32 | touch $@ 33 | 34 | clean: 35 | dh_testdir 36 | dh_testroot 37 | rm -f build-stamp configure-stamp 38 | 39 | # Add here commands to clean up after the build process. 40 | rm -rf $(CURDIR)/build $(CURDIR)/debian/python-xml-marshall 41 | 42 | dh_clean 43 | 44 | install: build 45 | dh_testdir 46 | dh_testroot 47 | dh_clean -k 48 | dh_installdirs 49 | 50 | # Add here commands to install the package into debian/python-xml-marshall. 51 | python setup.py install --root=$(CURDIR)/debian/python-xml-marshall --prefix=/opt 52 | 53 | 54 | # Build architecture-independent files here. 55 | binary-indep: build install 56 | # We have nothing to do by default. 57 | 58 | # Build architecture-dependent files here. 59 | binary-arch: build install 60 | dh_testdir 61 | dh_testroot 62 | dh_installchangelogs 63 | dh_installdocs 64 | dh_installexamples 65 | # dh_install 66 | # dh_installmenu 67 | # dh_installdebconf 68 | # dh_installlogrotate 69 | # dh_installemacsen 70 | # dh_installpam 71 | # dh_installmime 72 | dh_pysupport 73 | # dh_installinit 74 | # dh_installcron 75 | # dh_installinfo 76 | dh_installman 77 | dh_link 78 | dh_strip 79 | dh_compress 80 | dh_fixperms 81 | # dh_perl 82 | # dh_makeshlibs 83 | dh_installdeb 84 | dh_shlibdeps 85 | dh_gencontrol 86 | dh_md5sums 87 | dh_builddeb 88 | 89 | binary: binary-indep binary-arch 90 | .PHONY: build clean binary-indep binary-arch binary install configure 91 | -------------------------------------------------------------------------------- /xml-marshall/debian/watch.ex: -------------------------------------------------------------------------------- 1 | # Example watch control file for uscan 2 | # Rename this file to "watch" and then you can run the "uscan" command 3 | # to check for upstream updates and more. 4 | # See uscan(1) for format 5 | 6 | # Compulsory line, this is a version 3 file 7 | version=3 8 | 9 | # Uncomment to examine a Webpage 10 | # 11 | #http://www.example.com/downloads.php python-xml-marshall-(.*)\.tar\.gz 12 | 13 | # Uncomment to examine a Webserver directory 14 | #http://www.example.com/pub/python-xml-marshall-(.*)\.tar\.gz 15 | 16 | # Uncommment to examine a FTP server 17 | #ftp://ftp.example.com/pub/python-xml-marshall-(.*)\.tar\.gz debian uupdate 18 | 19 | # Uncomment to find new files on sourceforge, for debscripts >= 2.9 20 | # http://sf.net/python-xml-marshall/python-xml-marshall-(.*)\.tar\.gz 21 | 22 | 23 | -------------------------------------------------------------------------------- /xml-marshall/debian/xml-marshall-default.ex: -------------------------------------------------------------------------------- 1 | # Defaults for python-xml-marshall initscript 2 | # sourced by /etc/init.d/python-xml-marshall 3 | # installed at /etc/default/python-xml-marshall by the maintainer scripts 4 | 5 | # 6 | # This is a POSIX shell fragment 7 | # 8 | 9 | # Additional options that are passed to the Daemon. 10 | DAEMON_OPTS="" 11 | -------------------------------------------------------------------------------- /xml-marshall/debian/xml-marshall.doc-base.EX: -------------------------------------------------------------------------------- 1 | Document: python-xml-marshall 2 | Title: Debian python-xml-marshall Manual 3 | Author: 4 | Abstract: This manual describes what python-xml-marshall is 5 | and how it can be used to 6 | manage online manuals on Debian systems. 7 | Section: unknown 8 | 9 | Format: debiandoc-sgml 10 | Files: /usr/share/doc/python-xml-marshall/python-xml-marshall.sgml.gz 11 | 12 | Format: postscript 13 | Files: /usr/share/doc/python-xml-marshall/python-xml-marshall.ps.gz 14 | 15 | Format: text 16 | Files: /usr/share/doc/python-xml-marshall/python-xml-marshall.text.gz 17 | 18 | Format: HTML 19 | Index: /usr/share/doc/python-xml-marshall/html/index.html 20 | Files: /usr/share/doc/python-xml-marshall/html/*.html 21 | 22 | 23 | -------------------------------------------------------------------------------- /xml-marshall/debian/xml-marshall.postinst.debhelper: -------------------------------------------------------------------------------- 1 | # Automatically added by dh_pysupport 2 | if which update-python-modules >/dev/null 2>&1; then 3 | update-python-modules xml-marshall 4 | fi 5 | # End automatically added section 6 | -------------------------------------------------------------------------------- /xml-marshall/debian/xml-marshall.prerm.debhelper: -------------------------------------------------------------------------------- 1 | # Automatically added by dh_pysupport 2 | if which update-python-modules >/dev/null 2>&1; then 3 | update-python-modules -c xml-marshall 4 | fi 5 | # End automatically added section 6 | -------------------------------------------------------------------------------- /xml-marshall/debian/xml-marshall.substvars: -------------------------------------------------------------------------------- 1 | misc:Depends= 2 | -------------------------------------------------------------------------------- /xml-marshall/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from distutils.core import setup 4 | 5 | setup(name='xml_marshall', 6 | version='1.0', 7 | description='Generic XML marshalling modules for dumping and loading python objects', 8 | author='Kristian Rune Larsen', 9 | author_email='krl@dmi.dk', 10 | packages=['xml_marshall',], 11 | ) 12 | --------------------------------------------------------------------------------