-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
41 lines (34 loc) · 1.31 KB
/
config.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
import ConfigParser
import os
config = ConfigParser.RawConfigParser()
config.add_section('directories')
config.add_section('commands')
config.add_section('email')
config.add_section('language')
config.add_section('nicknames')
config.set('directories', 'shortcut_directory', 'C:\shortcuts')
config.set('commands', 'google_command', 'google')
config.set('commands', 'google_browser', 'browse')
config.set('commands', 'duck_browser', 'duck')
config.set('commands', 'open_file', 'open')
config.set('commands', 'list_shortcuts', 'list')
config.set('commands', 'blog_command', 'blog')
config.set('email', 'your_email', '[email protected]')
config.set('email', 'blog_email', '[email protected]')
config.set('email', 'blog_mail_url', 'yourdomain.com/blog/wp-content.php')
config.set('commands', 'journal', 'write')
config.set('commands', 'search_journal', 'search')
config.set('commands', 'language_processing', 'key')
config.set('commands', 'add_nickname', 'add')
config.set('language', 'keyword_context', 'search')
config.set('nicknames', 'python', 'http://python.org')
config.set('nicknames', 'vales', 'http://valeness.tk')
with open('config.cfg', 'wb') as configfile:
config.write(configfile)
print 'Configuration Complete!'
print 'Open Configuration file?'
ans = raw_input(':>')
if 'no' in ans:
quit()
else:
os.startfile('config.cfg')