diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-pymvglive.spec | 114 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 116 insertions, 0 deletions
@@ -0,0 +1 @@ +/PyMVGLive-1.1.4.tar.gz diff --git a/python-pymvglive.spec b/python-pymvglive.spec new file mode 100644 index 0000000..40707b2 --- /dev/null +++ b/python-pymvglive.spec @@ -0,0 +1,114 @@ +%global _empty_manifest_terminate_build 0 +Name: python-PyMVGLive +Version: 1.1.4 +Release: 1 +Summary: get live-data from mvg-live.de +License: None +URL: https://pypi.org/project/PyMVGLive/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/01/ad/d5bb0c7d6e80de616548d3d8e46f09d5c98517dfff54179421cf3d4446b2/PyMVGLive-1.1.4.tar.gz +BuildArch: noarch + + +%description +Python-Library to get live-data from mvg-live.de - yet another workaround the official, non-released API.... +## MVGLive.getlivedata() +Retrieve the next departures from mvg-live.de +Configuration variables: +- **station** (*Required*): Name of the stop or station. Visit [the MVG live web site](http://www.mvg-live.de) to find valid names. +- **timeoffset** (*Optional*): Do not display connections departing sooner than this number of minutes (defaults to 0). Useful if you are a couple of minutes away from the stop. +- **entries** (*Optional*): Number of entries to retrieve (defaults to 10). +- **ubahn** (*Optional*): If 'False', do not display U-Bahn (subway) departures +- **tram** (*Optional*): If 'False', do not display tram departures +- **bus** (*Optional*): If 'False', do not display bus departures +- **sbahn** (*Optional*): If 'False', do not display S-Bahn (suburban train) departures +## MVGLive.getdisruptiondata() +Retrieve current disruptions/status messages from mvg-live.de. Returns headline and description of disruption. +Please note, that this call will execute another API-request and might cause problems with rate-limits imposed by the webservice. +For a saver way, please use [RSS-feed](http://www.mvg-mobil.de/Tickerrss/CreateRssClass) that is also provided by the MVG. You can find a sample implementation [here](https://github.com/muccc/anzeigr/blob/master/current_nodes/mvgdefas/ticker/getmvgticker.py) + +%package -n python3-PyMVGLive +Summary: get live-data from mvg-live.de +Provides: python-PyMVGLive +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-PyMVGLive +Python-Library to get live-data from mvg-live.de - yet another workaround the official, non-released API.... +## MVGLive.getlivedata() +Retrieve the next departures from mvg-live.de +Configuration variables: +- **station** (*Required*): Name of the stop or station. Visit [the MVG live web site](http://www.mvg-live.de) to find valid names. +- **timeoffset** (*Optional*): Do not display connections departing sooner than this number of minutes (defaults to 0). Useful if you are a couple of minutes away from the stop. +- **entries** (*Optional*): Number of entries to retrieve (defaults to 10). +- **ubahn** (*Optional*): If 'False', do not display U-Bahn (subway) departures +- **tram** (*Optional*): If 'False', do not display tram departures +- **bus** (*Optional*): If 'False', do not display bus departures +- **sbahn** (*Optional*): If 'False', do not display S-Bahn (suburban train) departures +## MVGLive.getdisruptiondata() +Retrieve current disruptions/status messages from mvg-live.de. Returns headline and description of disruption. +Please note, that this call will execute another API-request and might cause problems with rate-limits imposed by the webservice. +For a saver way, please use [RSS-feed](http://www.mvg-mobil.de/Tickerrss/CreateRssClass) that is also provided by the MVG. You can find a sample implementation [here](https://github.com/muccc/anzeigr/blob/master/current_nodes/mvgdefas/ticker/getmvgticker.py) + +%package help +Summary: Development documents and examples for PyMVGLive +Provides: python3-PyMVGLive-doc +%description help +Python-Library to get live-data from mvg-live.de - yet another workaround the official, non-released API.... +## MVGLive.getlivedata() +Retrieve the next departures from mvg-live.de +Configuration variables: +- **station** (*Required*): Name of the stop or station. Visit [the MVG live web site](http://www.mvg-live.de) to find valid names. +- **timeoffset** (*Optional*): Do not display connections departing sooner than this number of minutes (defaults to 0). Useful if you are a couple of minutes away from the stop. +- **entries** (*Optional*): Number of entries to retrieve (defaults to 10). +- **ubahn** (*Optional*): If 'False', do not display U-Bahn (subway) departures +- **tram** (*Optional*): If 'False', do not display tram departures +- **bus** (*Optional*): If 'False', do not display bus departures +- **sbahn** (*Optional*): If 'False', do not display S-Bahn (suburban train) departures +## MVGLive.getdisruptiondata() +Retrieve current disruptions/status messages from mvg-live.de. Returns headline and description of disruption. +Please note, that this call will execute another API-request and might cause problems with rate-limits imposed by the webservice. +For a saver way, please use [RSS-feed](http://www.mvg-mobil.de/Tickerrss/CreateRssClass) that is also provided by the MVG. You can find a sample implementation [here](https://github.com/muccc/anzeigr/blob/master/current_nodes/mvgdefas/ticker/getmvgticker.py) + +%prep +%autosetup -n PyMVGLive-1.1.4 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-PyMVGLive -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.4-1 +- Package Spec generated @@ -0,0 +1 @@ +77491acd3bb980867a267ed513642d8a PyMVGLive-1.1.4.tar.gz |