Files
Trilium/app.pyc

31 lines
7.3 KiB
Plaintext
Raw Normal View History

2017-05-22 20:43:45 -04:00
<03>
_<EFBFBD><Yc@s"ddlZddlZddlmZmZmZddlmZmZddl m
2017-05-22 20:43:45 -04:00
Z
ddl Z ddl Z ddl Z ddlZd<00>Zejd<00>Zee_ee<00>Ze
e<00>ejd<00>d<00><00>Zee<00>Zd <00>Zd
<00>Zgd <00>Zgd <00>Zd#d <00>Zdefd<00><00>YZejed<00>defd<00><00>YZejed<00>defd<00><00>YZ eje d<00>defd<00><00>YZ!eje!d<00>defd<00><00>YZ"eje"d<00>defd<00><00>YZ#eje#d<00>ed krej$d!d"<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_factory s s demo.ncdbs/frontend/<path:path>cCs td|<00>S(Ntfrontend(R(tpath((s!/home/adam/notecase-webapp/app.pytsend_jsscCstdj|j<00><00>}djtdt|<00><14><00>}t|j<00><00>}td|d|d|d|<00>}|jS(Nt,t?s INSERT INTO s (s
) VALUES (t)(tjointkeystlisttlenttupletvaluestexecutet lastrowid(t tablenametrecRtquestion_marksRR ((s!/home/adam/notecase-webapp/app.pytinsert"s
'cCstd|d|g<00>dS(Ns DELETE FROM s WHERE note_id = ?(R(R tnote_id((s!/home/adam/notecase-webapp/app.pytdelete)scCs tj<00>}|j||<00>|S(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
getResults1s cCs(tj<00>}|j||<00>}|j<00>S(N(R&R Rtfetchone(R'R(R R*((s!/home/adam/notecase-webapp/app.pytgetSingleResult6s tQuerycBseZd<00>ZRS(cCstjjd<00>}t|<00>S(NR'(RtargstgetR+(tselfR'((s!/home/adam/notecase-webapp/app.pyR0<s(t__name__t
__module__R0(((s!/home/adam/notecase-webapp/app.pyR.;ss/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+(R1R$((s!/home/adam/notecase-webapp/app.pyR0Ds
cCs<>tjdt<00>}td|dd|dd|g<00>td|<00>x|dD]}td|<00>qPWtd|<00>x<|dD]0}ttj|d<19><00>|d<td|<00>qWtd |<00>x|d D]}td |<00>q<>Wt j
<00>iS(
Ntforces@update notes set note_text = ?, note_title = ? where note_id = ?R5t note_textt
note_titleR6R8t
image_dataR7( Rtget_jsontTrueRR%R#R R
t b64decodeR&tcommit(R1R$tnotetfmttimgtlink((s!/home/adam/notecase-webapp/app.pytputLs&   
(R2R3R0RE(((s!/home/adam/notecase-webapp/app.pyR4Cs s/notes/<string:note_id>t NotesChildrencBseZd<00>ZRS(cCs<>tjdt<00>}djd<00>td<00>D<><00>}tjtj<00><00>}tdi|d6|dd6dd6dd 6|d
6|d 6d d 6dd6<>|dkr<>d}ntdi|d6|d6dd6dd6<>t j
<00>i|d6S(NR9tcss.|]$}tj<00>jtjtj<17>VqdS(N(trandomt SystemRandomtchoicetstringtascii_uppercasetdigits(t.0t_((s!/home/adam/notecase-webapp/app.pys <genexpr>lsitnotesR$R;R:t note_clone_idt date_createdt date_modifiedtpencilt icon_infoit is_finishedtroott
notes_treetnote_pidtnote_post is_expanded( RR=R>RtrangetmathtfloorttimeR#R&R@(R1tparent_note_idRAtnoteIdtnow((s!/home/adam/notecase-webapp/app.pytpostis,       
(R2R3Rc(((s!/home/adam/notecase-webapp/app.pyRFhss'/notes/<string:parent_note_id>/childrent MoveAfterNotecBseZd<00>ZRS(cCsQtd|g<00>}|dkrMtd|d|dd|g<00>tj<00>ndS(Ns*select * from notes_tree where note_id = ?sBupdate notes_tree set note_pid = ?, note_pos = ? where note_id = ?RYRZi(R-tNoneRR&R@(R1R$t after_note_idt
after_note((s!/home/adam/notecase-webapp/app.pyRE<00>s "(R2R3RE(((s!/home/adam/notecase-webapp/app.pyRd<00>ss8/notes/<string:note_id>/moveAfter/<string:after_note_id>t
MoveToNotecBseZd<00>ZRS(cCs!td||g<00>tj<00>dS(Ns4update notes_tree set note_pid = ? where note_id = ?(RR&R@(R1R$t parent_id((s!/home/adam/notecase-webapp/app.pyRE<00>s(R2R3RE(((s!/home/adam/notecase-webapp/app.pyRh<00>ss1/notes/<string:note_id>/moveTo/<string:parent_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_postchildrenRYR$RGtfolder(R+tappendR>(R1RPt rootNotestnotesMapRAtparent((s!/home/adam/notecase-webapp/app.pyR0<00>s  
2017-05-22 20:43:45 -04:00

 (R2R3R0(((s!/home/adam/notecase-webapp/app.pyRj<00>ss/treet__main__thosts0.0.0.0((%tsqlite3R
2017-05-22 20:43:45 -04:00
tflaskRRRt flask_restfulRRt
flask_corsRR_R]RHRKRtconnectR&t row_factoryR2tapptrouteRtapiR#R%RR+R-R.t add_resourceR4RFRdRhRjtrun(((s!/home/adam/notecase-webapp/app.pyt<module>sD      
2017-05-22 20:43:45 -04:00
  
      ##