-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelp.py
55 lines (32 loc) · 1.34 KB
/
help.py
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
43
44
45
46
47
48
49
50
51
52
53
54
55
import sys
hdata = [
[ "start.py", "Creates a one page pdf and inserts text in it*" ],
[ "pixmap.py", "Saves page as png image" ],
[ "delete.py", "Delete page from pdf file" ],
[ "merge.py", "Merge two pdf files" ],
[ "move.py", "Move pages inside pdf document" ],
[ "split.py", "Split a pdf document" ],
[ "search.py", "Find a word in a document" ],
[ "get-links.py", "Extract links from a document" ],
[ "text-link.py", "Turn text into link in a document" ],
[ "insert-link.py", "Inserts a link in a document (requires a Rect object)*" ],
[ "embfile.py", "Embed a file in a document*" ],
[ "embfile-multi.py", "Embed multiple files in a document" ],
[ "bgcolor.py", "Edit background color for one page" ],
[ "bgcolor-all.py", "Edit background color for all pages" ],
]
print("\n\tPyMuPDF Command Line Apps\n")
if(len(sys.argv)>1):
if(sys.argv[1] == "start"):
print("\tCreates a new PDF file\n")
elif(sys.argv[1] == "insert-link"):
print("\tinsert-link\n")
print("\tSupported links: LINK_GOTO (1) and LINK_URI (2)\n")
elif(sys.argv[1] == "embfile"):
print("\tembfile - Embed a file\n")
print("\tembfile \n")
else:
print("\tUnknown script\n")
else:
for line in hdata:
print("\t",line[0],"\t",line[1],"\n")