def prepare(doc): """The panflute filter init method.""" global shift, workaround_level_overflow, workaround_level_underflow shift = int(get_arg(doc, 'sh_shift')) workaround_level_overflow = get_arg(doc, 'sh_workaround_level_overflow', 'True') == 'True' workaround_level_underflow = get_arg(doc, 'sh_workaround_level_underflow', 'False') == 'True'
def prepare(doc): """The panflute filter init method.""" global counters, output_file, ofh for _ in range(MIN_LEVEL, MAX_LEVEL): counters.append(0) output_file = get_arg(doc, 'ehs_output_file') ofh = open(output_file, "w")
def prepare(doc): """The panflute filter init method.""" global doc_path, id_prefix doc_path = get_arg(doc, 'll_doc_path') id_prefix = linearize_link_path(doc_path) # Add reference for the whole file at the top if id_prefix != '': # empty here, because the id_prefix will be added later in action() doc.content.insert(0, pf.Para(pf.RawInline('<a name=""/>')))
def prepare(doc): """The panflute filter init method.""" global max_level max_level = int(get_arg(doc, 'hp_max_level', '2'))
def prepare(doc): """The panflute filter init method.""" global prefix, file_name prefix = get_arg(doc, 'allp_prefix') file_name = get_arg(doc, 'allp_file')
def prepare(doc): """The panflute filter init method.""" global relative_only, ext_from, ext_to relative_only = get_arg(doc, 'rls_relative_only', 'True') == 'True' ext_from = get_arg(doc, 'rls_ext_from') ext_to = get_arg(doc, 'rls_ext_to')