%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 - 0.0.6a1-1 - Package Spec generated