rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
self.pbxBuildTree(dir, process) | self.pbxBuildTree(dir, processcpp) | def pbxBuildTree(self, tree, process): w = self.file.write tree.id = newid() for name,dir in tree.directories.iteritems(): self.pbxBuildTree(dir, process) for file in tree.files: file.id = newid() file.buildid = newid() if process and file.process and not isinstance(file, mak.sources.hsource): w("\t%s = { isa = PBXBuil... |
if process and file.process and not isinstance(file, mak.sources.hsource): w("\t%s = { isa = PBXBuildFile; fileRef = %s; };\n" % (file.buildid, file.id)) | if file.process: if isinstance(file, mak.sources.cppsource) and not isinstance(file, mak.sources.generatedcppsource): if processcpp: w("\t%s = { isa = PBXBuildFile; fileRef = %s; };\n" % (file.buildid, file.id)) elif isinstance(file, mak.sources.datasource): w("\t%s = { isa = PBXBuildFile; fileRef = %s; };\n" % (file.b... | def pbxBuildTree(self, tree, process): w = self.file.write tree.id = newid() for name,dir in tree.directories.iteritems(): self.pbxBuildTree(dir, process) for file in tree.files: file.id = newid() file.buildid = newid() if process and file.process and not isinstance(file, mak.sources.hsource): w("\t%s = { isa = PBXBuil... |
filetype = "sourcecode.c.h" | if file.filename[-2:] == '.h': filetype = "sourcecode.c.h" else: filetype = "sourcecode.cpp.h" | def pbxFileRefTree(self, tree, path=''): w = self.file.write for name,dir in tree.directories.iteritems(): self.pbxFileRefTree(dir, os.path.join(path, tree.prefix)) for file in tree.files: filename = os.path.join(path, tree.prefix, file.filename) if isinstance(file, mak.sources.hsource): filetype = "sourcecode.c.h" eli... |
filetype = "sourcecode.c.cpp" | if file.filename[-2:] == '.c': filetype = "sourcecode.c.c" else: filetype = "sourcecode.cpp.cpp" elif isinstance(file, mak.sources.datasource): filetype = "sourcecode." elif isinstance(file, mak.sources.lexsource): filetype = "sourcecode.lex" elif isinstance(file, mak.sources.yaccsource): filetype = "sourcecode.yacc" | def pbxFileRefTree(self, tree, path=''): w = self.file.write for name,dir in tree.directories.iteritems(): self.pbxFileRefTree(dir, os.path.join(path, tree.prefix)) for file in tree.files: filename = os.path.join(path, tree.prefix, file.filename) if isinstance(file, mak.sources.hsource): filetype = "sourcecode.c.h" eli... |
filetype = "sourcecode.c.h" w("\t%s = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = %s;\n\t\tname = \"%s\";\n\t\tpath = \"%s\";\n\t\tsourceTree = \"<group>\";\n\t};\n" % (file.id, filetype, os.path.split(filename)[1], filename)) | filetype = "text" w("\t%s = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = %s;\n\t\tname = \"%s\";\n\t\tpath = \"%s\";\n\t\tsourceTree = %s;\n\t};\n" % (file.id, filetype, os.path.split(filename)[1], filename, sourceroot)) | def pbxFileRefTree(self, tree, path=''): w = self.file.write for name,dir in tree.directories.iteritems(): self.pbxFileRefTree(dir, os.path.join(path, tree.prefix)) for file in tree.files: filename = os.path.join(path, tree.prefix, file.filename) if isinstance(file, mak.sources.hsource): filetype = "sourcecode.c.h" eli... |
d.phaseId = [newid(), newid(), newid()] | d.phaseId = [newid()] | def writePBXFileReference(self): w = self.file.write w("/* Begin PBXFileReference section */\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t%s = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = text.xcconfig;\n\t\tname = \"%s\";\n\t\tpath = \"%s\";\n\t\tsourceTr... |
[('iphone-debug', newid()), ('iphone-profile', newid()), ('iphone-final', newid()), ('osx-debug', newid()), ('osx-profile', newid()), ('osx-final', newid())]) | [('osx-debug', newid()), ('osx-profile', newid()), ('osx-final', newid()), ('iphone-debug', newid()), ('iphone-profile', newid()), ('iphone-final', newid())]) | def writePBXFileReference(self): w = self.file.write w("/* Begin PBXFileReference section */\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t%s = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = text.xcconfig;\n\t\tname = \"%s\";\n\t\tpath = \"%s\";\n\t\tsourceTr... |
w("\t\t\t%s,\n" % d.phaseId[0]) | for phase in d.phaseId: w("\t\t\t%s,\n" % phase) | def writeTarget(self, d): w = self.file.write w("\t%s = {\n" % d.targetId) w("\t\tisa = PBXNativeTarget;\n") w("\t\tbuildConfigurationList = %s;\n" % d.buildSettingsId[0]) w("\t\tbuildPhases = (\n") w("\t\t\t%s,\n" % d.phaseId[0]) w("\t\t);\n") w("\t\tbuildRules = (\n") w("\t\t);\n") w("\t\tdependencies = (\n") w("\t\t... |
def writeSources(self, sources): | def writeSources(self, sources, all): | def writeSources(self, sources): w = self.file.write for name,d in sources.directories.iteritems(): self.writeSources(d) for file in sources.files: if file.process and not isinstance(file, mak.sources.hsource): w("\t\t\t%s,\n" % file.buildid) |
self.writeSources(d) | self.writeSources(d, all) | def writeSources(self, sources): w = self.file.write for name,d in sources.directories.iteritems(): self.writeSources(d) for file in sources.files: if file.process and not isinstance(file, mak.sources.hsource): w("\t\t\t%s,\n" % file.buildid) |
if file.process and not isinstance(file, mak.sources.hsource): w("\t\t\t%s,\n" % file.buildid) | if file.process: if isinstance(file, mak.sources.generatedcppsource): continue elif isinstance(file, mak.sources.cppsource) and all: w("\t\t\t%s,\n" % file.buildid) else: w("\t\t\t%s,\n" % file.buildid) | def writeSources(self, sources): w = self.file.write for name,d in sources.directories.iteritems(): self.writeSources(d) for file in sources.files: if file.process and not isinstance(file, mak.sources.hsource): w("\t\t\t%s,\n" % file.buildid) |
w("\t%s = {\n" % d.phaseId[0]) | w("\t%s = {\n" % d.phaseId[-1]) | def writePBXSourcesBuildPhase(self): w = self.file.write w("/* Begin PBXSourcesBuildPhase section */\n") for d in self.projects: w("\t%s = {\n" % d.phaseId[0]) w("\t\tisa = PBXSourcesBuildPhase;\n") w("\t\tbuildActionMask = 2147483647;\n") w("\t\tfiles = (\n") if d.usemaster: w("\t\t\t%s,\n" % d.masterbuildid) else: se... |
self.writeSources(d.sourceTree) | self.writeSources(d.sourceTree, True) | def writePBXSourcesBuildPhase(self): w = self.file.write w("/* Begin PBXSourcesBuildPhase section */\n") for d in self.projects: w("\t%s = {\n" % d.phaseId[0]) w("\t\tisa = PBXSourcesBuildPhase;\n") w("\t\tbuildActionMask = 2147483647;\n") w("\t\tfiles = (\n") if d.usemaster: w("\t\t\t%s,\n" % d.masterbuildid) else: se... |
if isinstance(source, mak.sources.cppsource): | if isinstance(source, mak.sources.cppsource) and not isinstance(source, mak.sources.generatedcppsource): | def writemaster(sourcetree, f, path = ''): for source in sourcetree.files: if isinstance(source, mak.sources.cppsource): f.write("#if %s\n" % " || ".join(["defined(_%s)" % i.upper() for i in source.archs])) f.write("# if %s\n" % " || ".join(["defined(_%s)" % i.upper() for i in source.platforms])) f.write("# include \"... |
solution.writePBXSourcesBuildPhase() | def generateProject(task): solution = XCodeProject( task.name, task.outputs[0].bldpath(task.env), task.version, task.projects) solution.writeHeader() solution.writePBXBuildFile() solution.writePBXFileReference() #solution.writePBXFrameworksBuildPhase() solution.writePBXGroup() #solution.writePBXHeadersBuildPhase() solu... | |
solution.chmod = 0444 | def create_xcode_project(t): toolName = t.features[0] appname = getattr(Utils.g_module, 'APPNAME', 'noname') if not solutions.has_key(toolName): outname = 'project.pbxproj' solution = GenerateProject(env=t.env) solution.set_outputs(t.path.find_or_declare(outname)) solution.name = appname solution.version = xcodeproject... | |
d.applicationId = newid() d.targetId = newid() d.phaseId = [newid(), newid(), newid()] d.buildSettingsId = (newid(), | w("\t%s = { isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"%s.app\" ; sourceTree = BUILT_PRODUCTS_DIR; };\n" % (d.applicationId, d.projectName)) elif d.type in ['library', 'static_library', 'plugin']: w("\t%s = { isa = PBXFileReference; explicitFileType = archive.ar; includ... | def writePBXFileReference(self): w = self.file.write w("/* Begin PBXFileReference section */\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t%s = { isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = \"%s\"; path = \"%s\" ; sourceTree = \"SOURCE_ROOT\"; };\n" %... |
w("\t%s = { isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"%s.app\" ; sourceTree = BUILT_PRODUCTS_DIR; };\n" % (d.applicationId, d.projectName)) | def writePBXFileReference(self): w = self.file.write w("/* Begin PBXFileReference section */\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t%s = { isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = \"%s\"; path = \"%s\" ; sourceTree = \"SOURCE_ROOT\"; };\n" %... | |
if d.type in ['game', 'tool']: | if d.type in ['game', 'tool', 'library', 'static_library', 'plugin']: | def writePBXGroup(self): w = self.file.write w("/* Begin PBXGroup section */\n") makid = newid() w("\t%s = {\n" % makid) w("\t\tisa = PBXGroup;\n") w("\t\tname = config;\n") w("\t\tsourceTree = \"<group>\";\n") w("\t\tchildren = (\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t\t\t%s,\n" % f... |
w("\t%s = {\n" % d.targetId) w("\t\tisa = PBXNativeTarget;\n") w("\t\tbuildConfigurationList = %s;\n" % d.buildSettingsId[0]) w("\t\tbuildPhases = (\n") w("\t\t\t%s,\n" % d.phaseId[0]) w("\t\t);\n") w("\t\tbuildRules = (\n") w("\t\t);\n") w("\t\tdependencies = (\n") w("\t\t);\n") w("\t\tname = \"%s\";\n" % (d.projectNa... | self.writeTarget(d) for d in self.projects: if d.type in ['library', 'static_library', 'plugin']: self.writeTarget(d) | def writePBXNativeTarget(self): w = self.file.write w("/* Begin PBXNativeTarget section */\n") for d in self.projects: if d.type in ['game', 'tool']: w("\t%s = {\n" % d.targetId) w("\t\tisa = PBXNativeTarget;\n") w("\t\tbuildConfigurationList = %s;\n" % d.buildSettingsId[0]) w("\t\tbuildPhases = (\n") w("\t\t\t%s,\n" %... |
if d.type in ['game', 'tool']: w("\t%s = {\n" % d.phaseId[0]) w("\t\tisa = PBXSourcesBuildPhase;\n") w("\t\tbuildActionMask = 2147483647;\n") w("\t\tfiles = (\n") if d.usemaster: w("\t\t\t%s,\n" % d.masterbuildid) else: self.writeSources(d.sourceTree) w("\t\t);\n") w("\t\trunOnlyForDeploymentPostprocessing = 0;\n") w("... | w("\t%s = {\n" % d.phaseId[0]) w("\t\tisa = PBXSourcesBuildPhase;\n") w("\t\tbuildActionMask = 2147483647;\n") w("\t\tfiles = (\n") if d.usemaster: w("\t\t\t%s,\n" % d.masterbuildid) else: self.writeSources(d.sourceTree) w("\t\t);\n") w("\t\trunOnlyForDeploymentPostprocessing = 0;\n") w("\t};\n") | def writePBXSourcesBuildPhase(self): w = self.file.write w("/* Begin PBXSourcesBuildPhase section */\n") for d in self.projects: if d.type in ['game', 'tool']: w("\t%s = {\n" % d.phaseId[0]) w("\t\tisa = PBXSourcesBuildPhase;\n") w("\t\tbuildActionMask = 2147483647;\n") w("\t\tfiles = (\n") if d.usemaster: w("\t\t\t%s,... |
if d.type in ['game', 'tool']: for name, setting in d.buildSettingsId[1]: w("\t%s = {\n" % setting) w("\t\tisa = XCBuildConfiguration;\n") w("\t\tbuildSettings = {\n") w("\t\t\tPRODUCT_NAME = %s;\n" % d.projectName) w("\t\t};\n") w("\t\tname = %s;\n" % name) w("\t};\n") | for name, setting in d.buildSettingsId[1]: w("\t%s = {\n" % setting) w("\t\tisa = XCBuildConfiguration;\n") w("\t\tbuildSettings = {\n") w("\t\t\tPRODUCT_NAME = %s;\n" % d.projectName) for platform, options in d.platforms.iteritems(): platform,arch = platform.split('-') platform, sdk = toSDK(platform) if platform and n... | def writeXCBuildConfiguration(self): w = self.file.write w("/* Begin XCBuildConfiguration section */\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t%s = {\n" % setting) w("\t\tisa = XCBuildConfiguration;\n") w("\t\tbaseConfigurationReference = %s;\n" % fileref) w("\t\tbuildSettings = {\n") w... |
if d.type in ['game', 'tool']: w("\t%s = {\n" % d.buildSettingsId[0]) w("\t\tisa = XCConfigurationList;\n") w("\t\tbuildConfigurations = (\n") for name, setting in d.buildSettingsId[1]: w("\t\t\t%s,\n" % setting) w("\t\t);\n") w("\t\tdefaultConfigurationIsVisible = 0;\n") w("\t\tdefaultConfigurationName = %s;\n" % d.bu... | w("\t%s = {\n" % d.buildSettingsId[0]) w("\t\tisa = XCConfigurationList;\n") w("\t\tbuildConfigurations = (\n") for name, setting in d.buildSettingsId[1]: w("\t\t\t%s,\n" % setting) w("\t\t);\n") w("\t\tdefaultConfigurationIsVisible = 0;\n") w("\t\tdefaultConfigurationName = %s;\n" % d.buildSettingsId[1][0][0]) w("\t};... | def writeXCConfigurationList(self): self.writeXCBuildConfiguration() w = self.file.write w("/* Begin XCConfigurationList section */\n") w("\t%s = {\n" % self.buildSettingsId[0]) w("\t\tisa = XCConfigurationList;\n") w("\t\tbuildConfigurations = (\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("... |
project.platforms = t.platforms | def create_xcode_project(t): toolName = t.features[0] appname = getattr(Utils.g_module, 'APPNAME', 'noname') if not solutions.has_key(toolName): outname = 'project.pbxproj' solution = GenerateProject(env=t.env) solution.set_outputs(t.path.find_or_declare(outname)) solution.name = appname solution.version = xcodeproject... | |
v['RANLIB'] = conf.find_program('ar', var='RANLIB', path_list=v['GCC_PATH']) | v['RANLIB'] = conf.find_program('granlib', var='RANLIB', path_list=v['GCC_PATH']) if not v['RANLIB']: v['RANLIB'] = conf.find_program('ranlib', var='RANLIB', path_list=v['GCC_PATH']) if not v['RANLIB']: v['RANLIB'] = conf.find_program('granlib', var='RANLIB') | def find_cross_gcc(conf): try: target = Options.options.target except: target = None if not target: target = conf.env['GCC_TARGET'] version = conf.env['GCC_VERSION'] versionsmall = '.'.join(version.split('.')[0:2]) if target: v = conf.env v['GCC_CONFIGURED_ARCH'] = parse_gcc_target(target) if not v['CC']: v['CC'] = con... |
conf.env['LINKFLAGS_debug'] = ['-pipe', '-g', '-Wl,-x', '-Wl,-O2'] | conf.env['LINKFLAGS_debug'] = ['-pipe', '-g'] | def find_cross_gcc(conf): try: target = Options.options.target except: target = None if not target: target = conf.env['GCC_TARGET'] version = conf.env['GCC_VERSION'] versionsmall = '.'.join(version.split('.')[0:2]) if target: v = conf.env v['GCC_CONFIGURED_ARCH'] = parse_gcc_target(target) if not v['CC']: v['CC'] = con... |
conf.env['LINKFLAGS_release'] = ['-pipe', '-g', '-Wl,-x', '-Wl,-O2'] | conf.env['LINKFLAGS_release'] = ['-pipe', '-g'] | def find_cross_gcc(conf): try: target = Options.options.target except: target = None if not target: target = conf.env['GCC_TARGET'] version = conf.env['GCC_VERSION'] versionsmall = '.'.join(version.split('.')[0:2]) if target: v = conf.env v['GCC_CONFIGURED_ARCH'] = parse_gcc_target(target) if not v['CC']: v['CC'] = con... |
conf.env['LINKFLAGS_profile'] = ['-pipe', '-g', '-s', '-Wl,-x', '-Wl,-O2'] | conf.env['LINKFLAGS_profile'] = ['-pipe', '-g', '-s'] | def find_cross_gcc(conf): try: target = Options.options.target except: target = None if not target: target = conf.env['GCC_TARGET'] version = conf.env['GCC_VERSION'] versionsmall = '.'.join(version.split('.')[0:2]) if target: v = conf.env v['GCC_CONFIGURED_ARCH'] = parse_gcc_target(target) if not v['CC']: v['CC'] = con... |
conf.env['LINKFLAGS_final'] = ['-pipe', '-g', '-s', '-Wl,-x', '-Wl,-O2'] | conf.env['LINKFLAGS_final'] = ['-pipe', '-g', '-s'] | def find_cross_gcc(conf): try: target = Options.options.target except: target = None if not target: target = conf.env['GCC_TARGET'] version = conf.env['GCC_VERSION'] versionsmall = '.'.join(version.split('.')[0:2]) if target: v = conf.env v['GCC_CONFIGURED_ARCH'] = parse_gcc_target(target) if not v['CC']: v['CC'] = con... |
archs = [ ('i386', 'x86'), | archs = [ ('i686-w64', 'amd64'), ('i386', 'x86'), | def parse_gcc_target(target): archs = [ ('i386', 'x86'), ('i486', 'x86'), ('i586', 'x86'), ('i686', 'x86'), ('arm-eabi', 'arm7'), ('mipsel', 'mips'), ('mips', 'mips'), ('Gekko', 'mips'), ('x86_64', 'amd64'), ('amd64', 'amd64'), ('powerpc', 'powerpc'), ('psp', 'mips'), ('mingw32', 'x86'), ('ppu', 'powerpc'), ('spu', 'po... |
'of': (str, ''), | 'of': (str, 'hb'), | def subscribe(self, req, form): """Subscribe to a basket pseudo-interface.""" |
'of': (str, ''), | 'of': (str, 'hb'), | def unsubscribe(self, req, form): """Unsubscribe from basket pseudo-interface.""" |
out += create_html_link(CFG_SITE_URL + '/record/' + str(bfo.recID) + '/edit/', urlargd={'ln': bfo.lang, 'recid': str(bfo.recID)}, link_label=_("Edit This Record"), linkattrd=linkattrd) | out += create_html_link(CFG_SITE_URL + '/record/edit/? {}, link_label=_("Edit This Record"), linkattrd=linkattrd) | def format(bfo, style): """ Prints a link to BibEdit, if authorization is granted @param style: the CSS style to be applied to the link. """ _ = gettext_set_language(bfo.lang) out = "" user_info = bfo.user_info collection = guess_primary_collection_of_a_record(bfo.recID) (auth_code, auth_message) = acc_authorize_act... |
revising_options.add_option("--append", dest='append_path', help='specify the URL/path of the file that will appended to the bibdoc', metavar='PATH/URL') | revising_options.add_option("--append", dest='append_path', help='specify the URL/path of the file that will appended to the bibdoc (implies --with-empty-recs=yes)', metavar='PATH/URL') | def _date_range_callback(option, opt, value, parser): """Callback for optparse to parse a range of dates in the form [date1],[date2]. Both date1 and date2 could be optional. the date can be expressed absolutely ("%Y-%m-%d %H:%M:%S") or relatively (([-\+]{0,1})([\d]+)([dhms])) to the current time.""" try: value = _parse... |
task = task_low_level_submission('bibupload', 'bibdocfile', '-a', tmp_file_name, '-N', 'FFT', '-S2', '-v9') | task = task_low_level_submission('bibupload', 'bibdocfile', '-a', tmp_file_name, '-N', 'FFT', '-S2') | def bibupload_ffts(ffts, append=False, debug=False): """Given an ffts dictionary it creates the xml and submit it.""" xml = ffts_to_xml(ffts) if xml: print xml tmp_file_fd, tmp_file_name = mkstemp(suffix='.xml', prefix="bibdocfile_%s" % time.strftime("%Y-%m-%d_%H:%M:%S"), dir=CFG_TMPDIR) os.write(tmp_file_fd, xml) os.c... |
if fi and CFG_WEBSEARCH_FIELDS_CONVERT.has_key(string.lower(fi)): fi = CFG_WEBSEARCH_FIELDS_CONVERT[string.lower(fi)] | fi = wash_field(fi) | def create_basic_search_units(req, p, f, m=None, of='hb'): """Splits search pattern and search field into a list of independently searchable units. - A search unit consists of '(operator, pattern, field, type, hitset)' tuples where 'operator' is set union (|), set intersection (+) or set exclusion (-); 'pattern' is eit... |
f = string.strip(f) if CFG_WEBSEARCH_FIELDS_CONVERT.has_key(string.lower(f)): f = CFG_WEBSEARCH_FIELDS_CONVERT[f] | if f: f = f.strip() if CFG_WEBSEARCH_FIELDS_CONVERT: f = CFG_WEBSEARCH_FIELDS_CONVERT.get(f, f) | def wash_field(f): """Wash field passed by URL.""" # get rid of unnecessary whitespace: f = string.strip(f) # wash old-style CDS Invenio/ALEPH 'f' field argument, e.g. replaces 'wau' and 'au' by 'author' if CFG_WEBSEARCH_FIELDS_CONVERT.has_key(string.lower(f)): f = CFG_WEBSEARCH_FIELDS_CONVERT[f] return f |
if CFG_WEBSEARCH_FIELDS_CONVERT.has_key(string.lower(f)): f = CFG_WEBSEARCH_FIELDS_CONVERT[string.lower(f)] | def search_unit_in_bibxxx(p, f, type): """Searches for pattern 'p' inside bibxxx tables for field 'f' and returns hitset of recIDs found. The search type is defined by 'type' (e.g. equals to 'r' for a regexp search).""" # FIXME: quick hack for the journal index if f == 'journal': return search_unit_in_bibwords(p, f) ... | |
expected_args = inspect.getargspec(module_globals[possible_handler])[0] | inspected_args = inspect.getargspec(module_globals[possible_handler]) expected_args = list(inspected_args[0]) expected_defaults = list(inspected_args[3]) expected_args.reverse() expected_defaults.reverse() | def mp_legacy_publisher(req, possible_module, possible_handler): """ mod_python legacy publisher minimum implementation. """ the_module = open(possible_module).read() module_globals = {} exec(the_module, module_globals) if possible_handler in module_globals and callable(module_globals[possible_handler]): from invenio.w... |
for arg in expected_args: | for index, arg in enumerate(expected_args): | def mp_legacy_publisher(req, possible_module, possible_handler): """ mod_python legacy publisher minimum implementation. """ the_module = open(possible_module).read() module_globals = {} exec(the_module, module_globals) if possible_handler in module_globals and callable(module_globals[possible_handler]): from invenio.w... |
cleaned_form[arg] = form.get(arg, None) | if index < len(expected_defaults): cleaned_form[arg] = form.get(arg, expected_defaults[index]) else: cleaned_form[arg] = form.get(arg, None) | def mp_legacy_publisher(req, possible_module, possible_handler): """ mod_python legacy publisher minimum implementation. """ the_module = open(possible_module).read() module_globals = {} exec(the_module, module_globals) if possible_handler in module_globals and callable(module_globals[possible_handler]): from invenio.w... |
harvestpath = CFG_TMPDIR + "/oaiharvest" + str(os.getpid()) | harvestpath = CFG_TMPDIR + "/oaiharvest" + str(os.getpid()) + '_' + str(j) | def task_run_core(): """Run the harvesting task. The row argument is the Bibharvest task queue row, containing if, arguments, etc. Return 1 in case of success and 0 in case of failure. """ reposlist = [] datelist = [] dateflag = 0 ### go ahead: build up the reposlist if task_get_option("repository") is not None: ### ... |
convertpath = convert_dir + os.sep +"bibconvertrun" + \ str(os.getpid()) | convertpath = convert_dir + os.sep + "bibconvertrun" + \ str(os.getpid()) + '_' + str(j) | def task_run_core(): """Run the harvesting task. The row argument is the Bibharvest task queue row, containing if, arguments, etc. Return 1 in case of success and 0 in case of failure. """ reposlist = [] datelist = [] dateflag = 0 ### go ahead: build up the reposlist if task_get_option("repository") is not None: ### ... |
def call_bibupload(marcxmlfile, mode="-r -i"): | def call_bibupload(marcxmlfile, mode = None): | def call_bibupload(marcxmlfile, mode="-r -i"): """Call bibupload in insert mode on MARCXMLFILE.""" if os.path.exists(marcxmlfile): command = '%s/bibupload -u oaiharvest %s %s ' % (CFG_BINDIR, mode, marcxmlfile) return os.system(command) else: write_message("marcxmlfile %s does not exist" % marcxmlfile) return 1 |
assert(_add_new_format(bibdoc, url, format, docname, description, doctype, newname, description, comment)) | assert(_add_new_format(bibdoc, url, format, docname, doctype, newname, description, comment)) | def _add_new_icon(bibdoc, url, restriction): """Adds a new icon to an existing bibdoc, replacing the previous one if it exists. If url is empty, just remove the current icon.""" if not url: bibdoc.delete_icon() else: try: path = urllib2.urlparse.urlsplit(url)[2] filename = os.path.split(path)[-1] format = filename[len(... |
The idea is to first produce big snippets with grep and narrow them | The idea is to first produce big snippets with grep and then narrow them using the cut_out_snippet function. | def get_text_snippets(textfile_path, patterns, nb_words_around, max_snippets, \ right_boundary = True): """ Extract text snippets around 'patterns' from file found at 'textfile_path' The snippets are meant to look like in the results of the popular search engine: using " ... " between snippets. For empty patterns it re... |
small_snippet = cut_out_snippet(s, escaped_keywords, nb_words_around, \ words_left, right_boundary) words_left -= len(small_snippet.split()) result.append(small_snippet) | if words_left > 0: (small_snippets, words_left) = cut_out_snippet(s, escaped_keywords, \ nb_words_around, words_left, right_boundary) result += small_snippets | def get_text_snippets(textfile_path, patterns, nb_words_around, max_snippets, \ right_boundary = True): """ Extract text snippets around 'patterns' from file found at 'textfile_path' The snippets are meant to look like in the results of the popular search engine: using " ... " between snippets. For empty patterns it re... |
while nb_words_around * 2 + 1 > max_words: nb_words_around -= 1 if nb_words_around < 1: return "" | snippets = [] | def matches_any(w1): if compiled_pattern.search(' ' + w1 + ' '): return True else: return False |
while i < len(words): | while i < len(words) and max_words > 3: while nb_words_around * 2 + 1 > max_words: nb_words_around -= 1 if nb_words_around == 0: break | def matches_any(w1): if compiled_pattern.search(' ' + w1 + ' '): return True else: return False |
snippet = highlight_matches(snippet, compiled_pattern) snippet_words = snippet.split() length = len(snippet_words) if (length > max_words): j = 0 shorter_snippet = "" while j < max_words: shorter_snippet += " " + snippet_words[j] j += 1 return shorter_snippet else: return snippet | if snippet != "" and i < len(words) and not matches_any(words[i]): max_words -= len(snippet.split()) snippets.append(highlight_matches(snippet, compiled_pattern)) snippet = "" return (snippets, max_words) | def matches_any(w1): if compiled_pattern.search(' ' + w1 + ' '): return True else: return False |
'/record/edit/? | '/record/edit/?ln=%s | def format_element(bfo, style): """ Prints a link to BibEdit, if authorization is granted @param style: the CSS style to be applied to the link. """ _ = gettext_set_language(bfo.lang) out = "" user_info = bfo.user_info collection = guess_primary_collection_of_a_record(bfo.recID) (auth_code, auth_message) = acc_autho... |
to_str(dt.replace(year=dt.year-1,month=(dt.month+1) % 12)), to_str(dt.replace(month=(dt.month+1) % 12)), | to_str(dt.replace(year=dt.year-1,month=(dt.month+1) % 12, day=1)), to_str(dt.replace(month=(dt.month+1) % 12, day=1)), | def _get_timespans(dt=None): """ Helper function that generates possible time spans to be put in the drop-down in the generation box. Computes possible years, and also some pre-defined simpler values. Some items in the list returned also tweaks the output graph, if any, since such values are closely related to the natu... |
expected_text='No word index is available for <em><SCRIPT>alert("XSS");</SCRIPT></em>.')) | expected_text='No word index is available for <em><script>alert("xss");</script></em>.')) | def test_xss_in_structured_search(self): """websearch - no XSS vulnerability in structured search""" self.assertEqual([], test_web_page_content(CFG_SITE_URL + '/search?p=%3CSCRIPT%3Ealert%28%22XSS%22%29%3B%3C%2FSCRIPT%3E&f=%3CSCRIPT%3Ealert%28%22XSS%22%29%3B%3C%2FSCRIPT%3E', expected_text='No word index is available fo... |
expected_text='Search term <em><SCRIPT>alert("XSS");</SCRIPT></em> inside index <em><SCRIPT>alert("XSS");</SCRIPT></em> did not match any record.')) | expected_text='Search term <em><SCRIPT>alert("XSS");</SCRIPT></em> inside index <em><script>alert("xss");</script></em> did not match any record.')) | def test_xss_in_advanced_search(self): """websearch - no XSS vulnerability in advanced search""" self.assertEqual([], test_web_page_content(CFG_SITE_URL + '/search?as=1&p1=ellis&f1=author&op1=a&p2=%3CSCRIPT%3Ealert%28%22XSS%22%29%3B%3C%2FSCRIPT%3E&f2=%3CSCRIPT%3Ealert%28%22XSS%22%29%3B%3C%2FSCRIPT%3E&m2=e', expected_te... |
print stemmed_patterns | def get_pdf_snippets(recID, patterns, nb_words_around=CFG_WEBSEARCH_FULLTEXT_SNIPPETS_WORDS, max_snippets=CFG_WEBSEARCH_FULLTEXT_SNIPPETS): """ Extract text snippets around 'patterns' from the newest PDF file of 'recID' The search is case-insensitive. The snippets are meant to look like in the results of the popular se... | |
elem['sons'].append(getCatalogueBranch(child_collctn[0], level + 1), user_info) | elem['sons'].append(getCatalogueBranch(child_collctn[0], level + 1, user_info)) | def getCatalogueBranch(id_father, level, user_info): """Build up a given branch of the submission-collection tree. I.e. given a parent submission-collection ID, build up the tree below it. This tree will include doctype-children, as well as other submission- collections and their children. Finally, return the branch as... |
ORDER BY %s ASC LIMIT %%s""" % (col, col, col), | ORDER BY %s DESC LIMIT %%s""" % (col, col, col), | def get_nearest_terms_in_bibrec(p, f, n_below, n_above): """Return list of nearest terms and counts from bibrec table. p is usually a date, and f either datecreated or datemodified. Note: below/above count is very approximative, not really respected. """ col = 'creation_date' if f == 'datemodified': col = 'modificatio... |
return list(out) | out_list = list(out) out_list.sort() return list(out_list) | def get_nearest_terms_in_bibrec(p, f, n_below, n_above): """Return list of nearest terms and counts from bibrec table. p is usually a date, and f either datecreated or datemodified. Note: below/above count is very approximative, not really respected. """ col = 'creation_date' if f == 'datemodified': col = 'modificatio... |
recid_to_display = get_fieldvalues(recIDs[irec], CFG_BIBUPLOAD_EXTERNAL_SYSNO_TAG)[0] else: recid_to_display = recIDs[irec] | try: recid_to_display = get_fieldvalues(recid, CFG_BIBUPLOAD_EXTERNAL_SYSNO_TAG)[0] except IndexError: pass | def print_records(req, recIDs, jrec=1, rg=10, format='hb', ot='', ln=CFG_SITE_LANG, relevances=[], relevances_prologue="(", relevances_epilogue="%%)", decompress=zlib.decompress, search_pattern='', print_records_prologue_p=True, print_records_epilogue_p=True, verbose=0, tab=''): """ Prints list of records 'recIDs' for... |
citedbynum = get_cited_by_count(recid_to_display) | citedbynum = get_cited_by_count(recid) | def print_records(req, recIDs, jrec=1, rg=10, format='hb', ot='', ln=CFG_SITE_LANG, relevances=[], relevances_prologue="(", relevances_epilogue="%%)", decompress=zlib.decompress, search_pattern='', print_records_prologue_p=True, print_records_epilogue_p=True, verbose=0, tab=''): """ Prints list of records 'recIDs' for... |
tmprec = get_record(recid_to_display) | tmprec = get_record(recid) | def print_records(req, recIDs, jrec=1, rg=10, format='hb', ot='', ln=CFG_SITE_LANG, relevances=[], relevances_prologue="(", relevances_epilogue="%%)", decompress=zlib.decompress, search_pattern='', print_records_prologue_p=True, print_records_epilogue_p=True, verbose=0, tab=''): """ Prints list of records 'recIDs' for... |
from bibclassify_webinterface import \ | from invenio.bibclassify_webinterface import \ | def print_records(req, recIDs, jrec=1, rg=10, format='hb', ot='', ln=CFG_SITE_LANG, relevances=[], relevances_prologue="(", relevances_epilogue="%%)", decompress=zlib.decompress, search_pattern='', print_records_prologue_p=True, print_records_epilogue_p=True, verbose=0, tab=''): """ Prints list of records 'recIDs' for... |
lowfile = afile.lower() ext = '.' while ext: ext = '' for c_ext in _extensions: if lowfile.endswith(c_ext): lowfile = lowfile[0:-len(c_ext)] ext = c_ext break return afile[:len(lowfile)] | nextfile = _extensions.sub('', afile) if nextfile == afile: nextfile = os.path.splitext(afile)[0] while nextfile != afile: afile = nextfile nextfile = _extensions.sub('', afile) return nextfile | def file_strip_ext(afile): """Strip in the best way the extension from a filename""" lowfile = afile.lower() ext = '.' while ext: ext = '' for c_ext in _extensions: if lowfile.endswith(c_ext): lowfile = lowfile[0:-len(c_ext)] ext = c_ext break return afile[:len(lowfile)] |
'defaultSelectedDoctype': doctypes[0], | 'defaultSelectedDoctype': cleaned_doctypes[0], | def create_file_upload_interface(recid, form=None, print_outside_form_tag=True, print_envelope=True, include_headers=False, ln=CFG_SITE_LANG, minsize='', maxsize='', doctypes_and_desc=None, can_delete_doctypes=None, can_revise_doctypes=None, can_describe_doctypes=None, can_comment_doctypes=None, can_keep_doctypes=None,... |
for htag in myhiddens: ltag = len(htag) samelenfield = bsu_f[0:ltag] if samelenfield == htag: basic_search_unit_hitset = HitSet() if verbose >= 9 and of.startswith("h"): print_warning(req, "Pattern %s hitlist omitted since it queries a hidden tag in %s" % basic_search_unit_hitset, str(myhiddens)) | if bsu_f and len(bsu_f) > 1 and bsu_f[0].isdigit() and bsu_f[1].isdigit(): for htag in myhiddens: ltag = len(htag) samelenfield = bsu_f[0:ltag] if samelenfield == htag: basic_search_unit_hitset = HitSet() if verbose >= 9 and of.startswith("h"): print_warning(req, "Pattern %s hitlist omitted since \ it queries in a hid... | def search_pattern(req=None, p=None, f=None, m=None, ap=0, of="id", verbose=0, ln=CFG_SITE_LANG, display_nearest_terms_box=True): """Search for complex pattern 'p' within field 'f' according to matching type 'm'. Return hitset of recIDs. The function uses multi-stage searching algorithm in case of no exact match foun... |
res = run_sql("DELETE FROM rnkMETHODDATA WHERE id_rnkMETHOD=%s", (id[0][0], )) | run_sql("DELETE FROM rnkMETHODDATA WHERE id_rnkMETHOD=%s", (id[0][0], )) | def del_rank_method_codeDATA(rank_method_code): """Delete the data for a rank method""" id = run_sql("SELECT id from rnkMETHOD where name=%s", (rank_method_code, )) res = run_sql("DELETE FROM rnkMETHODDATA WHERE id_rnkMETHOD=%s", (id[0][0], )) |
res = run_sql("SELECT relevance_data FROM rnkMETHODDATA WHERE id_rnkMETHOD=%s", (id[0][0] )) | res = run_sql("SELECT relevance_data FROM rnkMETHODDATA WHERE id_rnkMETHOD=%s", (id[0][0], )) | def del_recids(rank_method_code, range_rec): """Delete some records from the rank method""" id = run_sql("SELECT id from rnkMETHOD where name=%s", (rank_method_code, )) res = run_sql("SELECT relevance_data FROM rnkMETHODDATA WHERE id_rnkMETHOD=%s", (id[0][0] )) if res: rec_dict = deserialize_via_marshal(res[0][0]) writ... |
if snippet: | if snippet and count < max_snippets: | def get_text_snippets(textfile_path, patterns, nb_words_around, max_snippets, \ right_boundary = True): """ Extract text snippets around 'patterns' from file found at 'textfile_path' The snippets are meant to look like in the results of the popular search engine: using " ... " between snippets. For empty patterns it re... |
if nb_words_around == 0: break | def matches_any(w1): if compiled_pattern.search(' ' + w1 + ' '): return True else: return False | |
"Cannot analyse keywords." % (ontology, collection), stream=sys.stderr, verbose=0) | "Cannot analyse keywords." % collection, stream=sys.stderr, verbose=0) | def _get_recids_foreach_ontology(recids=None, collections=None, taxonomy=None): """Returns an array containing hash objects containing the collection, its corresponding ontology and the records belonging to the given collection.""" rec_onts = [] # User specified record IDs. if recids: rec_onts.append({ 'ontology': tax... |
resultHtml = oha.perform_request_gethpyears(elements[0], filer); | resultHtml = oha.perform_request_gethpyears(elements[0], filter); | def getHoldingPenData(req, elementId): try: uid = getUid(req) except Error, e: return "unauthorised access !" auth = check_user(req,'cfgoaiharvest') if auth[0]: return "unauthorised access !" elements = elementId.split("_") prefix = elements[0] resultHtml = None additionalData = None if len(elements) == 2: filter = e... |
<Url type="application/opensearchdescription+xml" rel="self" template="%(CFG_SITE_URL)s/search/opensearchdescription" /> | <Url type="application/opensearchdescription+xml" rel="self" template="%(CFG_SITE_URL)s/opensearchdescription" /> | def tmpl_opensearch_description(self, ln): """ Returns the OpenSearch description file of this site. """ _ = gettext_set_language(ln) return """<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/"> |
<ttl>%(timetolive)s</ttl>%(previous_link)s%(next_link)s%(current_link)s%(total_results)s%(start_index)s%(total_results)s | <ttl>%(timetolive)s</ttl>%(previous_link)s%(next_link)s%(current_link)s%(total_results)s%(start_index)s%(items_per_page)s | def tmpl_xml_rss_prologue(self, current_url=None, previous_url=None, next_url=None, first_url=None, last_url=None, nb_found=None, jrec=None, rg=None): """Creates XML RSS 2.0 prologue.""" out = """<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://pur... |
<url type="application/rss+xml" indexOffset="1" rel="results" template="%(search_syntax)s" /> <atom:link rel="search" href="%(siteurl)s/search/opensearchdescription" type="application/opensearchdescription+xml" title="Content Search" /> | <atom:link rel="search" href="%(siteurl)s/opensearchdescription" type="application/opensearchdescription+xml" title="Content Search" /> | def tmpl_xml_rss_prologue(self, current_url=None, previous_url=None, next_url=None, first_url=None, last_url=None, nb_found=None, jrec=None, rg=None): """Creates XML RSS 2.0 prologue.""" out = """<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://pur... |
'total_results': (rg and \ | 'items_per_page': (rg and \ | def tmpl_xml_rss_prologue(self, current_url=None, previous_url=None, next_url=None, first_url=None, last_url=None, nb_found=None, jrec=None, rg=None): """Creates XML RSS 2.0 prologue.""" out = """<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://pur... |
select_row.append("""<select name="bool%d"> <option value="and">AND</option> <option value="or">OR</option> <option value="and_not">AND NOT</option> </select>""" % i) | select_row.append(self._tmpl_select_box(operators, "", "bool%d"%i, bool)) | def tmpl_customevent_box(self, options, choosed, ln=CFG_SITE_LANG): """ Generates a FORM box with dropdowns for customevents. |
else: | elif explaination: | def _tmpl_select_box(self, iterable, explaination, name, preselected, multiple=False, attribute="", ln=CFG_SITE_LANG): """ Generates a HTML SELECT drop-down menu. |
<th class="portalboxheader"><small>%(for)s</small> | <th class="portalboxheader">%(for)s | def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. |
%(docname)s<br /> | <br/> <br/><h3>%(docname)s</h3> | def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. |
'id' : _("Id"), | 'id' : _("Subm.No."), | def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. |
else: if submission['pending']: reference = submission['reference'] else: | if not submission['pending']: | def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. |
}, submission['reference']) | }, submission['reference']) else: reference = """<font color="red">%s</font>""" % _("Reference not yet given") | def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. |
<small>%(actname)s</small> | %(actname)s | def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. |
<small>%(status)s</small> | %(status)s | def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. |
<small>%(idtext)s</small> | %(idtext)s | def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. |
<small> %(reference)s</small> | %(reference)s | def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. |
<small>%(cdate)s</small> | %(cdate)s | def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. |
<small>%(mdate)s</small> | %(mdate)s | def tmpl_yoursubmissions(self, ln, order, doctypes, submissions): """ Displays the list of the user's submissions. |
elif o[0] in ("-z", "--raw-citations"): | elif o[0] in ("-z", "--raw-references"): | def get_cli_options(): """Get the various arguments and options from the command line and populate a dictionary of cli_options. @return: (tuple) of 2 elements. First element is a dictionary of cli options and flags, set as appropriate; Second element is a list of cli arguments. """ global cli_opts ## dictionary of impo... |
expected_text="[57, 79, 88]")) | expected_text="[57, 79, 80, 88]")) | def test_special_terms_u1_and_sl_or_parens(self): """websearch - query for special terms, (U(1) OR SL(2,Z))""" self.assertEqual([], test_web_page_content(CFG_SITE_URL + '/search?of=id&p=%28U%281%29+OR+SL%282%2CZ%29%29', expected_text="[57, 79, 88]")) |
out = re.sub(par[0], value) | out = re.sub(par[0], par[1], value) | def FormatField(value, fn): """ bibconvert formatting functions: ================================ ADD(prefix,suffix) - add prefix/suffix KB(kb_file,mode) - lookup in kb_file and replace value ABR(N,suffix) - abbreviate to N places with suffix ABRX() - abbreviate ex... |
out = re.sub(par[0], value) | out = re.sub(par[0], par[1], value) | def format_field(value, fn): """ bibconvert formatting functions: ================================ ADD(prefix,suffix) - add prefix/suffix KB(kb_file,mode) - lookup in kb_file and replace value ABR(N,suffix) - abbreviate to N places with suffix ABRX() - abbreviate e... |
tmptext = convert_file(tmpdoc, format='.txt') | tmptext = convert_file(tmpdoc, output_format='.txt') | def get_words_from_fulltext(url_direct_or_indirect, stemming_language=None): """Returns all the words contained in the document specified by URL_DIRECT_OR_INDIRECT with the words being split by various SRE_SEPARATORS regexp set earlier. If FORCE_FILE_EXTENSION is set (e.g. to "pdf", then treat URL_DIRECT_OR_INDIRECT a... |
bibconvert.FormatField("Hello world!", "EXP(//[abcd]+//,1)")) | bibconvert.FormatField("Hello world! abc", "EXP(//[oz]+//,0)")) self.assertEqual("Hello world!", bibconvert.FormatField("Hello world!", "EXP(//[abc]+//,1)")) | def test_ff_regex(self): """bibconvert - formatting functions with regular expression""" self.assertEqual("Hello world!", bibconvert.FormatField("Hellx wyrld!", "REP(//[xy]//,o)")) self.assertEqual("Hello world!", bibconvert.FormatField("Hello world!", "REP(//[abc]//,o)")) self.assertEqual("Hello world!", bibconvert.Fo... |
write_message('generated ' + squash_path) | squash_fd = open(squash_path, "a") squash_fd.write("</collection>\n") squash_fd.close() write_message("generated %s" % (squash_path,)) | def main(): """ The main program loop. """ help_param = 'help' verbose_param = 'verbose' tarball_param = 'tarball' tardir_param = 'tdir' infile_param = 'input' sdir_param = 'sdir' extract_text_param = 'extract-text' force_param = 'force' upload_param = 'call-bibupload' yes_i_know_param = 'yes-i-know' recid_param = 'rec... |
marc_name = os.path.join(sub_dir, refno + '.xml') | marc_name = os.path.join(sub_dir, '%s.xml' % (refno,)) | def process_single(tarball, sdir = CFG_TMPDIR, xtract_text = False, \ upload_plots = False, force = False, squash = "", \ yes_i_know = False, refno_url = "", \ clean = False): """ Processes one tarball end-to-end. @param: tarball (string): the absolute location of the tarball we wish to process @param: sdir (string): ... |
write_message('Timeout during tarball extraction on ' + tarball) | write_message('Timeout during tarball extraction on %s' % (tarball,)) | def process_single(tarball, sdir = CFG_TMPDIR, xtract_text = False, \ upload_plots = False, force = False, squash = "", \ yes_i_know = False, refno_url = "", \ clean = False): """ Processes one tarball end-to-end. @param: tarball (string): the absolute location of the tarball we wish to process @param: sdir (string): ... |
write_message(os.path.split(tarball)[-1] + ' is not a tarball') | write_message('%s is not a tarball' % (os.path.split(tarball)[-1],)) | def process_single(tarball, sdir = CFG_TMPDIR, xtract_text = False, \ upload_plots = False, force = False, squash = "", \ yes_i_know = False, refno_url = "", \ clean = False): """ Processes one tarball end-to-end. @param: tarball (string): the absolute location of the tarball we wish to process @param: sdir (string): ... |
write_message('No plots detected in ' + refno) | write_message('No plots detected in %s' % (refno,)) | def process_single(tarball, sdir = CFG_TMPDIR, xtract_text = False, \ upload_plots = False, force = False, squash = "", \ yes_i_know = False, refno_url = "", \ clean = False): """ Processes one tarball end-to-end. @param: tarball (string): the absolute location of the tarball we wish to process @param: sdir (string): ... |
marc_fd.write('%s\n</collection>\n' % (marc_xml,)) | marc_fd.write('%s\n' % (marc_xml,)) | def process_single(tarball, sdir = CFG_TMPDIR, xtract_text = False, \ upload_plots = False, force = False, squash = "", \ yes_i_know = False, refno_url = "", \ clean = False): """ Processes one tarball end-to-end. @param: tarball (string): the absolute location of the tarball we wish to process @param: sdir (string): ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.