Example #1
0
controller = leoBridge.controller(
    gui='nullGui',
    loadPlugins=False,  # True: attempt to load plugins.
    readSettings=False, # True: read standard settings files.
    silent=False,       # True: don't print signon messages.
    verbose=False
)
g = controller.globals()

# list of "files" to process
files = sys.argv[1:]

# set up leofts
leofts.set_leo(g)
g._gnxcache = leofts.GnxCache()
fts = leofts.get_fts()

fn2c = {}  # cache to avoid loading same outline twice
done = set()  # outlines scanned, to avoid repetition repetition

todo = list(files)

while todo:

    item = todo.pop(0)
    
    print ("INDEX: %s"%item)
    
    if '#' in item:
        fn, node = item.split('#', 1)
    else:
Example #2
0
import sys
# add folder containing 'leo' folder to path
sys.path.append("/home/tbrown/Package/leo/bzr/leo.repo/trunk")
import leo.core.leoBridge as leoBridge
import leo.plugins.leofts as leofts

controller = leoBridge.controller(gui='nullGui')
g = controller.globals()

# list of "files" to process
files = sys.argv[1:]

# set up leofts
leofts.set_leo(g)
g._gnxcache = leofts.GnxCache()
fts = leofts.get_fts()

fn2c = {}  # cache to avoid loading same outline twice
done = set()  # outlines scanned, to avoid repetition repetition

for item in files:
    
    print ("INDEX: %s"%item)
    
    if '#' in item:
        fn, node = item.split('#', 1)
    else:
        fn, node = item, None
        
    if node:
        c = fn2c.setdefault(fn, controller.openLeoFile(fn))
Example #3
0
 def get_fts(self):
     return leofts.get_fts()
Example #4
0
 def get_fts(self):
     return leofts.get_fts()