Skip to content

thanks!! and here's a little batch script #1

@DustinWehr

Description

@DustinWehr

I had a lot of notebooks, so used this applescript to export them all: https://gist.github.com/activescott/bffe5e1850a52768b2c2d34fe40b568b
and then the following script export the notes of each notebook in different folders based on the filename.

#! /usr/bin/env python
import os

# Parameters
output_format = 'markdown'  # or 'text'
strip_this_prefix_from_filenames = "evernote-backup_17-01-21-13/55/07_"
strip_this_suffix_from_filenames = ".enex"
# the new folder name is the filename with the above fixed prefix and suffix stripped


start = len(strip_this_prefix_from_filenames)
end = len(strip_this_suffix_from_filenames)
for dirpath, dirnames, filenames in os.walk("."):
	for name in filenames:
		if name.endswith(".enex"):
			os.system('ever2text "{0}" --output "ever2text_output/{1}" --format {2}'.format(name, name[start:-end], output_format))

If you think it'd be useful enough for the next person who finds your code, I can make a pull request that adds a batch option in core.py, or feel free to do so yourself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions