summaryrefslogtreecommitdiff
path: root/python-osr2mp4.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 04:10:47 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 04:10:47 +0000
commita212b467dfccd88752edd31b018ad38886ac5b37 (patch)
tree3dbdc0f424271d3af7d9aae6667d90320fa5326e /python-osr2mp4.spec
parent8971bd56f5311fece4061336f7039b321c768696 (diff)
automatic import of python-osr2mp4openeuler20.03
Diffstat (limited to 'python-osr2mp4.spec')
-rw-r--r--python-osr2mp4.spec435
1 files changed, 435 insertions, 0 deletions
diff --git a/python-osr2mp4.spec b/python-osr2mp4.spec
new file mode 100644
index 0000000..8e5ec94
--- /dev/null
+++ b/python-osr2mp4.spec
@@ -0,0 +1,435 @@
+%global _empty_manifest_terminate_build 0
+Name: python-osr2mp4
+Version: 0.0.6a1
+Release: 1
+Summary: Convert osr replay file to video file
+License: MIT License
+URL: https://github.com/uyitroa/osr2mp4-core
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f3/f1/c3e63ba6211ea310950a6466d57ca7062b8b7eccca3b93ed1236a27d3a62/osr2mp4-0.0.6a1.tar.gz
+BuildArch: noarch
+
+
+%description
+# Getting started
+```python
+from osr2mp4.osr2mp4 import Osr2mp4
+
+data = {
+ "osu! path": "/Users/yuitora./osu!/",
+ "Skin path": "/Users/yuitora./osu!/Skins/-#Whitecat#-",
+ "Beatmap path": "/Users/yuitora./osu!/Songs/123456 Hachigatsu, Bou/",
+ ".osr path": "/Users/yuitora./osu!/Replays/yuitora_12317423.osr",
+ "Default skin path": "/Users/yuitora./Downloads/Default Skin/",
+ "Output path": "output.avi",
+ "Width": 1920,
+ "Height": 1080,
+ "FPS": 60,
+ "Start time": 0,
+ "End time": -1,
+ "Video codec": "XVID",
+ "Process": 2,
+ "ffmpeg path": "Users/yuitora./ffmpeg/bin/ffmpeg.exe"
+ }
+
+settings = {
+ "Cursor size": 1,
+ "In-game interface": True,
+ "Show scoreboard": True,
+ "Background dim": 90,
+ "Always show key overlay": True,
+ "Automatic cursor size": False,
+ "Rotate sliderball": False,
+ "Score meter size": 1.25,
+ "Song volume": 50,
+ "Effect volume": 100,
+ "Ignore beatmap hitsounds": True,
+ "Use skin's sound samples": True,
+ "Global leaderboard": False,
+ "Mods leaderboard": "(HD)HR",
+ "api key": "lol"
+ }
+
+converter = Osr2mp4(data, settings)
+converter.startall()
+converter.joinall()
+```
+
+ Or you can save `data` and `settings` in a json file.
+ config.json:
+```json
+ {
+ "osu! path": "/Users/yuitora./osu!/",
+ "Skin path": "/Users/yuitora./osu!/Skins/-#Whitecat#-",
+ "Beatmap path": "/Users/yuitora./osu!/Songs/123456 Hachigatsu, Bou/",
+ ".osr path": "/Users/yuitora./osu!/Replays/yuitora_12317423.osr",
+ "Default skin path": "/Users/yuitora./Downloads/Default Skin/",
+ "Output path": "output.avi",
+ "Width": 1920,
+ "Height": 1080,
+ "FPS": 60,
+ "Start time": 0,
+ "End time": -1,
+ "Video codec": "XVID",
+ "Process": 2,
+ "ffmpeg path": "Users/yuitora./ffmpeg/bin/ffmpeg.exe"
+ }
+```
+
+ settings.json:
+```json
+ {
+ "Cursor size": 1,
+ "In-game interface": true,
+ "Show scoreboard": true,
+ "Background dim": 90,
+ "Always show key overlay": true,
+ "Automatic cursor size": true,
+ "Rotate sliderball": false,
+ "Score meter size": 1.25,
+ "Song volume": 50,
+ "Effect volume": 100,
+ "Ignore beatmap hitsounds": true,
+ "Use skin's sound samples": true,
+ "Global leaderboard": false,
+ "Mods leaderboard": "(HD)HR",
+ "api key": "lol"
+ }
+```
+
+ And to load it in code
+```python
+from osr2mp4.osr2mp4 import Osr2mp4
+converter = Osr2mp4(filedata="config.json", filesettings="settings.json")
+converter.startall()
+converter.joinall()
+```
+
+ # Documentation
+ `Osr2mp4.startvideo()`
+
+ Start video without audio.
+
+ `Osr2mp4.joinvideo()`
+
+ Wait for video to finish.
+
+ `Osr2mp4.startaudio()`
+
+ Start audio.
+
+ `Osr2mp4.joinaudio()`
+
+ Wait for audio to finish.
+
+ `Osr2mp4.startall()`
+
+ Start video and audio.
+
+ `Osr2mp4.joinall()`
+
+ Wait for all to finish.
+
+ `Osr2mp4.getprogress()`
+
+ Return a value from 0 to 100 corresponding to the estimated progress of the conversion.
+
+%package -n python3-osr2mp4
+Summary: Convert osr replay file to video file
+Provides: python-osr2mp4
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-osr2mp4
+# Getting started
+```python
+from osr2mp4.osr2mp4 import Osr2mp4
+
+data = {
+ "osu! path": "/Users/yuitora./osu!/",
+ "Skin path": "/Users/yuitora./osu!/Skins/-#Whitecat#-",
+ "Beatmap path": "/Users/yuitora./osu!/Songs/123456 Hachigatsu, Bou/",
+ ".osr path": "/Users/yuitora./osu!/Replays/yuitora_12317423.osr",
+ "Default skin path": "/Users/yuitora./Downloads/Default Skin/",
+ "Output path": "output.avi",
+ "Width": 1920,
+ "Height": 1080,
+ "FPS": 60,
+ "Start time": 0,
+ "End time": -1,
+ "Video codec": "XVID",
+ "Process": 2,
+ "ffmpeg path": "Users/yuitora./ffmpeg/bin/ffmpeg.exe"
+ }
+
+settings = {
+ "Cursor size": 1,
+ "In-game interface": True,
+ "Show scoreboard": True,
+ "Background dim": 90,
+ "Always show key overlay": True,
+ "Automatic cursor size": False,
+ "Rotate sliderball": False,
+ "Score meter size": 1.25,
+ "Song volume": 50,
+ "Effect volume": 100,
+ "Ignore beatmap hitsounds": True,
+ "Use skin's sound samples": True,
+ "Global leaderboard": False,
+ "Mods leaderboard": "(HD)HR",
+ "api key": "lol"
+ }
+
+converter = Osr2mp4(data, settings)
+converter.startall()
+converter.joinall()
+```
+
+ Or you can save `data` and `settings` in a json file.
+ config.json:
+```json
+ {
+ "osu! path": "/Users/yuitora./osu!/",
+ "Skin path": "/Users/yuitora./osu!/Skins/-#Whitecat#-",
+ "Beatmap path": "/Users/yuitora./osu!/Songs/123456 Hachigatsu, Bou/",
+ ".osr path": "/Users/yuitora./osu!/Replays/yuitora_12317423.osr",
+ "Default skin path": "/Users/yuitora./Downloads/Default Skin/",
+ "Output path": "output.avi",
+ "Width": 1920,
+ "Height": 1080,
+ "FPS": 60,
+ "Start time": 0,
+ "End time": -1,
+ "Video codec": "XVID",
+ "Process": 2,
+ "ffmpeg path": "Users/yuitora./ffmpeg/bin/ffmpeg.exe"
+ }
+```
+
+ settings.json:
+```json
+ {
+ "Cursor size": 1,
+ "In-game interface": true,
+ "Show scoreboard": true,
+ "Background dim": 90,
+ "Always show key overlay": true,
+ "Automatic cursor size": true,
+ "Rotate sliderball": false,
+ "Score meter size": 1.25,
+ "Song volume": 50,
+ "Effect volume": 100,
+ "Ignore beatmap hitsounds": true,
+ "Use skin's sound samples": true,
+ "Global leaderboard": false,
+ "Mods leaderboard": "(HD)HR",
+ "api key": "lol"
+ }
+```
+
+ And to load it in code
+```python
+from osr2mp4.osr2mp4 import Osr2mp4
+converter = Osr2mp4(filedata="config.json", filesettings="settings.json")
+converter.startall()
+converter.joinall()
+```
+
+ # Documentation
+ `Osr2mp4.startvideo()`
+
+ Start video without audio.
+
+ `Osr2mp4.joinvideo()`
+
+ Wait for video to finish.
+
+ `Osr2mp4.startaudio()`
+
+ Start audio.
+
+ `Osr2mp4.joinaudio()`
+
+ Wait for audio to finish.
+
+ `Osr2mp4.startall()`
+
+ Start video and audio.
+
+ `Osr2mp4.joinall()`
+
+ Wait for all to finish.
+
+ `Osr2mp4.getprogress()`
+
+ Return a value from 0 to 100 corresponding to the estimated progress of the conversion.
+
+%package help
+Summary: Development documents and examples for osr2mp4
+Provides: python3-osr2mp4-doc
+%description help
+# Getting started
+```python
+from osr2mp4.osr2mp4 import Osr2mp4
+
+data = {
+ "osu! path": "/Users/yuitora./osu!/",
+ "Skin path": "/Users/yuitora./osu!/Skins/-#Whitecat#-",
+ "Beatmap path": "/Users/yuitora./osu!/Songs/123456 Hachigatsu, Bou/",
+ ".osr path": "/Users/yuitora./osu!/Replays/yuitora_12317423.osr",
+ "Default skin path": "/Users/yuitora./Downloads/Default Skin/",
+ "Output path": "output.avi",
+ "Width": 1920,
+ "Height": 1080,
+ "FPS": 60,
+ "Start time": 0,
+ "End time": -1,
+ "Video codec": "XVID",
+ "Process": 2,
+ "ffmpeg path": "Users/yuitora./ffmpeg/bin/ffmpeg.exe"
+ }
+
+settings = {
+ "Cursor size": 1,
+ "In-game interface": True,
+ "Show scoreboard": True,
+ "Background dim": 90,
+ "Always show key overlay": True,
+ "Automatic cursor size": False,
+ "Rotate sliderball": False,
+ "Score meter size": 1.25,
+ "Song volume": 50,
+ "Effect volume": 100,
+ "Ignore beatmap hitsounds": True,
+ "Use skin's sound samples": True,
+ "Global leaderboard": False,
+ "Mods leaderboard": "(HD)HR",
+ "api key": "lol"
+ }
+
+converter = Osr2mp4(data, settings)
+converter.startall()
+converter.joinall()
+```
+
+ Or you can save `data` and `settings` in a json file.
+ config.json:
+```json
+ {
+ "osu! path": "/Users/yuitora./osu!/",
+ "Skin path": "/Users/yuitora./osu!/Skins/-#Whitecat#-",
+ "Beatmap path": "/Users/yuitora./osu!/Songs/123456 Hachigatsu, Bou/",
+ ".osr path": "/Users/yuitora./osu!/Replays/yuitora_12317423.osr",
+ "Default skin path": "/Users/yuitora./Downloads/Default Skin/",
+ "Output path": "output.avi",
+ "Width": 1920,
+ "Height": 1080,
+ "FPS": 60,
+ "Start time": 0,
+ "End time": -1,
+ "Video codec": "XVID",
+ "Process": 2,
+ "ffmpeg path": "Users/yuitora./ffmpeg/bin/ffmpeg.exe"
+ }
+```
+
+ settings.json:
+```json
+ {
+ "Cursor size": 1,
+ "In-game interface": true,
+ "Show scoreboard": true,
+ "Background dim": 90,
+ "Always show key overlay": true,
+ "Automatic cursor size": true,
+ "Rotate sliderball": false,
+ "Score meter size": 1.25,
+ "Song volume": 50,
+ "Effect volume": 100,
+ "Ignore beatmap hitsounds": true,
+ "Use skin's sound samples": true,
+ "Global leaderboard": false,
+ "Mods leaderboard": "(HD)HR",
+ "api key": "lol"
+ }
+```
+
+ And to load it in code
+```python
+from osr2mp4.osr2mp4 import Osr2mp4
+converter = Osr2mp4(filedata="config.json", filesettings="settings.json")
+converter.startall()
+converter.joinall()
+```
+
+ # Documentation
+ `Osr2mp4.startvideo()`
+
+ Start video without audio.
+
+ `Osr2mp4.joinvideo()`
+
+ Wait for video to finish.
+
+ `Osr2mp4.startaudio()`
+
+ Start audio.
+
+ `Osr2mp4.joinaudio()`
+
+ Wait for audio to finish.
+
+ `Osr2mp4.startall()`
+
+ Start video and audio.
+
+ `Osr2mp4.joinall()`
+
+ Wait for all to finish.
+
+ `Osr2mp4.getprogress()`
+
+ Return a value from 0 to 100 corresponding to the estimated progress of the conversion.
+
+%prep
+%autosetup -n osr2mp4-0.0.6a1
+
+%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-osr2mp4 -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.6a1-1
+- Package Spec generated