adding python-menu3

This commit is contained in:
brent s 2016-11-11 21:55:53 -05:00
parent 4b1f5bc78f
commit 50d498bc97
3 changed files with 54 additions and 1 deletions

3
.gitmodules vendored
View File

@ -145,3 +145,6 @@
[submodule "python-zconfig"]
path = python-zconfig
url = aur@aur.archlinux.org:python-zconfig
[submodule "python-menu3"]
path = python-menu3
url = aur@aur.archlinux.org:python-menu3

51
_bin/new.package.py Normal file → Executable file
View File

@ -1,10 +1,59 @@
#!/usr/bin/env python3

import curses
import os
import subprocess
import pygit2

## SETTINGS ##
gpgkey = '748231EBCBD808A14F5E85D28C004C2F93481F6B' # https://wiki.archlinux.org/index.php/PKGBUILD#validpgpkeys
maintname = 'brent s. <bts[at]square-r00t[dot]net>' # your name and email address, feel free to obfuscate though
pkgbuild_dir = '/opt/dev/arch' # what dir do the pkgbuilds/AUR checkouts live?
aur_pkgs_dir = pkgbuild_dir # should be the dir where the aur_pkgs repo checkout lives. it's recommended you keep this the same as pkgbuild_dir

def get_pkgname():
## BUILD THE GUI ##
def gui_init():
# props to https://gist.github.com/abishur/2482046
screen = curses.initscr()
curses.noecho()
curses.cbreak()
curses.start_color()
screen.keypad(True)
curses.init_pair(1, curses.COLOR_BLACK, curses.COLOR_WHITE) # might change this. black text, white BG
h = curses.color_pair(1)
n = curses.A_NORMAL
MENU = "menu"
COMMAND = "command"
EXITMENU = "exitmenu"

menu_data = {'title': "AUR_Pkgs Packaging Menu", 'type': MENU, 'subtitle': "How might I assist you today?",
'options':[
{ 'title': "Add a new package to the AUR...", 'type': MENU, 'subtitle': 'Use this submenu to add new packages.',
'options': [
{ '
},
{ 'title': "Sign a package's sources", 'type': COMMAND, 'command': 'sign_pkg' },
{ 'title': "Update/initialize submodules from the AUR", 'type': COMMAND, 'command': 'fetch_aur' }
]
}

gui_init()



# Get the package type
def get_pkgtype():
pkgtype = True
while pkgtype:
print("""
What type of package is this?
1 Release/Versioned
2 VCS (Git, SVN, Mercurial, etc.)
3 Quit
""")
pkgtype = input()
#if pkgtype ==

# Get the package name
def get_pkgname():
pkgname = input('What is the name of this package?')

1
python-menu3 Submodule

@ -0,0 +1 @@
Subproject commit f2dd884c1f3b4cae97d1566163ca4c8ba21eb437