%global _empty_manifest_terminate_build 0 Name: python-TerminalButtons Version: 1.0.0 Release: 1 Summary: Buttons in Linux terminal License: MIT URL: https://github.com/Peticali/TerminalButtons Source0: https://mirrors.nju.edu.cn/pypi/web/packages/4f/ef/3cfd0b4ef79834620a9fb898c78aa432f061288c4a6f98cc408b4cd3dc83/TerminalButtons-1.0.0.tar.gz BuildArch: noarch %description # TerminalButtons Python curses made easy Clicable Buttons in Linux terminal, Termux, etc ![Captura de Tela 2021-08-15 às 08 03 05](https://user-images.githubusercontent.com/34588988/129476983-85d7be6c-b261-428f-977c-3149e975d35f.png) Example: ```python from TerminalButtons import * import curses def example(std): Tb = TerminalButtons(std) Tb.CreateButton(positiony=CENTER,positionx=CENTER,fg=curses.COLOR_BLUE,text='hi') Tb.mainLoop() curses.wrapper(example) ``` Methods: ```python CreateButton(self,positionx,positiony,fg,bg,commmand,text,row,col,typeText) #positions = Top,Left,Bottom,Right #fg,bg = curses COLOR (Foreground,Background Color) #command = Function to run when click the button (without '()') #row,col = padding #typeText = curses BOLD,ITALIC,etc ReqInput(self,x,y) #x,y = coords where input will show up #returns the string typed AddKeyEvent(self,key,func) #key = curses KEY #func = Function to run when event fire ConfigureBg(self,bg,fg) #bg,fg = curses COLOR (will change the screen colors) mainLoop(self) #principal loop ClearScreen(self) #i need to document this? GetMaxYX(self) #returns the char size of terminal (x,y) Exit(self) #breaks the mainLoop and exit ``` %package -n python3-TerminalButtons Summary: Buttons in Linux terminal Provides: python-TerminalButtons BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-TerminalButtons # TerminalButtons Python curses made easy Clicable Buttons in Linux terminal, Termux, etc ![Captura de Tela 2021-08-15 às 08 03 05](https://user-images.githubusercontent.com/34588988/129476983-85d7be6c-b261-428f-977c-3149e975d35f.png) Example: ```python from TerminalButtons import * import curses def example(std): Tb = TerminalButtons(std) Tb.CreateButton(positiony=CENTER,positionx=CENTER,fg=curses.COLOR_BLUE,text='hi') Tb.mainLoop() curses.wrapper(example) ``` Methods: ```python CreateButton(self,positionx,positiony,fg,bg,commmand,text,row,col,typeText) #positions = Top,Left,Bottom,Right #fg,bg = curses COLOR (Foreground,Background Color) #command = Function to run when click the button (without '()') #row,col = padding #typeText = curses BOLD,ITALIC,etc ReqInput(self,x,y) #x,y = coords where input will show up #returns the string typed AddKeyEvent(self,key,func) #key = curses KEY #func = Function to run when event fire ConfigureBg(self,bg,fg) #bg,fg = curses COLOR (will change the screen colors) mainLoop(self) #principal loop ClearScreen(self) #i need to document this? GetMaxYX(self) #returns the char size of terminal (x,y) Exit(self) #breaks the mainLoop and exit ``` %package help Summary: Development documents and examples for TerminalButtons Provides: python3-TerminalButtons-doc %description help # TerminalButtons Python curses made easy Clicable Buttons in Linux terminal, Termux, etc ![Captura de Tela 2021-08-15 às 08 03 05](https://user-images.githubusercontent.com/34588988/129476983-85d7be6c-b261-428f-977c-3149e975d35f.png) Example: ```python from TerminalButtons import * import curses def example(std): Tb = TerminalButtons(std) Tb.CreateButton(positiony=CENTER,positionx=CENTER,fg=curses.COLOR_BLUE,text='hi') Tb.mainLoop() curses.wrapper(example) ``` Methods: ```python CreateButton(self,positionx,positiony,fg,bg,commmand,text,row,col,typeText) #positions = Top,Left,Bottom,Right #fg,bg = curses COLOR (Foreground,Background Color) #command = Function to run when click the button (without '()') #row,col = padding #typeText = curses BOLD,ITALIC,etc ReqInput(self,x,y) #x,y = coords where input will show up #returns the string typed AddKeyEvent(self,key,func) #key = curses KEY #func = Function to run when event fire ConfigureBg(self,bg,fg) #bg,fg = curses COLOR (will change the screen colors) mainLoop(self) #principal loop ClearScreen(self) #i need to document this? GetMaxYX(self) #returns the char size of terminal (x,y) Exit(self) #breaks the mainLoop and exit ``` %prep %autosetup -n TerminalButtons-1.0.0 %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-TerminalButtons -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 1.0.0-1 - Package Spec generated