³ò
°QþNc           @   s™   d  Z  d d k Z d d k Z d d k Z d d k Z d d k l Z d d k Z d d k Z d d k Z d d k	 Z d e i
 i i f d „  ƒ  YZ d S(   sI   
    KeepNote Extension 
    backup_tar

    Command-line basic commands
iÿÿÿÿN(   t
   AppCommandt	   Extensionc           B   s¡   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   sƒ  t  i i i i |  | ƒ | |  _ |  i i |  i ƒ t	 d d „  d d ƒt	 d |  i
 d d ƒt	 d |  i d d ƒt	 d	 |  i d
 d d d ƒt	 d |  i d
 d d d ƒt	 d |  i d
 d d d ƒt	 d |  i d
 d d d ƒt	 d d „  d d ƒt	 d |  i d
 d d d ƒt	 d |  i d
 d d d ƒt	 d |  i d
 d d d  ƒt	 d! |  i d
 d" d d# ƒt	 d$ |  i d d% ƒg |  _ d& S('   s   Initialize extensiont   focusc         S   s
   |  i  ƒ  S(    (   t   focus_windows(   t   appt   args(    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyt   <lambda>7   s    t   helps   focus all open windowst   minimizes   minimize all windowss   toggle-windowss   toggle all windowst   installt   metavart   FILENAMEs   install a new extensiont	   uninstallt   EXTENSION_NAMEs   uninstall an extensiont   tmp_exts&   add an extension just for this sessiont   ext_patht   PATHs&   add an extension path for this sessiont   quitc         S   s   t  i |  i ƒ S(    (   t   gobjectt   idle_addR   (   R   R   (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR   K   s    s   close all KeepNote windowst   viewt   NOTE_URLs   view a notet   newt
   PARENT_URLs   add a new notes   search-titlest   TEXTs   search notes by titlet   upgrades   [v VERSION] NOTEBOOK...s   upgrade a notebookt
   screenshots   insert a new screenshotN(   t   keepnotet   guit	   extensionR   t   __init__R   t   enabledt   addt
   on_enabledR    t   on_minimize_windowst   on_toggle_windowst   on_install_extensiont   on_uninstall_extensiont   on_temp_extensiont   on_extension_patht   on_view_notet   on_new_notet   on_search_titlest   on_upgrade_notebookt   on_screenshott   commands(   t   selfR   (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR   .   sJ    	c         C   s   d d d f g S(   NR   s   >=i    i   i   (   i    i   i   (    (   R.   (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyt   get_dependse   s    c         C   sº   | oˆ x¬ |  i  D]v } |  i i | i ƒ o q n y |  i i | ƒ Wq t j
 o0 } |  i i d | i | t i ƒ  d ƒ q Xq Wn( x$ |  i  D] } |  i i	 | i ƒ q™ Wd  S(   Ns   Could not add command '%s'i   (
   R-   R   t   get_commandt   namet   add_commandt	   Exceptiont   errort   syst   exc_infot   remove_command(   R.   R   t   commandt   e(    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR!   i   s    
 !
 c         C   s%   x | i  ƒ  D] } | i ƒ  q Wd  S(   N(   t   get_windowst   iconify(   R.   R   R   t   window(    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR"   ~   s     c         C   sJ   x9 | i  ƒ  D]+ } | i ƒ  o |  i | | ƒ d  Sq q W| i ƒ  d  S(   N(   R:   t	   is_activeR"   R   (   R.   R   R   R<   (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR#   ƒ   s     c         C   s&   x | d D] } | i  | ƒ q Wd  S(   Ni   (   t   uninstall_extension(   R.   R   R   t   extname(    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR%   Ž   s     c         C   s&   x | d D] } | i  | ƒ q Wd  S(   Ni   (   t   install_extension(   R.   R   R   t   filename(    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR$   ”   s     c         C   sq   xj | d D]^ } | i  | d ƒ } | i | i ƒ  ƒ } | o* | i d d  d | g ƒ | i t ƒ q q Wd  S(   Ni   t   tempt   windowst   exts(   t   add_extensiont   get_extensiont   get_keyt   init_extensions_windowst   Nonet   enablet   True(   R.   R   R   RA   t   entryt   ext(    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR&   š   s     c         C   s¯   g  } xn | d D]b } xY t  i i | ƒ D]E } | i | d ƒ } | i | i ƒ  ƒ } | o | i | ƒ q* q* Wq W| i d d  d | ƒ x | D] } | i	 t
 ƒ q” Wd  S(   Ni   RB   RC   RD   (   R   R   t   iter_extensionst   add_extension_entryRF   RG   t   appendRH   RI   RJ   RK   (   R.   R   R   RD   t   extensions_dirRA   RL   RM   (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR'   ¤   s       c         C   sk   | i  ƒ  } | oT | i ƒ  i ƒ  } t | d ƒ o | i ƒ  } n t | d ƒ o | i ƒ  qg n d  S(   Nt
   get_editorR,   (   t   get_current_windowt
   get_viewerRR   t   hasattrR,   (   R.   R   R   R<   t   editor(    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR,   ³   s    c         C   s\  t  | ƒ d j  o |  i d ƒ d  Sn | i ƒ  | d } t i i | ƒ o, t i i | ƒ \ } } |  i | | ƒ nÞ |  i i	 ƒ  } | d  j o d  Sn | i ƒ  } | d  j o d  Sn t | i | ƒ ƒ } t  | ƒ d j o |  i | | d d ƒ nU | i ƒ  }	 |	 i ƒ  x; | D]3 \ } }
 | i | ƒ } | o |	 i | ƒ q!q!Wd  S(   Ni   s   Must specify note urli    (   t   lenR4   R   R   t   notebookt   is_node_urlt   parse_node_urlt   view_nodeidR   RS   RI   t   get_notebookt   listt   search_node_titlesRT   t   start_search_resultt   get_node_by_idt   add_search_result(   R.   R   R   t   nodeurlt   hostt   nodeidR<   RX   t   resultst   viewert   titlet   node(    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR(   ½   s0    


 c         C   s¬   t  | ƒ d j  o |  i d ƒ d  Sn | i ƒ  | d } |  i ƒ  \ } } |  i | ƒ } | oD | o= | i | ƒ } | o# | i ƒ  i t i	 i
 d | ƒ q¨ n d  S(   Ni   s   Must specify note urlt   child(   RW   R4   R   t   get_window_notebookt
   get_nodeidR`   RT   t   new_nodeR   RX   t   CONTENT_TYPE_PAGE(   R.   R   R   Rb   R<   RX   Rd   Rh   (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR)   à   s    

c   	      C   sÂ   t  | ƒ d j  o |  i d ƒ d  Sn |  i i ƒ  } | d  j o d  Sn | i ƒ  } | d  j o d  Sn | d } t | i | ƒ ƒ } x/ | D]' \ } } d | t i	 i
 | ƒ f GHq“ Wd  S(   Ni   s   Must specify text to searchs   %s	%s(   RW   R4   R   RS   RI   R\   R]   R^   R   RX   t   get_node_url(	   R.   R   R   R<   RX   t   textt   nodesRd   Rg   (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR*   ò   s    
 c         C   sc   x\ | i  ƒ  D]N } | i ƒ  } | p q n | i | ƒ } | o | i ƒ  i | ƒ Pq q Wd  S(   N(   R:   R\   R`   RT   t	   goto_node(   R.   R   Rd   R<   RX   Rh   (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR[     s     c         C   sä   t  i i | ƒ o  t  i i | ƒ \ } } | Sn® |  i i ƒ  } | d  j o d  Sn | i ƒ  } | d  j o d  Sn t | i	 | ƒ ƒ } t
 | ƒ d j o | d d Sn1 x) | D]! \ } } | | j o | Sq· q· Wd  Sd  S(   Ni   i    (   R   RX   RY   RZ   R   RS   RI   R\   R]   R^   RW   (   R.   Ro   Rc   Rd   R<   RX   Re   Rg   (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyRk     s"     c         C   s:   |  i  i ƒ  } | d  j o d Sn | i ƒ  } | | f S(   N(   NN(   R   RS   RI   R\   (   R.   R<   RX   (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyRj   -  s
    c         C   sÍ   t  i i } d } xf | t | ƒ j  oR | | d j o< y" t | | d ƒ } | d 7} Wqv t d ƒ ‚ qv Xq Pq W| | } xA | D]9 } t  i d | | f ƒ t  i i i | | d t	 ƒqŒ Wd  S(   Ni   t   vi   s   excepted version numbers%   upgrading notebook to version %d: %s
t   verify(
   R   RX   t   NOTEBOOK_FORMAT_VERSIONRW   t   intR3   t   log_messaget   updatet   update_notebookRK   (   R.   R   R   t   versiont   it   filesRA   (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR+   5  s$     
 	(   t   __name__t
   __module__R   R/   R!   R"   R#   R%   R$   R&   R'   R,   R(   R)   R*   R[   Rk   Rj   R+   (    (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pyR   ,   s"   	7							
		
	#					(   t   __doc__t   osR5   R   R   R    t   keepnote.notebookt   keepnote.notebook.updatet   keepnote.extensiont   keepnote.gui.extensionR   R   R   (    (    (    sš   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\command_basics\__init__.pys   <module>   s   