コード例 #1
0
#!/usr/bin/env python
# coding=utf-8
import os

import sys

from annotation_manager.AnnotationManager import AnnotationManager

if __name__ == '__main__':
    manager = AnnotationManager(source=u"mendeley")

    library = manager.get_source_library()
    path = os.path.join(u"D:\\", u"Dokumenty", u"Mendeley Desktop",
                        u"Abdolmaleki et al. - Model-Based Relative Entropy Stochastic Search - 2015.pdf")
    document = library.get_document_by_path(path)

    annotations = document.get_annotations()

    print annotations
コード例 #2
0
#!/usr/bin/env python
# coding=utf-8
from __future__ import print_function

import os
import sys

from annotation_manager.AnnotationManager import AnnotationManager

if __name__ == '__main__':
    this_script_path = unicode(os.path.dirname(os.path.realpath(__file__)), sys.getfilesystemencoding())

    pocketbook_path = os.path.join(this_script_path, u'resources', u'pocketbook')

    source = u"pocketbook%s%s%s%s%s%s" % (
        os.pathsep, os.path.join(pocketbook_path, u"system"), os.sep,
        os.pathsep, os.path.join(pocketbook_path, u"external"), os.sep
    )

    manager = AnnotationManager(source=source, destination=u"mendeley")
    manager.sync_and_export_annotations()