Skip to content

Instantly share code, notes, and snippets.

@lpm11
Created February 4, 2012 13:49
Show Gist options
  • Select an option

  • Save lpm11/1737954 to your computer and use it in GitHub Desktop.

Select an option

Save lpm11/1737954 to your computer and use it in GitHub Desktop.
Evernote のノート名一括置換
#!/bin/env ruby
#-*- coding: utf-8 -*-
require("rubygems");
require("appscript");
rules = {};
File.open("なんとやら.tsv","r").each { |line|
line.chomp!();
f,t = line.split(/\t/,2);
rules["#{f}"] = t;
puts("rule: #{f} -> #{t}");
}
evernote = Appscript.app("Evernote");
evernote.notebooks["ノートブック名"].notes.get.each { |note|
title = note.title.get();
if (rules.key?(title))
puts("#{title} -> #{rules[title]}");
note.title.set(rules[title]);
end
}
@lpm11

lpm11 commented Feb 4, 2012

Copy link
Copy Markdown
Author

TSV に従ってノート名を書き換えます :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment