diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2018-11-27 22:10:50 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2018-11-28 10:48:08 +0100 |
commit | 949606895b8d46fb97b0bfcda25cfb04f1f61e32 (patch) | |
tree | 073ec16048b19e431dda6e6d0f5955edb06a9fc8 /source/text | |
parent | 6c2abb8601836f6bea02b7dfabba486208f2c6be (diff) |
tdf#121736 initial Help pages for Python scripts
Work in progress, initial addition of help pages for python
scripts in LO.
Change-Id: Iee95b1340c821fdb08524fdedeca3817b0de1459
Reviewed-on: https://gerrit.libreoffice.org/64137
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'source/text')
-rw-r--r-- | source/text/sbasic/python/main0000.xhp | 39 | ||||
-rw-r--r-- | source/text/sbasic/python/python_ide.xhp | 32 | ||||
-rw-r--r-- | source/text/sbasic/python/python_locations.xhp | 29 | ||||
-rw-r--r-- | source/text/shared/00/00000406.xhp | 3 | ||||
-rw-r--r-- | source/text/shared/01/06130000.xhp | 16 |
5 files changed, 117 insertions, 2 deletions
diff --git a/source/text/sbasic/python/main0000.xhp b/source/text/sbasic/python/main0000.xhp new file mode 100644 index 0000000000..989ea22d0e --- /dev/null +++ b/source/text/sbasic/python/main0000.xhp @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<helpdocument version="1.0"> + <!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + --> + + <meta> + <topic id="pythonmain0000" indexer="include" status="PUBLISH"> + <title id="tit" xml-lang="en-US">Python Scripts</title> + <filename>/text/sbasic/python/main0000.xhp</filename> + </topic> + </meta> + <body> + <bookmark xml-lang="en-US" branch="index" id="bm_id491543348147708"> + <bookmark_value>macros;Python scripts</bookmark_value> + <bookmark_value>Python;macros</bookmark_value> + </bookmark> + <paragraph id="hd_id3154232" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/python/main0000.xhp" name="$[officename] Python Scripts">%PRODUCTNAME Python Scripts Help</link></paragraph> + + <section id="pythonalt"> + <paragraph id="par_id3153894" role="paragraph" xml-lang="en-US">%PRODUCTNAME provides an Application Programming Interface (API) that allows controlling the $[officename] components with different programming languages by using the $[officename] Software Development Kit (SDK). For more information about the $[officename] API and the Software Development Kit, visit <link href="https://api.libreoffice.org/" name="api.libreoffice.org">https://api.libreoffice.org</link></paragraph> + <paragraph id="par_id3147226" role="paragraph" xml-lang="en-US">This help section explains the most common Python script functions for %PRODUCTNAME. For more in-depth information please refer to the <link href="https://wiki.documentfoundation.org/Macros/Python_Design_Guide" name="wiki.documentfoundation.org PYTHON Guide">Designing & Developing Python Applications</link> on the Wiki.</paragraph> + </section> + <embed href="text/shared/need_help.xhp#needhelp"/> + <paragraph id="hd_id3146957" role="heading" level="3" xml-lang="en-US">Working with Python Scripts in %PRODUCTNAME.</paragraph> + <embed href="text/sbasic/python/python_ide.xhp#pythonideh1"/> + <embed href="text/sbasic/python/python_locations.xhp#pythonlocations1"/> + <paragraph role="paragraph" id="par_id551543347858350" xml-lang="en-US">Programming with Python Scripts + </paragraph> + <paragraph role="paragraph" id="par_id861543347870798" xml-lang="en-US">Creating a dialog</paragraph> + <paragraph role="paragraph" id="par_id71543347877088" xml-lang="en-US">Programming Examples</paragraph> + <embed href="text/swriter/main0000.xhp#helpabouthelp"/> +</body> +</helpdocument> diff --git a/source/text/sbasic/python/python_ide.xhp b/source/text/sbasic/python/python_ide.xhp new file mode 100644 index 0000000000..05645cc501 --- /dev/null +++ b/source/text/sbasic/python/python_ide.xhp @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<helpdocument version="1.0"> + <!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + --> + + <meta> + <topic id="pythonidesetup" indexer="include" status="PUBLISH"> + <title id="tit" xml-lang="en-US">IDE for Python</title> + <filename>/text/sbasic/python/python_ide.xhp</filename> + </topic> + </meta> + <body> + <section id="pythonideheading"> + <bookmark id="bm_id341543348965463" xml-lang="en-US" branch="hid/zzzz" localize="false"/> + <bookmark xml-lang="en-US" branch="index" id="bm_id761543349138561"> + <bookmark_value>python;IDE - integrated development environment</bookmark_value> + <bookmark_value>python;editor</bookmark_value> + </bookmark> + <paragraph id="hd_id151543348965464" role="heading" level="1" xml-lang="en-US"><variable id="pythonideh1"><link href="text/sbasic/python/python_ide.xhp" name="Python IDE Setup">Setting up an Integrated Development Environment (IDE) for Python</link></variable></paragraph> + <paragraph id="par_id541543348965465" role="paragraph" xml-lang="en-US">Writing Python macros requires extra configuration steps in order set an IDE of choice.</paragraph> + + </section> + <embed href="text/shared/need_help.xhp#needhelp"/> + <paragraph role="paragraph" id="par_id341543353455014" xml-lang="en-US">Unlike Basic language macros development in %PRODUCTNAME, writing Python macros requires extra configuration steps in order to build your IDE of choice. In return you are provided with flexible design experience built upon your Python developing preferences or habits. Hereafter are IDE setup guidelines that range from beginner to advanced user.</paragraph> +</body> +</helpdocument> diff --git a/source/text/sbasic/python/python_locations.xhp b/source/text/sbasic/python/python_locations.xhp new file mode 100644 index 0000000000..f8bb85ff52 --- /dev/null +++ b/source/text/sbasic/python/python_locations.xhp @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<helpdocument version="1.0"> + <!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + --> + + <meta> + <topic id="pythonlocations" indexer="include" status="PUBLISH"> + <title id="tit" xml-lang="en-US">Location of Python Scripts</title> + <filename>/text/sbasic/python/python_locations.xhp</filename> + </topic> + </meta> + <body> + <section id="pythonlocation"> + <paragraph id="hd_id391543358231021" role="heading" level="1" xml-lang="en-US"><variable id="pythonlocations1"><link href="text/sbasic/python/python_locations.xhp" name="command_name">Location of Python scripts</link></variable></paragraph> + <paragraph id="par_id771543358231022" role="paragraph" xml-lang="en-US">The Python script files are simply stored within the file system.</paragraph> + + </section> + <embed href="text/shared/need_help.xhp#needhelp"/> + <paragraph role="heading" level="2" id="par_id591543360063141" xml-lang="en-US">%PRODUCTNAME installation share</paragraph> + <paragraph role="heading" level="2" id="par_id251543360075956" xml-lang="en-US">%PRODUCTNAME user profile</paragraph> + <paragraph role="heading" level="2" id="par_id671543360098182" xml-lang="en-US">Embedded in the document</paragraph> +</body> +</helpdocument> diff --git a/source/text/shared/00/00000406.xhp b/source/text/shared/00/00000406.xhp index 1456031b95..7189aa00ea 100644 --- a/source/text/shared/00/00000406.xhp +++ b/source/text/shared/00/00000406.xhp @@ -77,6 +77,9 @@ </section> <paragraph xml-lang="en-US" id="par_idN107E9" role="paragraph"><variable id="mediaplayer">Choose <emph>Tools - Media Player</emph>.</variable></paragraph> <paragraph xml-lang="en-US" id="par_id3151385" role="paragraph"><variable id="makro">Choose <emph>Tools - Macros - Organize Macros - %PRODUCTNAME Basic</emph>, or press <switchinline select="sys"><caseinline select="MAC">Option</caseinline><defaultinline>Alt</defaultinline></switchinline>+F11 (if not assigned by your system).</variable></paragraph> + <paragraph role="paragraph" id="par_id511543350796749" xml-lang="en-US"><variable id="beanshell">Choose <emph>Tools - Macros - Organize Macros - BeanShell</emph>.</variable></paragraph> + <paragraph role="paragraph" id="par_id661543350803067" xml-lang="en-US"><variable id="javascript">Choose <emph>Tools - Macros - Organize Macros - JavaScript</emph>.</variable></paragraph> + <paragraph role="paragraph" id="par_id441543350811395" xml-lang="en-US"><variable id="python">Choose <emph>Tools - Macros - Organize Macros - Python</emph>.</variable></paragraph> <section id="recordmacro"> <paragraph xml-lang="en-US" id="par_id3149456" role="paragraph">Choose <emph>Tools - Macros - Record Macro</emph>.</paragraph> </section> diff --git a/source/text/shared/01/06130000.xhp b/source/text/shared/01/06130000.xhp index 54f3bee11c..0207188eea 100644 --- a/source/text/shared/01/06130000.xhp +++ b/source/text/shared/01/06130000.xhp @@ -119,9 +119,12 @@ <paragraph role="heading" id="hd_id3154693" xml-lang="en-US" level="3">Import<comment>changed in #i64102</comment></paragraph> <paragraph role="paragraph" id="par_id3147441" xml-lang="en-US"><ahelp hid="modules/BasicIDE/ui/libpage/import">Locate that $[officename] Basic library that you want to add to the current list, and then click Open.</ahelp></paragraph> <embed href="text/shared/00/00000001.xhp#loeschen"/> -<paragraph role="paragraph" id="par_idN10A39" xml-lang="en-US"><variable id="script">Scripts +<paragraph role="heading" level="1" id="par_idN10A39" xml-lang="en-US"><variable id="script">Scripts </variable></paragraph> -<paragraph role="paragraph" id="par_idN109BB" xml-lang="en-US">To open the BeanShell Macros dialog box, choose Tools - Macros - Organize Macros - BeanShell. To open the JavaScript dialog box, choose Tools - Macros - Organize Macros - JavaScript.</paragraph> +<section id="howtoget"> + <embed href="text/shared/00/00000406.xhp#beanshell"/> + <embed href="text/shared/00/00000406.xhp#javascript"/> +</section> <paragraph role="heading" id="hd_id6963408" xml-lang="en-US" level="2">Export</paragraph> <paragraph role="paragraph" id="par_id8968169" xml-lang="en-US"><ahelp hid=".">Opens a dialog to export the selected library either as an extension or as a Basic library.</ahelp></paragraph> <bookmark xml-lang="en-US" branch="hid/cui/ui/scriptorganizer/ScriptOrganizerDialog" id="bm_id7982421" localize="false"/> @@ -149,6 +152,15 @@ <paragraph role="paragraph" id="par_idN10B00" xml-lang="en-US">Select a macro or script from "user", "share", or an open document. To view the contents of a library, double-click an entry in the list.</paragraph> <paragraph role="heading" id="par_idN10B17" xml-lang="en-US" level="3">Macro name</paragraph> <paragraph role="paragraph" id="par_idN10B1B" xml-lang="en-US">Click a script, and then click a command button.</paragraph> +<paragraph role="heading" level="1" id="par_id381543352048115" xml-lang="en-US">Python</paragraph> +<section id="howtoget"> + <embed href="text/shared/00/00000406.xhp#python"/> +</section> +<paragraph role="heading" id="par_idN109as" xml-lang="en-US" level="2">Macros</paragraph> +<paragraph role="paragraph" id="par_idN134C2" xml-lang="en-US"><ahelp hid="cui/ui/scriptorganizer/ScriptOrganizerDialog">Select a macro or script from "user", "share", or an open document.</ahelp></paragraph> +<paragraph role="heading" level="3" id="par_id641543351777423" xml-lang="en-US">Run</paragraph> +<paragraph role="paragraph" id="par_id31543351781865" xml-lang="en-US"><ahelp hid="cui/ui/scriptorganizer/run">To run a script, select a script in the list, and then click Run.</ahelp></paragraph> + <section id="relatedtopics"> <embed href="text/shared/guide/scripting.xhp#scripting"/> <embed href="text/shared/guide/macro_recording.xhp#macro_recording"/> |