Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-radexreader for openSUSE:Factory checked in at 2023-06-07 23:08:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-radexreader (Old) and /work/SRC/openSUSE:Factory/.python-radexreader.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-radexreader" Wed Jun 7 23:08:26 2023 rev:4 rq:1091335 version:1.2.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-radexreader/python-radexreader.changes 2021-09-10 23:40:43.370521819 +0200 +++ /work/SRC/openSUSE:Factory/.python-radexreader.new.15902/python-radexreader.changes 2023-06-07 23:09:00.151894015 +0200 @@ -1,0 +2,7 @@ +Thu Jun 6 20:00:00 UTC 2023 - Fabrice Creuzot <[email protected]> + +- New upstream version (1.2.2) + * fix detection of RADEX ONE v1 (ABBA/A011) + * fix measure value (hexa:8 useless) + +------------------------------------------------------------------- Old: ---- python-radexreader-1.2.1.tar.gz New: ---- python-radexreader-1.2.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-radexreader.spec ++++++ --- /var/tmp/diff_new_pack.qiS19H/_old 2023-06-07 23:09:00.647896896 +0200 +++ /var/tmp/diff_new_pack.qiS19H/_new 2023-06-07 23:09:00.651896918 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-radexreader # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2021-2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-radexreader -Version: 1.2.1 +Version: 1.2.2 Release: 0 Summary: Reader for the RADEX RD1212 and ONE Geiger counters License: GPL-2.0-or-later @@ -59,11 +59,16 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} mkdir -p %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{_udevrulesdir}/ +#mkdir -p %{buildroot}%{_mandir}/man1/ %{buildroot}%{_mandir}/fr/man1/ %python_expand install -p -m 644 ../debian/udev %{buildroot}%{_udevrulesdir}/60-python%{$python_bin_suffix}-radexreader.rules +#install -p -m 644 ../debian/radexreader.1 %{buildroot}%{_mandir}/man1/radexreader.1 +#install -p -m 644 ../debian/radexreader.fr.1 %{buildroot}%{_mandir}/fr/man1/radexreader.1 install -p -m 755 ../src/radexreader.py %{buildroot}%{_bindir}/radexreader %python_clone -a %{buildroot}%{_bindir}/radexreader %files %{python_files} +#%{_mandir}/man1/radexreader.1* +#%{_mandir}/*/man1/radexreader.1* %license LICENSE %doc README.md %python_alternative %{_bindir}/radexreader ++++++ python-radexreader-1.2.1.tar.gz -> python-radexreader-1.2.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/FUNDING.yml new/python-radexreader-1.2.2/FUNDING.yml --- old/python-radexreader-1.2.1/FUNDING.yml 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/FUNDING.yml 2023-06-06 22:00:00.000000000 +0200 @@ -1 +1 @@ -custom: ["https://www.paypal.me/luigifab", "https://gandi.link/f/4b904048", "https://ekwateur.fr/?parrain=EKW001147103"] \ No newline at end of file +custom: ["https://fr.tipeee.com/luigifab", "https://gandi.link/f/4b904048", "https://ekwateur.fr/?parrain=EKW001147103", "https://www.ebuyclub.com/?parrain=ebc4"] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/README.md new/python-radexreader-1.2.2/README.md --- old/python-radexreader-1.2.1/README.md 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/README.md 2023-06-06 22:00:00.000000000 +0200 @@ -1,52 +1,62 @@ # RadexReader -The RadexReader is an user-space driver for the [RADEX RD1212](https://quartarad.com/product-category/radiation-detector/) and the [RADEX ONE](https://quartarad.com/product-category/radiation-detector/) Geiger counters. It allow to read and clear stored data via USB. Warning! This tool is completely unrelated with QuartaRad. +The RadexReader is an user-space driver for the [RADEX RD1212 v1/v2](https://quartarad.com/product-category/radiation-detector/) and the [RADEX ONE](https://quartarad.com/product-category/radiation-detector/) Geiger counters. It allow to read and clear stored data via USB. Warning! This tool is completely unrelated with QuartaRad. + +This tool was initially developed with RD1212 v2.48.   -## Screenshots +## Screenshots and Usage [](images/read.png?raw=true) [](images/compare.png?raw=true) * Read `src/radexreader.py` for examples. * Run the command `radexreader` available with DEB/RPM packages. -* Run the command `radexreader.py` available with PYPI package. +* Run the command `.../radexreader.py` available with PYPI package. ## Installation It require *libusb*, *pyusb* and *pyserial*. -* Debian and Ubuntu: `sudo apt install python3-radexreader radexreader` (coming soon or via [PPA](https://launchpad.net/~luigifab/+archive/ubuntu/packages)) +#### Installation for Debian and Ubuntu + +* `sudo apt install python3-radexreader radexreader` + +#### Installation for Fedora + +* `sudo dnf install python3-radexreader` -* Fedora: `sudo dnf install python3-radexreader` +#### Installation for openSUSE -* openSUSE: `sudo zypper install python3-radexreader` +* `sudo zypper install python3-radexreader` -* Linux: `sudo python3 -m pip install radexreader` (+libusb) +#### Installation with PIP -* Mac: `sudo pip install radexreader` (+libusb) +* With Linux: `sudo python3 -m pip install radexreader` (+libusb) +* With Mac: `sudo pip install radexreader` (+libusb) +* With Windows: `python -m pip install radexreader` (+[libusb](https://libusb.info/), put libusb-1.0.dll in system32) -* Windows: `python -m pip install radexreader` (+[libusb](https://libusb.info/), put libusb-1.0.dll in system32) +#### Installation with Docker -* Docker Alpine: `sudo docker run --rm --user root -it --privileged -v /dev:/dev python:3.x-alpine /bin/sh` then: `apk update ; apk add libusb ; python3 -m pip install radexreader` +* `sudo docker run --rm --user root -it --privileged -v /dev:/dev python:3.x-alpine /bin/sh` then: `apk update ; apk add libusb ; python3 -m pip install radexreader` -## PPA +#### Alternative installation for Debian and Ubuntu -Installation for Debian and Ubuntu with [PPA](https://launchpad.net/~luigifab/+archive/ubuntu/packages): ```bash +# https://launchpad.net/~luigifab/+archive/ubuntu/packages sudo add-apt-repository ppa:luigifab/packages sudo apt update sudo apt install python3-radexreader radexreader # or sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FFE5BD439356DF7D -echo "deb http://ppa.launchpad.net/luigifab/packages/ubuntu hirsute main" | sudo tee -a /etc/apt/sources.list +echo "deb http://ppa.launchpad.net/luigifab/packages/ubuntu focal main" | sudo tee -a /etc/apt/sources.list sudo apt update sudo apt install python3-radexreader radexreader # or sudo wget -O /etc/apt/trusted.gpg.d/luigifab.gpg https://www.luigifab.fr/apt.gpg -echo "deb http://ppa.launchpad.net/luigifab/packages/ubuntu hirsute main" | sudo tee -a /etc/apt/sources.list +echo "deb http://ppa.launchpad.net/luigifab/packages/ubuntu focal main" | sudo tee -a /etc/apt/sources.list sudo apt update sudo apt install python3-radexreader radexreader ``` @@ -61,13 +71,11 @@ ## Copyright -- Current version: 1.2.1 (09/09/2021) -- Compatibility: Python 3.3 / 3.4 / 3.5 / 3.6 / 3.7 / 3.8 / 3.9 / 3.10 +- Current version: 1.2.2 (06/06/2023) +- Compatibility: Python 3.3 / 3.4 / 3.5 / 3.6 / 3.7 / 3.8 / 3.9 / 3.10 / 3.11 - Links: [luigifab.fr](https://www.luigifab.fr/python/radexreader) - [github.com](https://github.com/luigifab/python-radexreader) - [pypi.org](https://pypi.org/project/radexreader/)\ -[Debian python-radexreader.deb](https://tracker.debian.org/pkg/python3-radexreader) - *([ITP](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973447), - [RFS](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=974217))*\ -[Fedora python-radexreader.rpm](https://src.fedoraproject.org/rpms/python3-radexreader)\ +[Debian python-radexreader.deb](https://packages.debian.org/python3-radexreader)\ +[Fedora python-radexreader.rpm](https://src.fedoraproject.org/rpms/python-radexreader)\ [openSUSE python-radexreader.rpm](https://software.opensuse.org/package/python-radexreader)\ [Ubuntu PPA](https://launchpad.net/~luigifab/+archive/ubuntu/packages) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/debian/changelog new/python-radexreader-1.2.2/debian/changelog --- old/python-radexreader-1.2.1/debian/changelog 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/debian/changelog 2023-06-06 22:00:00.000000000 +0200 @@ -1,5 +1,5 @@ -python-radexreader (1.2.1-1) unstable; urgency=low +python-radexreader (1.2.2-1) experimental; urgency=low - * Initial debian package release (Closes: #973447) + * Initial Debian package release (Closes: #973447) - -- Fabrice Creuzot <[email protected]> Thu, 09 Sep 2021 20:00:00 +0000 + -- Fabrice Creuzot <[email protected]> Tue, 06 Jun 2023 20:00:00 +0000 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/debian/control new/python-radexreader-1.2.2/debian/control --- old/python-radexreader-1.2.1/debian/control 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/debian/control 2023-06-06 22:00:00.000000000 +0200 @@ -4,7 +4,7 @@ Maintainer: Fabrice Creuzot <[email protected]> Build-Depends: debhelper-compat (= 13), python3-all, dh-python, dh-exec Rules-Requires-Root: no -Standards-Version: 4.5.1 +Standards-Version: 4.6.1.0 Homepage: https://github.com/luigifab/python-radexreader Vcs-Browser: https://github.com/luigifab/python-radexreader Vcs-Git: https://github.com/luigifab/python-radexreader.git @@ -22,6 +22,7 @@ Package: radexreader Architecture: all +Section: science Depends: ${misc:Depends}, ${python3:Depends}, python3-radexreader Description: reader for the RADEX RD1212 and ONE Geiger counters (CLI) The RadexReader is an user-space driver for the RADEX RD1212 and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/debian/copyright new/python-radexreader-1.2.2/debian/copyright --- old/python-radexreader-1.2.1/debian/copyright 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/debian/copyright 2023-06-06 22:00:00.000000000 +0200 @@ -3,7 +3,7 @@ Upstream-Contact: Fabrice Creuzot <[email protected]> Files: * -Copyright: 2020-2021 Fabrice Creuzot (luigifab) <[email protected]> +Copyright: 2020-2023 Fabrice Creuzot (luigifab) <[email protected]> License: GPL-2+ License: GPL-2+ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/debian/deb.sh new/python-radexreader-1.2.2/debian/deb.sh --- old/python-radexreader-1.2.1/debian/deb.sh 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/debian/deb.sh 2023-06-06 22:00:00.000000000 +0200 @@ -1,9 +1,9 @@ #!/bin/bash -# debian: sudo apt install dpkg-dev devscripts dh-make dh-python dh-exec +# Debian: sudo apt install dpkg-dev devscripts dh-make dh-python dh-exec cd "$(dirname "$0")" -version="1.2.1" +version="1.2.2" rm -rf builder/ @@ -30,33 +30,34 @@ fi -# create packages for debian and ubuntu -for serie in unstable impish hirsute focal bionic xenial trusty; do +# create packages for Debian and Ubuntu +for serie in experimental mantic lunar kinetic jammy focal bionic xenial trusty; do - if [ $serie = "unstable" ]; then - # for ubuntu + if [ $serie = "experimental" ]; then + # for Ubuntu cp -a builder/python-radexreader-$version/ builder/python-radexreader-$version+src/ - # debian only + # Debian only cd builder/python-radexreader-$version/ else - # ubuntu only + # Ubuntu only cp -a builder/python-radexreader-$version+src/ builder/python-radexreader-$version+$serie/ cd builder/python-radexreader-$version+$serie/ fi dh_make -a -s -y -f ../python-radexreader-$version.tar.gz -p python-radexreader - rm -f debian/*ex debian/*EX debian/README* debian/*doc* debian/deb.sh + rm -f debian/*ex debian/*EX debian/README* debian/*doc* mkdir debian/upstream + rm debian/deb.sh mv debian/metadata debian/upstream/metadata mv debian/udev debian/python3-radexreader.udev mv debian/metainfo.xml debian/python3-radexreader.metainfo.xml chmod +x debian/radexreader.install - if [ $serie = "unstable" ]; then + if [ $serie = "experimental" ]; then dpkg-buildpackage -us -uc else - # debhelper: unstable:13 hirsute:13 focal:12 bionic:9 xenial:9 trusty:9 + # debhelper: experimental:13 focal:12 bionic:9 xenial:9 trusty:9 if [ $serie = "focal" ]; then sed -i 's/debhelper-compat (= 13)/debhelper-compat (= 12)/g' debian/control fi @@ -73,27 +74,27 @@ sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' debian/control echo 9 > debian/compat fi - sed -i 's/unstable/'$serie'/g' debian/changelog + sed -i 's/experimental/'$serie'/g' debian/changelog sed -i 's/-1) /-1+'$serie') /' debian/changelog dpkg-buildpackage -us -uc -ui -d -S fi - echo "===========================" + echo "=========================== debsign ==" cd .. - if [ $serie = "unstable" ]; then - # debian only + if [ $serie = "experimental" ]; then + # Debian only debsign python-radexreader_$version-*.changes - echo "===========================" - lintian -EviIL +pedantic python-radexreader_$version-*.deb + echo "=========================== lintian ==" + lintian -EviIL +pedantic python*-radexreader_$version-*.deb else - # ubuntu only + # Ubuntu only debsign python-radexreader_$version*+$serie*source.changes fi echo "===========================" cd .. done -ls -dltrh builder/*.deb builder/*.changes +ls -dlth "$PWD/"builder/*.deb "$PWD/"builder/*.changes echo "===========================" # cleanup diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/debian/radexreader.1 new/python-radexreader-1.2.2/debian/radexreader.1 --- old/python-radexreader-1.2.1/debian/radexreader.1 1970-01-01 01:00:00.000000000 +0100 +++ new/python-radexreader-1.2.2/debian/radexreader.1 2023-06-06 22:00:00.000000000 +0200 @@ -0,0 +1,52 @@ +.Dd 01/01/22 +.Dt RADEXREADER 1 +.Os Linux +.Sh NAME +.Nm radexreader +.Nd Reader for the RADEX RD1212 and ONE Geiger counters. +.Sh SYNOPSIS +.Nm +.Op Ar tail +.Op Ar jsontail +.Op Ar last +.Op Ar jsonlast +.Op Ar all +.Op Ar jsonall +.Op Ar erase +.Sh DESCRIPTION +The RadexReader is an user-space driver for the RADEX RD1212 and +the RADEX ONE Geiger counters. It allow to read and clear stored +data via USB. +.Bl -tag -width "jsontail" +.It Ar tail +Read and display of the measurement. Infinite loop, one line per measurement. +.It Ar jsontail +Read and display in json format of the measurement. Infinite loop, one line per measure. +.It Ar last +Read and display of the measurement. +.It Ar jsonlast +Read and display in json format of the measurement. +.It Ar all +Read and display all measurements stored (RD1212 only). +.It Ar jsonall +Read and display is json format all measurements stored (RD1212 only). +.It Ar erase +Remove stored measurements (RD1212 only). +.El +.Pp +The values shown are only approximations. The actual value can only be measured with suitable professional device. +.Sh OUTPUT EXAMPLES +.Bl -tag -width +.It Ar tail last all +.nf +.Rs +2022-01-01 19:13:17 0.14 µSv/h ±57% (0.06 ⤠0.14 ⤠0.22) +.Re +.fi +.It Ar jsontail jsonlast jsonall +.nf +.Rs +{"1641064637":{"pct":57.8571,"min":0.0590,"val":0.14,"max":0.221,"time":1641067277}[, ...]} +.Re +.fi +.El \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/debian/radexreader.fr.1 new/python-radexreader-1.2.2/debian/radexreader.fr.1 --- old/python-radexreader-1.2.1/debian/radexreader.fr.1 1970-01-01 01:00:00.000000000 +0100 +++ new/python-radexreader-1.2.2/debian/radexreader.fr.1 2023-06-06 22:00:00.000000000 +0200 @@ -0,0 +1,52 @@ +.Dd 01/01/22 +.Dt RADEXREADER 1 +.Os Linux +.Sh NAME +.Nm radexreader +.Nd Lecteur pour les compteurs Geiger RADEX RD1212 et ONE. +.Sh SYNOPSIS +.Nm +.Op Ar tail +.Op Ar jsontail +.Op Ar last +.Op Ar jsonlast +.Op Ar all +.Op Ar jsonall +.Op Ar erase +.Sh DESCRIPTION +Le RadexReader est un pilote en espace utilisateur pour les compteurs +Geiger RADEX RD1212 et RADEX ONE. Il permet de lire et d'effacer les +données stockées via USB. +.Bl -tag -width "jsontail" +.It Ar tail +Lecture et affichage de la mesure. Boucle infinie, une ligne par mesure. +.It Ar jsontail +Lecture et affichage au format json de la mesure. Boucle infinie, une ligne par mesure. +.It Ar last +Lecture et affichage de la mesure. +.It Ar jsonlast +Lecture et affichage au format json de la mesure. +.It Ar all +Lecture et affichage de toutes les mesures enregistrées (RD1212 uniquement). +.It Ar jsonall +Lecture et affichage au format json de toutes les mesures enregistrées (RD1212 uniquement). +.It Ar erase +Supprime les mesures enregistrées (RD1212 uniquement). +.El +.Pp +Les valeurs indiquées ne sont que des approximations. La valeur réelle ne peut être mesurée qu'avec un appareil professionnel approprié. +.Sh OUTPUT EXAMPLES +.Bl -tag -width +.It Ar tail last all +.nf +.Rs +2022-01-01 19:13:17 0.14 µSv/h ±57% (0.06 ⤠0.14 ⤠0.22) +.Re +.fi +.It Ar jsontail jsonlast jsonall +.nf +.Rs +{"1641064637":{"pct":57.8571,"min":0.0590,"val":0.14,"max":0.221,"time":1641067277}[, ...]} +.Re +.fi +.El \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/debian/radexreader.manpages new/python-radexreader-1.2.2/debian/radexreader.manpages --- old/python-radexreader-1.2.1/debian/radexreader.manpages 1970-01-01 01:00:00.000000000 +0100 +++ new/python-radexreader-1.2.2/debian/radexreader.manpages 2023-06-06 22:00:00.000000000 +0200 @@ -0,0 +1,2 @@ +debian/radexreader.1 +debian/radexreader.fr.1 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/debian/watch new/python-radexreader-1.2.2/debian/watch --- old/python-radexreader-1.2.1/debian/watch 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/debian/watch 2023-06-06 22:00:00.000000000 +0200 @@ -1,2 +1,5 @@ version=4 -https://github.com/luigifab/python-radexreader/releases .*radexreader-([0-9.]+)\.tar\.gz \ No newline at end of file +opts="searchmode=plain,\ +filenamemangle=s%v?@ANY_VERSION@%@PACKAGE@-$1.tar.xz%" \ +https://api.github.com/repos/luigifab/python-radexreader/releases?per_page=50 \ +https://api.github.com/repos/[^/]+/[^/]+/tarball/v?@ANY_VERSION@ \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/fedora/python-radexreader.spec new/python-radexreader-1.2.2/fedora/python-radexreader.spec --- old/python-radexreader-1.2.1/fedora/python-radexreader.spec 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/fedora/python-radexreader.spec 2023-06-06 22:00:00.000000000 +0200 @@ -18,7 +18,7 @@ de débrancher l'appareil après l'installation.} Name: python-radexreader -Version: 1.2.1 +Version: 1.2.2 Release: 1%{?dist} Summary: %{common_summary_en} Summary(fr): %{common_summary_fr} @@ -62,10 +62,15 @@ %py3_install mkdir -p %{buildroot}%{_bindir}/ mkdir -p %{buildroot}/lib/udev/rules.d/ +mkdir -p %{buildroot}%{_mandir}/man1/ %{buildroot}%{_mandir}/fr/man1/ install -p -m 644 ../debian/udev %{buildroot}/lib/udev/rules.d/60-python3-radexreader.rules +install -p -m 644 ../debian/radexreader.1 %{buildroot}%{_mandir}/man1/radexreader.1 +install -p -m 644 ../debian/radexreader.fr.1 %{buildroot}%{_mandir}/fr/man1/radexreader.1 install -p -m 755 ../src/radexreader.py %{buildroot}%{_bindir}/radexreader %files -n python3-radexreader +%{_mandir}/man1/radexreader.1* +%{_mandir}/*/man1/radexreader.1* %license LICENSE %doc README.md %ghost %{python3_sitelib}/radexreader*egg-info/ @@ -75,8 +80,11 @@ %changelog +* Tue Jun 06 2023 Fabrice Creuzot <[email protected]> - 1.2.2-1 +- New upstream release + * Thu Sep 09 2021 Fabrice Creuzot <[email protected]> - 1.2.1-1 -- New upstream version +- New upstream release * Wed May 05 2021 Fabrice Creuzot <[email protected]> - 1.2.0-1 - Initial Fedora package release (Closes: rhbz#1896742) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/fedora/rpm.sh new/python-radexreader-1.2.2/fedora/rpm.sh --- old/python-radexreader-1.2.1/fedora/rpm.sh 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/fedora/rpm.sh 2023-06-06 22:00:00.000000000 +0200 @@ -3,10 +3,10 @@ # Fedora: configure: error: C compiler cannot create executables? remove and reinstall glibc-devel gcc cd "$(dirname "$0")" -version="1.2.1" +version="1.2.2" -rm -rf builder/ ~/rpmbuild/ +rm -rf builder/ mkdir -p builder ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} # copy to a tmp directory @@ -41,8 +41,8 @@ echo "===========================" rpmlint python-radexreader.spec builder/*.rpm echo "===========================" -ls -dltrh builder/*.rpm +ls -dlth "$PWD/"builder/*.rpm echo "===========================" # cleanup -rm -rf builder/*/ ~/rpmbuild/ \ No newline at end of file +rm -rf builder/*/ \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/opensuse/python-radexreader.spec new/python-radexreader-1.2.2/opensuse/python-radexreader.spec --- old/python-radexreader-1.2.1/opensuse/python-radexreader.spec 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/opensuse/python-radexreader.spec 2023-06-06 22:00:00.000000000 +0200 @@ -1,6 +1,6 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-radexreader -Version: 1.2.1 +Version: 1.2.2 Release: 0 Summary: Reader for the RADEX RD1212 and ONE Geiger counters License: GPL-2.0-or-later @@ -44,11 +44,16 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} mkdir -p %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{_udevrulesdir}/ +mkdir -p %{buildroot}%{_mandir}/man1/ %{buildroot}%{_mandir}/fr/man1/ %python_expand install -p -m 644 ../debian/udev %{buildroot}%{_udevrulesdir}/60-python%{$python_bin_suffix}-radexreader.rules +install -p -m 644 ../debian/radexreader.1 %{buildroot}%{_mandir}/man1/radexreader.1 +install -p -m 644 ../debian/radexreader.fr.1 %{buildroot}%{_mandir}/fr/man1/radexreader.1 install -p -m 755 ../src/radexreader.py %{buildroot}%{_bindir}/radexreader %python_clone -a %{buildroot}%{_bindir}/radexreader %files %{python_files} +%{_mandir}/man1/radexreader.1* +%{_mandir}/*/man1/radexreader.1* %license LICENSE %doc README.md %python_alternative %{_bindir}/radexreader @@ -64,11 +69,14 @@ %changelog +* Tue Jun 06 2023 Fabrice Creuzot <[email protected]> - 1.2.2-1 +- New upstream release + * Thu Sep 09 2021 Fabrice Creuzot <[email protected]> - 1.2.1-1 -- New upstream version +- New upstream release * Wed May 05 2021 Fabrice Creuzot <[email protected]> - 1.2.0-1 -- New upstream version +- New upstream release * Sun Apr 04 2021 Fabrice Creuzot <[email protected]> - 1.1.0-1 - Initial openSUSE package release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/opensuse/rpm.sh new/python-radexreader-1.2.2/opensuse/rpm.sh --- old/python-radexreader-1.2.1/opensuse/rpm.sh 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/opensuse/rpm.sh 2023-06-06 22:00:00.000000000 +0200 @@ -3,10 +3,10 @@ cd "$(dirname "$0")" -version="1.2.1" +version="1.2.2" -rm -rf builder/ ~/rpmbuild/ +rm -rf builder/ mkdir -p builder ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} # copy to a tmp directory @@ -41,8 +41,8 @@ echo "===========================" rpmlint python-radexreader.spec builder/*.rpm echo "===========================" -ls -dltrh builder/*.rpm +ls -dlth "$PWD/"builder/*.rpm echo "===========================" # cleanup -rm -rf builder/*/ ~/rpmbuild/ \ No newline at end of file +rm -rf builder/*/ \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/pypi/pypi.sh new/python-radexreader-1.2.2/pypi/pypi.sh --- old/python-radexreader-1.2.1/pypi/pypi.sh 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/pypi/pypi.sh 2023-06-06 22:00:00.000000000 +0200 @@ -3,7 +3,7 @@ # Fedora: sudo dnf install python3-devel cd "$(dirname "$0")" -version="1.2.1" +version="1.2.2" rm -rf builder/ @@ -37,7 +37,7 @@ cd ../.. mv builder/radexreader-${version}/dist/* . echo "===========================" -ls -dltrh $PWD/*.gz $PWD/*.whl +ls -dlth $PWD/*.gz $PWD/*.whl echo "===========================" # cleanup diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/src/radexreader/__init__.py new/python-radexreader-1.2.2/src/radexreader/__init__.py --- old/python-radexreader-1.2.1/src/radexreader/__init__.py 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/src/radexreader/__init__.py 2023-06-06 22:00:00.000000000 +0200 @@ -1,11 +1,10 @@ #!/usr/bin/python3 # -*- coding: utf8 -*- # Created L/19/10/2020 -# Updated M/10/08/2021 +# Updated S/04/03/2023 # -# Copyright 2020-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr> +# Copyright 2020-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr> # https://github.com/luigifab/python-radexreader -# https://www.luigifab.fr/python/radexreader # # This program is free software, you can redistribute it or modify # it under the terms of the GNU General Public License (GPL) as published @@ -28,7 +27,7 @@ import serial import serial.tools.list_ports -__version__ = '1.2.1' +__version__ = '1.2.2' class RadexReader(): @@ -45,43 +44,47 @@ # backend only for alpine with docker? backend = usb.backend.libusb1.get_backend(find_library=lambda x: '/usr/lib/libusb-1.0.so.0') - # RADEX RD1212 v2 - # search usb device (03EB/5603) - self.usb = usb.core.find(idVendor=0x03eb, idProduct=0x5603, backend=backend) + # RADEX ONE v1 + # search usb device (ABBA/A011) + self.usb = usb.core.find(idVendor=0xabba, idProduct=0xa011, backend=backend) if self.usb is not None: - self.com = 'RD1212v2' - # usb reset - self.usb.reset() - if sys.platform != 'win32' and sys.platform != 'cygwin' and self.usb.is_kernel_driver_active(0): - self.usb.detach_kernel_driver(0) - self.usb.set_configuration() - return # device found + self.com = 'ONEv1' + # search usb serial device (https://stackoverflow.com/a/25112066/2980105) + devices = serial.tools.list_ports.grep('RADEX') + for device in devices: + self.serial = serial.Serial(port=device.device, baudrate=9600, timeout=0.5) + return # device found + if self.serial is None: + raise ValueError('Error: RADEX ONE (serial) not found') # RADEX RD1212 v1 - # search usb device (10C4/EA60 = Silicon labs USB to UART bridge) + # search usb device (10C4/EA60 = Silicon labs USB to UART bridge or CP2102 USB to UART Bridge Controller) self.usb = usb.core.find(idVendor=0x10c4, idProduct=0xea60, backend=backend) if self.usb is not None: self.com = 'RD1212v1' # search usb serial device (https://stackoverflow.com/a/25112066/2980105) - devices = serial.tools.list_ports.grep('RADEX') + devices = serial.tools.list_ports.grep('RADEX') + for device in devices: + self.serial = serial.Serial(port=device.device, baudrate=115200, timeout=0.5) + return # device found + devices = serial.tools.list_ports.grep('CP2102') for device in devices: - self.serial = serial.Serial(port = device.device, baudrate = 115200, timeout = 0.5) + self.serial = serial.Serial(port=device.device, baudrate=115200, timeout=0.5) return # device found if self.serial is None: raise ValueError('Error: RADEX RD1212 (serial) not found') - # RADEX ONE v1 - # search usb device (ABBA/A011) - self.usb = usb.core.find(idVendor=0xabba, idProduct=0xa011, backend=backend) + # RADEX RD1212 v2 + # search usb device (03EB/5603) + self.usb = usb.core.find(idVendor=0x03eb, idProduct=0x5603, backend=backend) if self.usb is not None: - self.com = 'ONEv1' - # search usb serial device (https://stackoverflow.com/a/25112066/2980105) - devices = serial.tools.list_ports.grep('RADEX') - for device in devices: - self.serial = serial.Serial(port = device.device, baudrate = 9600, timeout = 0.5) - return # device found - if self.serial is None: - raise ValueError('Error: RADEX ONE (serial) not found') + self.com = 'RD1212v2' + # usb reset + self.usb.reset() + if sys.platform != 'win32' and sys.platform != 'cygwin' and self.usb.is_kernel_driver_active(0): + self.usb.detach_kernel_driver(0) + self.usb.set_configuration() + return # device found # no devices found if self.usb is None: @@ -97,12 +100,13 @@ print('Manufacturer ' + hex(self.usb.idVendor).ljust(7, ' ') + ' ' + usb.util.get_string(self.usb, self.usb.iManufacturer)) print('Product ' + hex(self.usb.idProduct).ljust(7, ' ') + ' ' + usb.util.get_string(self.usb, self.usb.iProduct)) print() + # https://www.criirad.org/laboratoire/radiametres/compteur-geiger.html print('[info] Sensor: Geiger-Müller tube SBM 20-1') print('[info] Measuring range: 0.05 - 999 µSv/h') print('[info] Uncertainty of the result: ±(15+6/D)%') print('[info] D is the value after a complete cycle of 100 seconds') print() - print('[warn] The values displayed are only an approximation.') + print('[warn] The values shown are only approximations.') print('[warn] The actual value can only be measured with suitable professional device.') print('[warn] For now, not tested with measured values greater than 0.25 µSv/h.') print() @@ -111,12 +115,13 @@ print('Product ' + hex(self.usb.idProduct).ljust(7, ' ') + ' ' + usb.util.get_string(self.usb, self.usb.iProduct)) print('ComPort ' + self.serial.port) print() + # source? print('[info] Sensor: Geiger-Müller tube SBM 20-1') print('[info] Measuring range: 0.05 - 999 µSv/h') print('[info] Uncertainty of the result: ±(15+6/D)%') print('[info] D is the value after a complete cycle of 100 seconds') print() - print('[warn] The values displayed are only an approximation.') + print('[warn] The values shown are only approximations.') print('[warn] The actual value can only be measured with suitable professional device.') print('[warn] For now, not tested with measured values greater than 0.25 µSv/h.') print() @@ -129,12 +134,13 @@ print('Product -x---- RADEX ONE') print('ComPort ' + self.serial.port) print() + # source? print('[info] Sensor: Geiger-Müller tube SBM 20-1') print('[info] Measuring range: 0.05 - 999 µSv/h') print('[info] Uncertainty of the result: ±(15+6/D)%') print('[info] D is the value after a complete cycle of 100? seconds') print() - print('[warn] The values displayed are only an approximation.') + print('[warn] The values shown are only approximations.') print('[warn] The actual value can only be measured with suitable professional device.') print('[warn] For now, not tested with measured values greater than 0.25 µSv/h.') print() @@ -175,20 +181,26 @@ return self.readOne() values = {} + # from 0x0 to 0xb3 if last: keys = [0x0] + elif last and self.com == 'RD1212v1': + keys = list(reversed(range(0x0, 0xb4))) else: - keys = list(range(0x0, 0xb4)) # from 0x0 to 0xb3 + keys = list(range(0x0, 0xb4)) + + # 1 min, 5 min, 10 min, 30 min, 1 hour, 2 hours, 4 hours, 6 hours, 12 hours, 24 hours + interval = {0: 1, 1: 5, 2: 10, 3: 30, 4: 60, 5: 120, 6: 240, 7: 360, 8: 720, 9: 1440} for key in keys: self.hid_set_report((0x12, 0x12, 0x01, 0x02, key, 0, 0, 0, 0, 0, 0, 0, 0x3c, 0x84)) hexa = self.hid_get_report() - if hexa[0] != 0: + if hexa != b'' and hexa[0] != 0: # timestamp = 01/01/2016 00:00:44 = 1451606444 # timestamp = 01/01/2016 00:00:44 = 172 + 193 (Ã256) + 133 (Ã256Ã256) + 86 (Ã256Ã256Ã256) timestamp = (hexa[2] + hexa[3] * 256 + hexa[4] * 256 * 256 + hexa[5] * 256 * 256 * 256) # measure = 0.15 µSv/h = 15 - measure = (hexa[6] + hexa[7] * 256 + hexa[8] * 256 * 256) / 100 + measure = (hexa[6] + hexa[7] * 256) / 100 # uncertainty of the result percent = 15 + 6 / measure measure_min = measure * (1 - percent / 100) @@ -198,9 +210,20 @@ if percent > 99.9: percent = 99.9 # memorize - values[timestamp] = { 'pct': percent, 'min': measure_min, 'val': measure, 'max': measure_max } + values[timestamp] = { + 'pct': percent, + 'min': measure_min, + 'val': measure, + 'max': measure_max, + 'time': timestamp, + 'interval': interval[hexa[8]] + } + # to get last measure with RD1212v1 + if last and self.com == 'RD1212v1': + break - return dict(sorted(values.items(), key=operator.itemgetter(0))) # sort by date + # sort by date + return dict(sorted(values.items(), key=operator.itemgetter(0))) def readOne(self): @@ -241,7 +264,15 @@ percent = 99.9 timestamp = int(time.time()) - return { timestamp: { 'pct': percent, 'min': measure_min, 'val': measure, 'max': measure_max, 'acc': measure_acc, 'cpm': measure_cpm } } + return { timestamp: { + 'pct': percent, + 'min': measure_min, + 'val': measure, + 'max': measure_max, + 'acc': measure_acc, + 'cpm': measure_cpm, + 'time': timestamp + } } def erase(self): if self.com == 'RD1212v2': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/src/radexreader.py new/python-radexreader-1.2.2/src/radexreader.py --- old/python-radexreader-1.2.1/src/radexreader.py 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/src/radexreader.py 2023-06-06 22:00:00.000000000 +0200 @@ -1,11 +1,10 @@ #!/usr/bin/python3 # -*- coding: utf8 -*- # Created L/19/10/2020 -# Updated J/06/05/2021 +# Updated D/01/01/2023 # -# Copyright 2020-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr> +# Copyright 2020-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr> # https://github.com/luigifab/python-radexreader -# https://www.luigifab.fr/python/radexreader # # This program is free software, you can redistribute it or modify # it under the terms of the GNU General Public License (GPL) as published @@ -25,19 +24,21 @@ import serial # https://stackoverflow.com/a/62804772/2980105 -# prevent auto import for "import radexreader"when filename is "radexreader.py" +# prevent auto import for "import radexreader" when filename is "radexreader.py" sys.path = sys.path[1:] -try: - import radexreader - msg = 'Information python3-radexreader ' + radexreader.__version__ - msg += ' with python ' + python_version() + ' + pyusb ' + usb.__version__ + ' + pyserial ' + serial.__version__ -except: +# python3 .../src/radexreader.py when radexreader is installed or not +if ".py" in sys.argv[0]: import os - sys.path.append(os.path.abspath(__file__).replace('radexreader.py', '')) + sys.path.insert(0, os.path.abspath(sys.argv[0]).replace('radexreader.py', '')) import radexreader msg = 'Information radexreader ' + radexreader.__version__ msg += ' with python ' + python_version() + ' + pyusb ' + usb.__version__ + ' + pyserial ' + serial.__version__ +# standard command radexreader +else: + import radexreader + msg = 'Information python3-radexreader ' + radexreader.__version__ + msg += ' with python ' + python_version() + ' + pyusb ' + usb.__version__ + ' + pyserial ' + serial.__version__ if len(sys.argv) > 1: @@ -76,7 +77,7 @@ time.sleep(10) exit(0) - if sys.argv[1] == 'tailjson': + if sys.argv[1] == 'jsontail' or sys.argv[1] == 'tailjson': import json reader = radexreader.RadexReader() prev = None @@ -84,12 +85,12 @@ measures = reader.read(True) for timestamp, measure in measures.items(): if timestamp != prev: - print(json.dumps(measure)) + print(json.dumps({timestamp: measure})) prev = timestamp time.sleep(10) exit(0) - if sys.argv[1] == 'readlast': + if sys.argv[1] == 'last' or sys.argv[1] == 'readlast': print(msg) reader = radexreader.RadexReader() reader.print_info() @@ -118,7 +119,7 @@ print(json.dumps(radexreader.RadexReader().read(True))) exit(0) - if sys.argv[1] == 'readall': + if sys.argv[1] == 'all' or sys.argv[1] == 'readall': print(msg) reader = radexreader.RadexReader() reader.print_info() @@ -147,5 +148,5 @@ print(json.dumps(radexreader.RadexReader().read(False))) exit(0) -print('Usage: radexreader erase|tail|tailjson|readlast|jsonlast|readall|jsonall') +print('Usage: radexreader erase|tail|jsontail|last|jsonlast|all|jsonall') exit(-1) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-radexreader-1.2.1/src/setup.py new/python-radexreader-1.2.2/src/setup.py --- old/python-radexreader-1.2.1/src/setup.py 2021-09-09 22:00:00.000000000 +0200 +++ new/python-radexreader-1.2.2/src/setup.py 2023-06-06 22:00:00.000000000 +0200 @@ -1,11 +1,10 @@ #!/usr/bin/python3 # -*- coding: utf8 -*- # Created L/19/10/2020 -# Updated M/10/08/2021 +# Updated V/24/12/2021 # -# Copyright 2020-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr> +# Copyright 2020-2023 | Fabrice Creuzot (luigifab) <code~luigifab~fr> # https://github.com/luigifab/python-radexreader -# https://www.luigifab.fr/python/radexreader # # This program is free software, you can redistribute it or modify # it under the terms of the GNU General Public License (GPL) as published @@ -27,7 +26,7 @@ long_description = fh.read().replace('(images/', '(https://raw.githubusercontent.com/luigifab/python-radexreader/master/images/') setup( name='radexreader', - version='1.2.1', + version='1.2.2', description='Python library for the RADEX RD1212 and the RADEX ONE Geiger counters.', long_description=long_description, long_description_content_type='text/markdown', @@ -41,7 +40,7 @@ except: setup( name='radexreader', - version='1.2.1', + version='1.2.2', description='Python library for the RADEX RD1212 and the RADEX ONE Geiger counters.', license='GPL 2', author='Fabrice Creuzot',
