def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) bname = smart_decode(options.get('bname')) release = smart_decode(options.get('release')) create_code_local(pname, bname, release) if options.get('link', False): link_eclipse(pname, bname, release)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) bname = smart_decode(options.get('bname')) release = smart_decode(options.get('release')) parser = smart_decode(options.get('parser')) pinput = smart_decode(options.get('input')) parse_code(pname, bname, release, parser, pinput)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) dname = smart_decode(options.get('dname')) release = smart_decode(options.get('release')) url = smart_decode(options.get('url')) syncer = smart_decode(options.get('syncer')) create_doc_local(pname, dname, release, syncer, url)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) bname = smart_decode(options.get('bname')) release = smart_decode(options.get('release')) fqn = smart_decode(options.get('fqn')) add_a_filter(pname, bname, release, fqn, not options.get('no-snippet'), options.get('one-ref-only'))
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) cname = smart_decode(options.get('cname')) start = options.get('start') end = options.get('end') if start == -1: start = None if end == -1: end = None force = options.get('force') toc_download_section(pname, cname, start, end, force)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) cname = smart_decode(options.get('cname')) start = options.get('start') end = options.get('end') if start == -1: start = None if end == -1: end = None force = options.get('force') toc_download_entries(pname, cname, start, end, force)
def get_recursive_text(element, text_parts): # Terminal if element.tag == 'pre': text_parts.append('') text_parts.append(XTEXT(element)) text_parts.append('') # Terminal elif element.tag == 'br': tail = element.tail # This is a lone <br> if tail is None: text_parts.append('') else: text_parts.append(smart_decode(tail).strip()) else: if element.tag in PARAGRAPHS: text_parts.append('') text = element.text if text is None: text = '' # If it is a paragraph, separate the content. # Otherwise, inline the content with previous line. if element.tag in PARAGRAPHS or len(text_parts) == 0: text_parts.append(smart_decode(text).strip()) else: text_parts[-1] = '{0} {1}'.format(text_parts[-1], smart_decode(text).strip()) for child in element: get_recursive_text(child, text_parts) if element.tag in PARAGRAPHS: text_parts.append('') tail = element.tail if tail is None: tail = '' # If it is a paragraph, separate the content. # Otherwise, inline the content with previous line. if element.tag in PARAGRAPHS or len(text_parts) == 0: text_parts.append(smart_decode(tail).strip()) else: text_parts[-1] = '{0} {1}'.format(text_parts[-1], smart_decode(tail).strip())
def get_recursive_text(element, text_parts): # Terminal if element.tag == "pre": text_parts.append("") text_parts.append(XTEXT(element)) text_parts.append("") # Terminal elif element.tag == "br": tail = element.tail # This is a lone <br> if tail is None: text_parts.append("") else: text_parts.append(smart_decode(tail).strip()) else: if element.tag in PARAGRAPHS: text_parts.append("") text = element.text if text is None: text = "" # If it is a paragraph, separate the content. # Otherwise, inline the content with previous line. if element.tag in PARAGRAPHS or len(text_parts) == 0: text_parts.append(smart_decode(text).strip()) else: text_parts[-1] = "{0} {1}".format(text_parts[-1], smart_decode(text).strip()) for child in element: get_recursive_text(child, text_parts) if element.tag in PARAGRAPHS: text_parts.append("") tail = element.tail if tail is None: tail = "" # If it is a paragraph, separate the content. # Otherwise, inline the content with previous line. if element.tag in PARAGRAPHS or len(text_parts) == 0: text_parts.append(smart_decode(tail).strip()) else: text_parts[-1] = "{0} {1}".format(text_parts[-1], smart_decode(tail).strip())
def get_value(prefix, key, cache_function, args=None, expiration=DEFAULT_EXPIRATION_TIME): """Please note that even if CACHE_MIDDLEWARE_KEY_PREFIX is set in settings, the prefix is not appended to the key when manually using the cache so a prefix is required. """ global cache_total global cache_miss new_key = get_safe_key(smart_decode(prefix) + smart_decode(key)) value = cache.get(new_key, DEFAULT_EXPIRED) cache_total += 1 if value == DEFAULT_EXPIRED: cache_miss += 1 if args is None: value = cache_function() else: value = cache_function(*args) cache.set(new_key, value, expiration) return value
def get_value(prefix, key, cache_function, args=None, expiration=DEFAULT_EXPIRATION_TIME): '''Please note that even if CACHE_MIDDLEWARE_KEY_PREFIX is set in settings, the prefix is not appended to the key when manually using the cache so a prefix is required. ''' global cache_total global cache_miss new_key = get_safe_key(smart_decode(prefix) + smart_decode(key)) value = cache.get(new_key, DEFAULT_EXPIRED) cache_total += 1 if value == DEFAULT_EXPIRED: cache_miss += 1 if args is None: value = cache_function() else: value = cache_function(*args) cache.set(new_key, value, expiration) return value
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) cname = smart_decode(options.get('cname')) cfull_name = smart_decode(options.get('cfull_name')) url = smart_decode(options.get('url')) syncer = smart_decode(options.get('syncer')) parser = smart_decode(options.get('parser')) create_channel_db(pname, cfull_name, cname, syncer, parser, url) if (options.get('local', False)): create_channel_local(pname, cname, syncer, url)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) dname = smart_decode(options.get('dname')) release = smart_decode(options.get('release')) url = smart_decode(options.get('url')) syncer = smart_decode(options.get('syncer')) parser = smart_decode(options.get('parser')) create_doc_db(pname, dname, release, url, syncer, parser) if (options.get('local', False)): create_doc_local(pname, dname, release, syncer, url)
def handle_noargs(self, **options): file_path = smart_decode(options.get('file')) url = smart_decode(options.get('url')) create_filter_file(file_path, url)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) bname = smart_decode(options.get('bname')) release = smart_decode(options.get('release')) parser = smart_decode(options.get('parser')) clear_code_elements(pname, bname, release, parser)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) bname = smart_decode(options.get('bname')) release1 = smart_decode(options.get('release1')) release2 = smart_decode(options.get('release2')) diff_codebases(pname, bname, release1, release2)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) bname = smart_decode(options.get('bname')) release = smart_decode(options.get('release')) link_eclipse(pname, bname, release)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) dname = smart_decode(options.get('dname')) release = smart_decode(options.get('release')) sync_doc(pname, dname, release)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) cname = smart_decode(options.get('cname')) skip = options.get('skip_refs') entry_url = smart_decode(options.get('url')) debug_channel(pname, cname, not skip, entry_url)
def handle_noargs(self, **options): create_project_local(smart_decode(options.get('pname')))
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) parser = smart_decode(options.get('parser')) source = smart_decode(options.get('source')) parse_snippets(pname, source, parser)
def handle_noargs(self, **options): create_release_db(smart_decode(options.get('pname')), smart_decode(options.get('release')), options.get('is_major'))
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) cname = smart_decode(options.get('cname')) url = smart_decode(options.get('url')) syncer = smart_decode(options.get('syncer')) create_channel_local(pname, cname, syncer, url)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) cname = smart_decode(options.get('cname')) clear_channel_elements(pname, cname)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) bname = smart_decode(options.get('bname')) release = smart_decode(options.get('release')) filter_files = smart_decode(options.get('filters')) add_filter(pname, bname, release, filter_files)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) dname = smart_decode(options.get('dname')) release1 = smart_decode(options.get('release1')) release2 = smart_decode(options.get('release2')) diff_doc(pname, dname, release1, release2)
def func2(arg1, arg2): return su.smart_decode(arg1 + arg2)
def handle_noargs(self, **options): create_project_db(smart_decode(options.get('pfullname')), smart_decode(options.get('url')), smart_decode(options.get('pname'))) if (options.get('local', False)): create_project_local(smart_decode(options.get('pname')))
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) dname = smart_decode(options.get('dname')) release = smart_decode(options.get('release')) clear_doc_elements(pname, dname, release)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) cname = smart_decode(options.get('cname')) post_process_channel(pname, cname)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) cname = smart_decode(options.get('cname')) output_path = smart_decode(options.get('output')) json_snippet(pname, cname, output_path)
def set_value(prefix, key, value, expiration=DEFAULT_EXPIRATION_TIME): new_key = get_safe_key(smart_decode(prefix) + smart_decode(key)) cache.set(new_key, value, expiration)
def handle_noargs(self, **options): pname = smart_decode(options.get("pname")) bname = smart_decode(options.get("bname")) release = smart_decode(options.get("release")) filter_files = smart_decode(options.get("filters")) add_filter(pname, bname, release, filter_files)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) language = smart_decode(options.get('language')) source = smart_decode(options.get('source')) clear_snippets(pname, language, source)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) cname = smart_decode(options.get('cname')) skip = options.get('skip_refs') parse_channel(pname, cname, not skip)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) cname = smart_decode(options.get('cname')) toc_view(pname, cname)
def handle_noargs(self, **options): pname = smart_decode(options.get('pname')) dname = smart_decode(options.get('dname')) release = smart_decode(options.get('release')) skip = options.get('skip_refs') parse_doc(pname, dname, release, not skip)