-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDCC_cl.py
More file actions
42 lines (33 loc) · 961 Bytes
/
DCC_cl.py
File metadata and controls
42 lines (33 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python3
# external modules
import DCC
import sys
# my modules
import Config as CF
debug = False
def copy_object(s):
obj = input("Enter Object Handle: ")
col = input("Enter Collection Handle to Copy To: ")
DCC.add_docs_2_collections(s,[obj],[col])
return
def move_object(s):
obj = input("Enter Object Handle: ")
source = input("Enter Collection Handle to Move From: ")
dest = input("Enter Collection Handle to Move To: ")
DCC.dcc_move(s, obj, source, dest)
return
def main():
# Login to DCC
s = DCC.login(CF.dcc_url + CF.dcc_login)
while True:
com = input("Enter Command: ")
if com.strip() == '':
print('Exiting')
break
if com.upper() == 'COPY':
copy_object(s)
if com.upper() == 'MOVE':
move_object(s)
if __name__ == '__main__':
print("Running module test code for",__file__)
main()