Skip to content

Instantly share code, notes, and snippets.

@yeonhoyoon
yeonhoyoon / upload_csv_to_evernote.rb
Created June 19, 2022 12:34
Upload CSV file to Evernote
require 'evernote_oauth'
require 'csv'
developer_token 'asdf' # https://www.evernote.com/api/DeveloperToken.action
client = EvernoteOAuth::Client.new(token: developer_token, sandbox: false)
note_store = client.note_store
notebooks = note_store.listNotebooks
notebooks.each do |notebook|
puts "Notebook: #{notebook.name}"
@yeonhoyoon
yeonhoyoon / multipart.js
Last active May 10, 2024 14:41
Send multipart request from javascript
if (XMLHttpRequest.prototype.sendAsBinary === undefined) {
XMLHttpRequest.prototype.sendAsBinary = function(string) {
var bytes = Array.prototype.map.call(string, function(c) {
return c.charCodeAt(0) & 0xff;
});
this.send(new Uint8Array(bytes));
};
}
function sendMultiPartReqeust(filename, mimeType, imageData, message) {
@yeonhoyoon
yeonhoyoon / UploadTistoryToEvernote.py
Last active December 16, 2015 03:59
A script to upload Tistory backup XML file to Evernote. Developer token from Evernote required.
import re
import sys
from lxml import etree
from StringIO import StringIO
from evernote.edam.type import ttypes
from evernote.api.client import EvernoteClient
parser = etree.HTMLParser()
def convert_to_edml(text):