-
Notifications
You must be signed in to change notification settings - Fork 3
/
mikecontext.py
executable file
·35 lines (30 loc) · 1.02 KB
/
mikecontext.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
#! /usr/bin/env python
"""Stupid script to build up a language model from *my* projects"""
import os, logging
from subprocess import check_call
log = logging.getLogger(__name__)
def main(context='python'):
check_call(['listener-context-delete', '--context', context])
for project in [
'~/OpenGL-dev/pyopengl',
'~/OpenGL-dev/openglcontext',
'~/OpenGL-dev/twitch',
'~/OpenGL-dev/simpleparse',
'~/OpenGL-dev/pyvrml97',
'~/pylive/vcs2eric',
'~/pylive/twistedsnmp',
'~/pylive/starpy',
'~/blog-dev/blog',
'~/runsnake-dev/coldshot',
'~/runsnake-dev/runsnakerun',
'~/runsnake-dev/squaremap',
]:
directory = os.path.expanduser(project)
if os.path.exists(directory):
log.info('Importing project: %s', project)
check_call(
['listener-context-from-project', '--context', context, directory]
)
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
main()