Add call MRI

This commit is contained in:
Mauricio Baeza 2021-02-07 22:51:44 -06:00
parent 7d22cf9688
commit aae4aaa385
10 changed files with 74 additions and 10 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
Debug
^^^^^
For debug
^^^^^^^^^
**INFO_DEBUG**
^^^^^^^^^^^^^^
@ -69,3 +69,22 @@ Show info message in shell.
msg = 'Start process...'
app.info(msg)
return
**Call MRI**
^^^^^^^^^^^^
`MRI`_ is the better extension for debug any object in LibreOffice.
.. code-block:: python
import easymacro as app
def error():
obj = app.active
app.mri(obj)
return
.. _MRI: https://github.com/hanya/MRI

View File

@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Debug &#8212; ZAZ documentation</title>
<title>For debug &#8212; ZAZ documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
@ -30,8 +30,8 @@
<div class="body" role="main">
<div class="section" id="debug">
<h1>Debug<a class="headerlink" href="#debug" title="Permalink to this headline"></a></h1>
<div class="section" id="for-debug">
<h1>For debug<a class="headerlink" href="#for-debug" title="Permalink to this headline"></a></h1>
</div>
<div class="section" id="info-debug">
<h1><strong>INFO_DEBUG</strong><a class="headerlink" href="#info-debug" title="Permalink to this headline"></a></h1>
@ -87,6 +87,18 @@
<span class="k">return</span>
</pre></div>
</div>
</div>
<div class="section" id="call-mri">
<h1><strong>Call MRI</strong><a class="headerlink" href="#call-mri" title="Permalink to this headline"></a></h1>
<p><a class="reference external" href="https://github.com/hanya/MRI">MRI</a> is the better extension for debug any object in LibreOffice.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">easymacro</span> <span class="k">as</span> <span class="nn">app</span>
<span class="k">def</span> <span class="nf">error</span><span class="p">():</span>
<span class="n">obj</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active</span>
<span class="n">app</span><span class="o">.</span><span class="n">mri</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span>
<span class="k">return</span>
</pre></div>
</div>
</div>

View File

@ -35,8 +35,8 @@
<h1>Library easymacro.py<a class="headerlink" href="#library-easymacro-py" title="Permalink to this headline"></a></h1>
<div class="section" id="tools">
<h2>Tools<a class="headerlink" href="#tools" title="Permalink to this headline"></a></h2>
<div class="section" id="debug">
<h3>Debug<a class="headerlink" href="#debug" title="Permalink to this headline"></a></h3>
<div class="section" id="for-debug">
<h3>For debug<a class="headerlink" href="#for-debug" title="Permalink to this headline"></a></h3>
</div>
<div class="section" id="info-debug">
<h3><strong>INFO_DEBUG</strong><a class="headerlink" href="#info-debug" title="Permalink to this headline"></a></h3>
@ -93,6 +93,18 @@
</pre></div>
</div>
</div>
<div class="section" id="call-mri">
<h3><strong>Call MRI</strong><a class="headerlink" href="#call-mri" title="Permalink to this headline"></a></h3>
<p><a class="reference external" href="https://github.com/hanya/MRI">MRI</a> is the better extension for debug any object in LibreOffice.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">easymacro</span> <span class="k">as</span> <span class="nn">app</span>
<span class="k">def</span> <span class="nf">error</span><span class="p">():</span>
<span class="n">obj</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active</span>
<span class="n">app</span><span class="o">.</span><span class="n">mri</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span>
<span class="k">return</span>
</pre></div>
</div>
</div>
</div>
</div>

Binary file not shown.

View File

