dennis605
dennis605

Reputation: 210

Is there any way to export entire notebook in different parts

I'm looking for some possibility to export one evernote notebook to different parts like:

Notebook = Eingang (2000Notes)

Export to maybe

Because processing (i.E. importing to Onenote) often fails, cause there are too much, or too big notes in the ENEX files. Maybe there is some script or anything else that would work. Only by-hand exporting is not a proper way, cause I have notebooks with 14k+ notes in it. I hope my intention is getting clear. Thank you in advance for your help.

Upvotes: 0

Views: 232

Answers (1)

Ben Zotto
Ben Zotto

Reputation: 71018

If you are on a Mac, Evernote's AppleScript dictionary exposes an export verb that you can build a tool against. Here's a somewhat inelegant but functional AppleScript to do what you're looking for, just edit the batch size, the notebook name, and the path you want the ENEX files to land in:

tell application "Evernote"
    # Set batch size, notebook to export, and destination path
    set batchSize to 500
    set theNotebookName to "MyNotebook"
    set theExportFolder to "/tmp"

    # Enumerate the notes into batches and export them
    set theNotebook to the first notebook whose name is theNotebookName
    set theNotes to the notes in theNotebook
    set currentBatchIndex to 0
    set currentNoteIndex to 1
    repeat until currentNoteIndex = (count of theNotes)
        # Collect up to batchSize notes
        set thisExportBatch to {}
        repeat until ((count of thisExportBatch) = batchSize or (currentNoteIndex = (count of theNotes)))
            set currentItem to theNotes's item currentNoteIndex
            set thisExportBatch to thisExportBatch & {currentItem}
            set currentNoteIndex to currentNoteIndex + 1
        end repeat
        # Export this batch. Set the destination path to where you want them.
        set exportPath to (theExportFolder & "/" & theNotebookName & currentBatchIndex & ".enex")
        export thisExportBatch to exportPath
        set currentBatchIndex to (currentBatchIndex + 1)
    end repeat
end tell

I'm not sure what the equivalent would be on Windows but I expect there is some equivalent way to automate it.

Upvotes: 1

Related Questions