Lines Matching refs:tree

210 def queueForRemoval(tree):
212 if tree not in config.get("trees", {}):
214 mytree = trees[tree]
216 print("* %s: %d items" % (tree, len(mytree["locs"])))
217 # do varible substitution for this tree here
218 if isinstance(config["trees"][tree], basestring):
219 treeStr = config["trees"][tree]
221 print(" Substituting $%s for tree %s" % (treeStr, tree))
223 print(" ERROR: no variable: variables.%s for tree %s" % (treeStr, tree))
225 config["trees"][tree] = config["variables"][treeStr]
226 myconfig = config["trees"][tree]
229 # Process this tree
232 print(" No processing for %s - skipping" % (tree))
241 print("Removing %s because tree %s is empty." % (thePool, tree))
244 print("tree %s - no ONLY")
254 def addTreeByType(tree, mytree):
256 print("(considering %s): %s" % (tree, mytree))
257 trees[tree] = mytree
264 queueForRemoval(tree)
277 tree = None
279 tree = "ROOT"
281 tree = treeprefix[0:-1]
283 print("procesing %s" % (tree))
284 trees[tree] = { "extension": ".res", "treeprefix": treeprefix, "hasIndex": True }
285 # read in the resource list for the tree
286 treelistfile = os.path.join(options.tmpdir,"%s.lst" % tree)
287 runcmd("iculslocs", "-i %s -N %s -T %s -l > %s" % (outfile, dataname, tree, treelistfile))
290 trees[tree]["locs"] = [line.strip() for line in treeitems]
291 if tree not in config.get("trees", {}):
292 print(" Warning: filter file %s does not mention trees.%s - will be kept as-is" % (options.filterfile, tree))
294 queueForRemoval(tree)
342 for tree in trees:
344 if "hasIndex" not in trees[tree]:
347 if(trees[tree]["treeprefix"]):
348 treebunddir = os.path.join(treebunddir, trees[tree]["treeprefix"])
353 runcmd("iculslocs", "-i %s -N %s -T %s -b %s" % (outfile, dataname, tree, treebundtxt))
355 runcmd("icupkg","-s %s -a %s%s %s" % (options.tmpdir, trees[tree]["treeprefix"], RES_INDX, outfile))