-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate
More file actions
executable file
·22 lines (16 loc) · 879 Bytes
/
create
File metadata and controls
executable file
·22 lines (16 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/python3
from argparse import ArgumentParser
from hackgrab import Channel
def main():
parser=ArgumentParser()
parser.add_argument("-v", "--verbose", help="Verbose output", action="store_true")
parser.add_argument("-D", "--debug", help="Debug output", action="store_true")
parser.add_argument("-b", "--basepath", help="Hackgrab system base path", default="/srv/hackgrab")
parser.add_argument("-l", "--lowpri", help="Channel has low priority", action="store_true")
parser.add_argument("URL", help="Channel URL")
parser.add_argument("name", help="Channel name")
args = parser.parse_args()
channel = Channel(basepath = args.basepath, url = args.URL, name = args.name, lowpri = args.lowpri, verbose = args.verbose or args.debug, debug = args.debug)
channel.create()
if __name__ == "__main__":
main()