Evernote do vim


10

Eu procuro uma maneira de editar notas do evernote do vim

Eu começo com isso

#!/bin/bash
evernoteDir="$HOME/Library/Application*Support/Evernote/data"
dataDir=$(ls -trlh $evernoteDir| tail -n 1| awk '{print $NF}')
contentDir="$evernoteDir/$dataDir/content"
file=$(ls -trlh $contentDir | tail -n 1| awk '{print $NF}')
vim -c 's/div>/div>\r/g' $contentDir/$file/content.html

https://gist.github.com/1256416

ou talvez crie um plugin vim para isso ...

você tem alguma sugestão?

EDIT :

para uma edição mais simples da nota do evernote no formato html, eu faço essa função vim

" Markup function {{{ 
    fun! MkdToHtml() "{{{
        " markdown to html
        silent! execute '%s/  $/<br\/>/g'
        silent! execute '%s/\*\*\(.*\)\*\*/<b>\1<\/b>/g'
        silent! execute '%s/\t*###\(.*\)/<H3>\1<\/H3>/g'
    endf "}}}
    command! -complete=command MkdToHtml call MkdToHtml()
    nn <silent> <leader>mm :MkdToHtml<CR>
" }}} 

e uma função vim para abrir a última nota editada

fun! LastEvernote() "{{{
    " a better solution is with evernote api
    let evernoteDir=expand("$HOME")."/Library/Application*Support/Evernote/data"
    let dataDir=system("ls -trlh ".evernoteDir."| tail -n 1| awk '{print $NF}'")
    let contentDir=evernoteDir."/".dataDir."/content"
    let contentDir=substitute(contentDir,"\n","",'g')
    let note=system("ls -trlh ".contentDir." | tail -n 1| awk '{print $NF}'")
    let note=substitute(note,"\n","",'g')
    sil! exec 'sp '.contentDir.'/'.note.'/content.html'
    sil! exec '1s/>/>\r/g'
    sil! exec '%s/<br.*\/>/<br\/>\r/g'
    sil! exec '%s/<\//\r<\//g'
    sil! exec 'g/^\s*$/d'
    normal gg
    sil! exec '1,4fo'
    sil! exec '$-1,$fo'
endf

https://gist.github.com/1289727


5
por que superusuário? se é uma questão de desenvolvimento.
juanpablo

Respostas:


1

Você já experimentou o Geeknote ( http://www.geeknote.me/ )

"Edite suas notas do Evernote com qualquer editor de console que você quiser - nano, vi, vim, mcedit, etc ... Salve as alterações e o Geeknote as carregará automaticamente no Evernote."

Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.