@ -1 +1 @@
Search.setIndex({docnames:["index","main/00_tools","main/config","main/easymacro","main/intro"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","main/00_tools.rst","main/config.rst","main/easymacro.rst","main/intro.rst"],objects:{},objnames:{},objtypes:{},terms:{"2021":4,"500":[1,3],"extensi\u00f3n":2,"final":4,"function":4,"import":[1,3],"new":[2,4],"opci\u00f3n":2,"public":2,"return":[1,3],"true":2,FOR:2,For:2,Ons:2,The:2,Used:2,With:4,absolut:2,add:[2,4],addin:[2,4],addonmenu:2,all:2,along:2,alt:2,ani:2,app:[1,3],applic:2,apt:4,archlinux:4,argument:2,automat:2,automaticali:[],base:2,basic:4,befor:2,bin:2,blank:2,bmp:2,bool:2,box:[1,3],calc:[2,4],can:[2,4],clone:4,code:2,com:[],compon:[2,4],compress:4,conf:2,configur:0,content:0,context:2,copi:[2,4],correctli:2,cours:4,creat:[2,4],ctrl:2,cuat:4,current:2,data:[1,3],def:[1,3],descript:2,detail:2,dev:4,develop:[2,4],dictionari:2,directori:4,displai:2,display_nam:2,displaynam:2,distribut:2,domain:4,don:4,done:4,download:4,draw:2,each:2,easymacro:[0,1],edit:2,either:2,elmau:[2,4],error:[],even:2,exactli:2,exampl:2,extens:0,extensionnam:2,file:4,file_test:2,first:0,fit:2,folder:2,forget:4,format:2,foundat:2,free:2,fresh:4,from:4,gener:[2,4],git:4,gitlab:[],gnu:2,gran:2,great:2,have:2,home:2,hope:2,http:[2,4],i18n:2,idl:2,idlc:2,imag:2,impli:2,impress:2,includ:2,index:0,info:[2,4],info_debug:[],inform:[],instal:[0,2],integ:2,intern:2,introduct:0,invers:2,kei:2,keyboard:2,label:2,languag:2,later:2,lib:2,librari:0,libreoffic:[2,4],libreofric:[],license_:2,license_en:2,like:2,link:2,local:4,log:[],logo:2,look:2,macro:[2,4],make:4,manag:2,mau:2,mauriciobaeza:[],menu_main:2,merchant:2,messag:[1,3],modifi:2,modul:0,more:2,move:[2,4],msg:[1,3],msgbox:[1,3],multi:2,myfirstextens:4,myfirstextension_v0:4,mygreatextens:2,name_16:2,name_26:2,net:[2,4],nombr:2,normal:2,now:4,ods:2,officemenubar:2,one:2,onli:2,open:2,option1:2,option:2,org:2,overview:0,oxt:4,pacman:4,page:[0,2],paramet:0,part:2,particular:2,pass:2,path_pygettext:2,pleas:2,png:2,possibl:2,pot:[2,4],process:[1,3],project:[2,4],properti:2,provid:4,prueba:2,publish:2,purpos:2,python3:2,python:4,rapid:4,rdb:2,receiv:2,recomend:[],recommend:[2,4],redistribut:2,regmerg:2,rel:2,remerg:2,repositori:4,requir:0,same:2,script:4,sdk:[2,4],search:0,see:2,semant:2,set:2,share:2,shell:[1,3],shift:2,shortcut:2,should:2,show:[1,2,3],soffic:2,softwar:2,sourc:4,space:2,start:[1,2,3,4],string:2,successfulli:4,sucesfulli:[],sudo:4,support:4,t_shift_mod1_mod2:2,term:2,test:4,testext:[],text:2,thi:[1,2,3,4],titl:2,too:2,tool:[0,2],toolbar:2,tupl:2,two:2,type_extens:2,ubuntu:4,under:2,uniqu:2,unopkg:[2,4],urd:2,url:2,use:2,use_local:2,used:[2,4],useful:2,user:4,usr:2,valor:2,valu:2,verifi:[1,3],vim:2,want:2,warranti:2,what:2,when:2,where:2,without:2,wizard:2,writer:2,www:2,you:[2,4],your:2,yournam:2,zaz:[2,4]},titles:["Welcome to ZAZ\u2019s documentation!","Debug","Configuration","Library easymacro.py","Introduction"],titleterms:{"default":2,"function":2,"new":[],author:2,calc:[],configur:2,creat:[],current:[],debug:[1,3],document:0,domain:2,easymacro:3,error:[1,3],extens:[2,4],file:2,first:4,icon:2,indic:0,info:[1,3],info_debug:[1,3],inform:2,instal:4,introduct:4,librari:3,licens:2,local:2,log:[1,3],main:2,menu:2,name:2,overview:4,paramet:2,parent:2,path:2,program:2,pygettext:2,requir:4,tabl:0,test:2,tool:3,type:2,version:2,welcom:0,zaz:0}})
Search.setIndex({docnames:["index","main/00_tools","main/config","main/easymacro","main/intro"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","main/00_tools.rst","main/config.rst","main/easymacro.rst","main/intro.rst"],objects:{},objnames:{},objtypes:{},terms:{"2021":4,"500":[1,3],"extensi\u00f3n":2,"final":4,"function":4,"import":[1,3],"new":[2,4],"opci\u00f3n":2,"public":2,"return":[1,3],"true":2,FOR:2,For:2,Ons:2,The:2,Used:2,With:4,absolut:2,activ:[1,3],add:[2,4],addin:[2,4],addonmenu:2,all:2,along:2,alt:2,ani:[1,2,3],app:[1,3],applic:2,apt:4,archlinux:4,argument:2,automat:2,automaticali:[],base:2,basic:4,befor:2,better:[1,3],bin:2,blank:2,bmp:2,bool:2,box:[1,3],calc:[2,4],can:[2,4],clone:4,code:2,com:[],compon:[2,4],compress:4,conf:2,configur:0,content:0,context:2,copi:[2,4],correctli:2,cours:4,creat:[2,4],ctrl:2,cuat:4,current:2,data:[1,3],def:[1,3],descript:2,detail:2,dev:4,develop:[2,4],dictionari:2,directori:4,displai:2,display_nam:2,displaynam:2,distribut:2,domain:4,don:4,done:4,download:4,draw:2,each:2,easymacro:[0,1],edit:2,either:2,elmau:[2,4],error:[],even:2,exactli:2,exampl:2,extens:[0,1,3],extensionnam:2,file:4,file_test:2,first:0,fit:2,folder:2,forget:4,format:2,foundat:2,free:2,fresh:4,from:4,gener:[2,4],git:4,gitlab:[],gnu:2,gran:2,great:2,have:2,home:2,hope:2,http:[2,4],i18n:2,idl:2,idlc:2,imag:2,impli:2,impress:2,includ:2,index:0,info:[2,4],info_debug:[],inform:[],instal:[0,2],integ:2,intern:2,introduct:0,invers:2,kei:2,keyboard:2,label:2,languag:2,later:2,lib:2,librari:0,libreoffic:[1,2,3,4],libreofric:[],license_:2,license_en:2,like:2,link:2,local:4,log:[],logo:2,look:2,macro:[2,4],make:4,manag:2,mau:2,mauriciobaeza:[],menu_main:2,merchant:2,messag:[1,3],modifi:2,modul:0,more:2,move:[2,4],msg:[1,3],msgbox:[1,3],multi:2,myfirstextens:4,myfirstextension_v0:4,mygreatextens:2,name_16:2,name_26:2,net:[2,4],nombr:2,normal:2,now:4,obj:[1,3],object:[1,3],ods:2,officemenubar:2,one:2,onli:2,open:2,option1:2,option:2,org:2,overview:0,oxt:4,pacman:4,page:[0,2],paramet:0,part:2,particular:2,pass:2,path_pygettext:2,pleas:2,png:2,possibl:2,pot:[2,4],process:[1,3],project:[2,4],properti:2,provid:4,prueba:2,publish:2,purpos:2,python3:2,python:4,rapid:4,rdb:2,receiv:2,recomend:[],recommend:[2,4],redistribut:2,regmerg:2,rel:2,remerg:2,repositori:4,requir:0,same:2,script:4,sdk:[2,4],search:0,see:2,semant:2,set:2,share:2,shell:[1,3],shift:2,shortcut:2,should:2,show:[1,2,3],soffic:2,softwar:2,sourc:4,space:2,start:[1,2,3,4],string:2,successfulli:4,sucesfulli:[],sudo:4,support:4,t_shift_mod1_mod2:2,term:2,test:4,testext:[],text:2,thi:[1,2,3,4],titl:2,too:2,tool:[0,2],toolbar:2,tupl:2,two:2,type_extens:2,ubuntu:4,under:2,uniqu:2,unopkg:[2,4],urd:2,url:2,use:2,use_local:2,used:[2,4],useful:2,user:4,usr:2,valor:2,valu:2,verifi:[1,3],vim:2,want:2,warranti:2,what:2,when:2,where:2,without:2,wizard:2,writer:2,www:2,you:[2,4],your:2,yournam:2,zaz:[2,4]},titles:["Welcome to ZAZ\u2019s documentation!","For debug","Configuration","Library easymacro.py","Introduction"],titleterms:{"default":2,"function":2,"new":[],For:[1,3],author:2,calc:[],call:[1,3],configur:2,creat:[],current:[],debug:[1,3],document:0,domain:2,easymacro:3,error:[1,3],extens:[2,4],file:2,first:4,icon:2,indic:0,info:[1,3],info_debug:[1,3],inform:2,instal:4,introduct:4,librari:3,licens:2,local:2,log:[1,3],main:2,menu:2,mri:[1,3],name:2,overview:4,paramet:2,parent:2,path:2,program:2,pygettext:2,requir:4,tabl:0,test:2,tool:3,type:2,version:2,welcom:0,zaz:0}})

View File

@ -1,6 +1,6 @@
Debug
^^^^^
For debug
^^^^^^^^^
**INFO_DEBUG**
^^^^^^^^^^^^^^
@ -69,3 +69,22 @@ Show info message in shell.
msg = 'Start process...'
app.info(msg)
return
**Call MRI**
^^^^^^^^^^^^
`MRI`_ is the better extension for debug any object in LibreOffice.
.. code-block:: python
import easymacro as app
def error():
obj = app.active
app.mri(obj)
return
.. _MRI: https://github.com/hanya/MRI

View File

@ -372,6 +372,8 @@ def mri(obj: Any) -> None:
error(msg)
return
if hasattr(obj, 'obj'):
obj = obj.obj
m.inspect(obj)
return