Skip to content

Handling nested folder structure and directly overwriting originals#15

Open
jotelha wants to merge 4 commits intocycomanic:masterfrom
jotelha:master
Open

Handling nested folder structure and directly overwriting originals#15
jotelha wants to merge 4 commits intocycomanic:masterfrom
jotelha:master

Conversation

@jotelha
Copy link

@jotelha jotelha commented Jan 29, 2019

For me, a few modifications were necessary to

  • have it properly overwrite originals if in- and output PDF are the same:
    previously, the content was lost in such a case. Now, this is circumvented via a temporary file.
  • preserve a possible nested multilevel folder structure containing the PDF:
    my PDF were not within the Mendeley data folder, but somewhere else, within author name subdirectories.
  • handle exotic UTF-8 file names properly:
    it did not read or write i.e. Chinese PDF names on my system. Using
    .encode(sys.getfilesystemencoding()) wherever a file is accessed or the name displayed works fine.

Also, the README now references several Mendeley -> Zotero migration guides, introducing the approach that worked for me.

@cycomanic
Copy link
Owner

thanks merged

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

Successfully merging this pull request may close these issues.

2 participants