This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
import pathlib | |
from datetime import datetime | |
def post_save(model, os_path, contents_manager): | |
"""post-save hook for saving backups of jupyter files.""" | |
if model['type'] != 'notebook': | |
return # only do this for notebooks | |
directory, filename = os.path.split(os_path) |