Files
Trilium/app.pyc

20 lines
4.7 KiB
Plaintext
Raw Normal View History

2017-05-22 20:43:45 -04:00
<03>
<EFBFBD>u#Yc@s<>ddlZddlZddlmZmZmZddlmZmZddl m
Z
d<00>Z ej d<00>Z e e _ee<00>Ze
e<00>ejd<00>d<00><00>Zee<00>Zd <00>Zd
<00>Zgd <00>Zgd <00>Zdd <00>Zdefd<00><00>YZejed<00>defd<00><00>YZejed<00>defd<00><00>YZejed<00>edkr|ejdd<00>ndS(i<><69><EFBFBD><EFBFBD>N(tFlasktrequesttsend_from_directory(tResourcetApi(tCORScCsmi}x`t|j<00>D]O\}}t||t<00>rStj||<19>||d<q||||d<qW|S(Ni(t enumeratet descriptiont
isinstancetbuffertbase64t b64encode(tcursortrowtdtidxtcol((s!/home/adam/notecase-webapp/app.pyt dict_factorys s demo.ncdbs/frontend/<path:path>cCs td|<00>S(Ntfrontend(R(tpath((s!/home/adam/notecase-webapp/app.pytsend_jsscCsodj|j<00><00>}djtdt|<00><14><00>}t|j<00><00>}td|d|d|d|<00>dS(Nt,t?s INSERT INTO s (s
) VALUES (t)(tjointkeystlisttlenttupletvaluestexecute(t tablenametrecRtquestion_marksR((s!/home/adam/notecase-webapp/app.pytinsertscCstd|d|g<00>dS(Ns DELETE FROM s WHERE note_id = ?(R(Rtnote_id((s!/home/adam/notecase-webapp/app.pytdelete$scCs tj<00>}|j||<00>dS(N(tconnR R(tsqltparamsR ((s!/home/adam/notecase-webapp/app.pyR's cCs(tj<00>}|j||<00>}|j<00>S(N(R%R Rtfetchall(R&R'R tquery((s!/home/adam/notecase-webapp/app.pyt
getResults+s cCs(tj<00>}|j||<00>}|j<00>S(N(R%R Rtfetchone(R&R'R R)((s!/home/adam/notecase-webapp/app.pytgetSingleResult0s tQuerycBseZd<00>ZRS(cCstjjd<00>}t|<00>S(NR&(RtargstgetR*(tselfR&((s!/home/adam/notecase-webapp/app.pyR/6s(t__name__t
__module__R/(((s!/home/adam/notecase-webapp/app.pyR-5ss/querytNotescBseZd<00>Zd<00>ZRS(cCsPitd|g<00>d6td|g<00>d6td|g<00>d6td|g<00>d6S( Ns%select * from notes where note_id = ?tdetails?select * from formatting where note_id = ? order by note_offsett
formattings:select * from links where note_id = ? order by note_offsettlinkss;select * from images where note_id = ? order by note_offsettimages(R,R*(R0R#((s!/home/adam/notecase-webapp/app.pyR/>s
cCsutjdt<00>}td|dd|dd|g<00>td|<00>x|dD]}td|<00>qPWtj<00>iS(Ntforces@update notes set note_text = ?, note_title = ? where note_id = ?R4t note_textt
note_titleR5(Rtget_jsontTrueRR$R"R%tcommit(R0R#tnotetfmt((s!/home/adam/notecase-webapp/app.pytputFs& 
(R1R2R/R@(((s!/home/adam/notecase-webapp/app.pyR3=s s/notes/<string:note_id>tTreecBseZd<00>ZRS(cCs<>td<00>}g}i}x@|D]8}g|d<|dsI|j|<00>n|||d<qWxJ|D]B}|ddkrb||d}|dj|<00>t|d<qbqbW|S(Ns<4E>select notes_tree.*, notes.note_title from notes_tree join notes on notes.note_id = notes_tree.note_id order by note_pid, note_postchildrentnote_pidR#ttfolder(R*tappendR<(R0tnotest rootNotestnotesMapR>tparent((s!/home/adam/notecase-webapp/app.pyR/Ws  

 (R1R2R/(((s!/home/adam/notecase-webapp/app.pyRAVss/treet__main__thosts0.0.0.0((tsqlite3R
tflaskRRRt flask_restfulRRt
flask_corsRRtconnectR%t row_factoryR1tapptrouteRtapiR"R$RR*R,R-t add_resourceR3RAtrun(((s!/home/adam/notecase-webapp/app.pyt<module>s0