Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问要怎么实现pdf目录提取? #4

Open
TtlyLynzie opened this issue Jul 10, 2022 · 1 comment
Open

请问要怎么实现pdf目录提取? #4

TtlyLynzie opened this issue Jul 10, 2022 · 1 comment

Comments

@TtlyLynzie
Copy link

我看到源文档finder_PDFbookmark.py文件里有pdf目录提取的功能,请问要怎么实现?

@Emrys365
Copy link
Owner

如果你只是想临时使用的话,只要把那个 Python 脚本拷贝出来,然后把最底下的代码修改一下就可以了:

if __name__ == "__main__":
    import sys
    args = sys.argv
    if len(args) != 4:
        print("Usage: %s [pdf] [bookmark_txt]" % args[0])
    else:
        print(extractBookmark(args[1], args[2]))

如果想利用 workflow 来执行这个脚本,那就需要参考同目录下的 AppleScript 脚本 finder_PDFbookmark.scpt 新写一份自动化脚本,并在 load_actions.py 里面添加一行注册该操作的代码(参考第 107 行)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants