org_to_asana.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:todo-sync 作者: tmurph 项目源码 文件源码
def behind_source(org_config_filename, verbose=False, dry_run=False):
    command = 'emacs'
    args = ['-batch',
            '-l', org_config_filename,
            '-l', 'ts-org-interaction.el',
            '--eval=(ts-repl)']
    spawn = pexpect.spawn(command, args, encoding='utf-8')
    emacs_repl_wrapper = pexpect.replwrap.REPLWrapper(
        spawn, "Lisp expression: ", None)

    if dry_run:
        o.DryRunSource.make_fn = make_fn
        source = o.DryRunSource.from_emacs_repl(emacs_repl_wrapper,
                                                verbose)
    else:
        o.Source.make_fn = make_fn
        source = o.Source.from_emacs_repl(emacs_repl_wrapper, verbose)

    source.get_tree = lambda: source.get_all_items(
        ['asana_id', 'asana_project_id'])

    return source
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号