ScripterNG/Development: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
(New page: = Development on the new scripter = == Documentation == * How does the core (connecting Python to C++) work? * How can I add new functions? * How do I port code from older scripter to th...)
 
 
(14 intermediate revisions by 2 users not shown)
Line 11: Line 11:
== Ideas for scripts and extensions ==
== Ideas for scripts and extensions ==
* connect/sync Scribus documents with a database or content management system
* connect/sync Scribus documents with a database or content management system
* [[Web_optimised_PDF create PDFs optimized for web]]
* [[Web_optimised_PDF]]
* [http://www.rfk.id.au/software/pyenchant/ spell checker]  
* [http://www.rfk.id.au/software/pyenchant/ spell checker] (there is already a spellchecker in 1.3.5+, --[[User:C schaefer|C schaefer]] 05:50, 21 April 2010 (CEST))
* [http://www.grigoriev.ru/svgmath/ MathML importer by converting to SVG]
* [http://www.grigoriev.ru/svgmath/ MathML importer by converting to SVG]
* HTML exporter
* [http://bugs.scribus.net/view.php?id=2974 HTML exporter]
* [http://websvn.kde.org/trunk/koffice/kword/plugins/scripting/scripts/oouno.py?view=markup Use PyUno to use OpenOffice filters to import any text format supported by OpenOffice]
* [http://websvn.kde.org/trunk/koffice/kword/plugins/scripting/scripts/oouno.py?view=markup Use PyUno to use OpenOffice filters to import any text format supported by OpenOffice]
* fullscreen feature
* fullscreen feature
* Python editor/console
* [https://launchpad.net/codeaide Python editor/console]
* Macro recorder
* [http://bugs.scribus.net/view.php?id=1630 Macro recorder]
* import richtext (RTF) with [http://code.google.com/p/pyrtf-ng/ pyrtf-ng]
* [http://bugs.scribus.net/view.php?id=1474 Import Rich Text (RTF)] with [http://code.google.com/p/pyrtf-ng/ pyrtf-ng]
* Autotext for quotation marks, stared text gets bold, space after comma and period, etc.
* Autotext for quotation marks, stared text gets bold, space after comma and period, etc.
* OpenClipArt browser/importer. Same for Flickr/some creative commons media repository
* OpenClipArt browser/importer. Same for Flickr/Open Font Library and other Creative Commons media repositories
* provide external control via XMLRPC or DBus
* provide external control via XMLRPC or DBus
* wizards to create calendars, business cards, letters
* wizards to create calendars, business cards, letters
* alternative properties palette (for experiments or special use cases)
* alternative properties palette (for experiments or special use cases) - [http://scripterng.blogspot.com/2008/07/dockable-dialogs-manipulate-gui-with.html example]
* simple irc client dock window to get instant help and for live colaboration
* simple irc client dock window to get instant help and for live colaboration
* import plots from gnuplot as svg
* import plots from gnuplot as svg
Line 34: Line 34:
* [http://www.assembla.com/wiki/show/scribusmailmerge mail merge]
* [http://www.assembla.com/wiki/show/scribusmailmerge mail merge]
* clippy ;-)
* clippy ;-)
*
* XML-source editor [http://www.inkscape.org/screenshots/gallery/inkscape-0.37-linux-xmlEditor01.png like Inkscape]
 


== Requirements to implement above scripts ==
== Requirements to implement above scripts ==
* call gettext importer api
* call gettext importer api
* call pdf exporter
* call pdf exporter
*  
* event hooks (selection changed, document changed,
 
* access to (de)saxe api to (de)serialize pageitems
 
* access to StoryText object
== API ideas ==
*  


== API ideas / missing APIs ==
* Layers
** activeDocument.layers / activeDocument.activeLayer (property)
*** layer.{visible, active, print, lock} (bool property)
*** layer.remove()
** item.sentToLayer(layer_name)
** activeDocument.newLayer(..)
* Colors
** activeDocument.colors (str list propery)
** activeDocument.activeColor (property)
** activeDocument.newColor(..)
* Fonts
** Scripter.{fontNames, xfontNames} (str list property)
** Scripter.renderFont(..)
* Guides
** activePage.{horizontalGuides, verticalGuides} (double property list)
* Selections
* Text
* Styles
* Selections / Groups
* GUI
** Scripter.dialogs.valueInput
** Scripter.dialogs.{openFilename, saveFilename, openDirectory}
** Scripter.activeWindow.progess
** Scripter.activeWindow.mouseCursorType
* Misc
** activeDocument.importPage
** MasterPage-stuff
** PageItem-Proxy: ''Currently a script can directly access a PageItem. It would be better if there is a thin layer between them.''
*


== Other important TODO ==
== Other important TODO ==
* add i18n and integrate with rest of Scribus
* add i18n and integrate with rest of Scribus
*
== Implementation of other scripting languages (must be platform-neutral) ==


* [http://bugs.scribus.net/view.php?id=9003 Perl]
* Ruby
* JavaScript/QtScript
* Lua


== Links ==
== Links ==
(will lookup my bookmarks)
(will lookup my bookmarks)
* [[ScripterNG/Development/PortingOldScripter]]
* Integration of scripting languages into C++/Qt applications
* Integration of scripting languages into C++/Qt applications
* Examples about how other projects solved this topic
* Examples about how other projects solved this topic
* [http://www.indesignscriptingreference.com/CS3/JavaScript/ InDesign scripting with JavaScript]
* [http://www.indesignscriptingreference.com/CS3/JavaScript/ InDesign scripting with JavaScript]

Latest revision as of 04:56, 21 April 2010

Development on the new scripter

Documentation

  • How does the core (connecting Python to C++) work?
  • How can I add new functions?
  • How do I port code from older scripter to the new one?


Ideas for scripts and extensions

Requirements to implement above scripts

  • call gettext importer api
  • call pdf exporter
  • event hooks (selection changed, document changed,
  • access to (de)saxe api to (de)serialize pageitems
  • access to StoryText object

API ideas / missing APIs

  • Layers
    • activeDocument.layers / activeDocument.activeLayer (property)
      • layer.{visible, active, print, lock} (bool property)
      • layer.remove()
    • item.sentToLayer(layer_name)
    • activeDocument.newLayer(..)
  • Colors
    • activeDocument.colors (str list propery)
    • activeDocument.activeColor (property)
    • activeDocument.newColor(..)
  • Fonts
    • Scripter.{fontNames, xfontNames} (str list property)
    • Scripter.renderFont(..)
  • Guides
    • activePage.{horizontalGuides, verticalGuides} (double property list)
  • Selections
  • Text
  • Styles
  • Selections / Groups
  • GUI
    • Scripter.dialogs.valueInput
    • Scripter.dialogs.{openFilename, saveFilename, openDirectory}
    • Scripter.activeWindow.progess
    • Scripter.activeWindow.mouseCursorType
  • Misc
    • activeDocument.importPage
    • MasterPage-stuff
    • PageItem-Proxy: Currently a script can directly access a PageItem. It would be better if there is a thin layer between them.

Other important TODO

  • add i18n and integrate with rest of Scribus

Implementation of other scripting languages (must be platform-neutral)

  • Perl
  • Ruby
  • JavaScript/QtScript
  • Lua

Links

(will lookup my bookmarks)