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
GET http://localhost:50080/version | |
### | |
POST http://localhost:50080/render | |
Content-Type: application/json | |
{ | |
"template": {"paper": "A4"}, | |
"context": { |
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
body { | |
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", YuGothic, "ヒラギノ角ゴ ProN W3", Hiragino Kaku Gothic ProN, Arial, "メイリオ", Meiryo, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
background-color: white; | |
} | |
body > *:first-child { | |
margin-top: 0 !important; | |
} |
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 python | |
# -*- coding: utf-8 -*- | |
import os | |
import codecs | |
import html2text | |
USER_NAME = "<EVERNOTE_USER_NAME>" | |
APP_NAME = "Marked" | |
HOME = os.environ['HOME'] |
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
{ | |
"resources": { | |
"image": {"card": "./card.pdf"} | |
}, | |
"template": "./meishi.pdf", | |
"context": { | |
"card": [ | |
{ |
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
static int utf8to16(char* utf8, int utf8_bytes, wchar_t* utf16) | |
{ | |
int i = 0, j = 0; | |
while (i < utf8_bytes) { | |
char ch0 = utf8[i]; | |
if ((ch0 & 0x80) == 0x00) { | |
utf16[j++] = ch0 & 0x7F; | |
i += 1; | |
} else if ((ch0 & 0xE0) == 0xC0) { | |
utf16[j++] = ((ch0 & 0x1F) << 6) | (utf8[i+1] & 0x3F); |