Created
January 16, 2012 13:39
-
-
Save fmoralesc/1620920 to your computer and use it in GitHub Desktop.
import nv notes to vim-pad
This file contains 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
#/usr/bin/env python2 | |
from sys import argv | |
from os import listdir | |
from os.path import getmtime | |
from shutil import copy, move | |
def import_nv(rename=False): | |
op = move if rename else copy | |
files_to_import = filter(lambda i: not i.isdigit(), listdir(".")) | |
for f in files_to_import: | |
new_path = str(int(getmtime(f) * 1000000)) | |
op(f, new_path) | |
if __name__ == "__main__": | |
import_nv(argv[1] == "--rename") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment