def html2bbcode(trn, post): global HAVE_RESIDUAL pid = trn._record['pid'] LOGGER.debug('html2bbcode pid {}'.format(pid)) DONE_POST.append( [pid, False]) HAVE_RESIDUAL = False LOGGER.setLevel(logging.WARN) new_post = unconvert_post(pid, post) if HAVE_RESIDUAL: RESIDUALS[-1][2] = post RESIDUALS[-1][3] = new_post DONE_POST[-1][1] = True return stringify(trn, new_post)
def topic_state(tnt, x): return stringify(tnt, x)
def physical_filename(trn, record): return stringify(trn, record['attach_file'][0:-8])
def real_filename(trn, record): return stringify(trn, record['attach_file'])