-
Notifications
You must be signed in to change notification settings - Fork 5
/
constants.py
33 lines (24 loc) · 738 Bytes
/
constants.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
HELP = '''
Usage:
- Script version:
python unoffice.py "path\\to\\example.docx" "path\\to\\example2.xlsx" ...
- Binary version:
unoffice "path\\to\\example.docx" "path\\to\\example2.xlsx" ...
or for (Powershell)
./unoffice "path\\to\\example.docx" "path\\to\\example2.xlsx" ...
'''
DOCX = (
# Path inside MS Word archive
'word/settings.xml',
# Partial Read-only and Full Read-only
r'(<w:documentProtection .*?/>)?(<w:writeProtection .*?/>)?'
)
PPTX = (
'ppt/presentation.xml',
r'<p:modifyVerifier .*?/>'
)
XLSX = (
'xl/workbook.xml',
r'(<fileSharing .*?/>)?(<sheetProtection .*?/>)?'
)
EXTS = {'docx': DOCX, 'pptx': PPTX, 'xlsx': XLSX}