/
nsearch.py
executable file
·42 lines (35 loc) · 1.13 KB
/
nsearch.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
#!/usr/bin/env python
import console
import dbmodule
import re
from console import *
from dbmodule import *
banner ='\033[0;36m'+'''
================================================
_ _ _____ _____ _
| \ | |/ ___|| ___| | |
| \| |\ `--. | |__ __ _ _ __ ___ | |__
| . ` | `--. \| __| / _` || '__| / __|| '_ |
| |\ |/\__/ /| |___ | (_| || | | (__ | | | |
\_| \_/\____/ \____/ \__,_||_| \___||_| |_|
================================================
Version 0.4b http://goo.gl/8mFHE5 @jjtibaquira
Email: jko@dragonjar.org | www.dragonjar.org
================================================
'''+'\033[0m'
# main action
if __name__ == '__main__':
currentLocale = re.sub('[_].*','',os.environ['LANG'])
i18n.load_path.append('i18n')
i18n.set('locale',currentLocale) if True else i18n.set('fallback','en')
print banner
if not os.path.isfile(dbmodule.dbname):
dbmodule.initSetup()
else:
dbmodule.updateApp()
os.system("clear")
console = console.Console()
try:
console.cmdloop()
except KeyboardInterrupt:
console.postloop()