ScripterNG/Development/PortingOldScripter: Difference between revisions
(List of all available functions) |
No edit summary |
||
(20 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== Old scripter functions and their equivalents with new scripter == | |||
'''cmdpage.cpp''' | '''cmdpage.cpp''' | ||
* actualpage | * actualpage: Scripter.activeDocument.activePage.number (property) | ||
* redraw | * redraw: Scripter.activeWindow.update() | ||
* pageposition | * pageposition: Scripter.activeDocument.activePage.position | ||
* savepageeps | |||
* deletepage | * savepageeps: Scripter.activeDocument.activePage.savePageAsEPS(...) ''(added in gsoc2011)'' | ||
* gotopage | * deletepage: Scripter.activeDocument.activePage.remove() | ||
* gotopage: Scripter.activeDocument.number (property) | |||
* newpage | * newpage | ||
* pagecount | * pagecount | ||
* pagedimension | * pagedimension: Scripter.activeDocument.dimensions | ||
* pagensize | * pagensize | ||
* pagenmargins | * pagenmargins | ||
* getpageitems | * getpageitems: Scripter.activeDocument.items | ||
* getHguides | * getHguides | ||
* setHguides | * setHguides | ||
* getVguides | * getVguides | ||
* setVguides | * setVguides | ||
* getpagemargins | * getpagemargins: Scripter.activeDocument.margins | ||
* importpage | * importpage | ||
Line 24: | Line 27: | ||
'''cmdmisc.cpp''' | '''cmdmisc.cpp''' | ||
* setredraw | * setredraw: Scripter.activeWindow.redraw (property) | ||
* fontnames | * fontnames | ||
* xfontnames | * xfontnames | ||
Line 48: | Line 51: | ||
* removelayer | * removelayer | ||
* createlayer | * createlayer | ||
* filequit | * filequit: ''qApp.close()'' | ||
* getlanguage | * getlanguage | ||
* moveselectiontofront | * moveselectiontofront | ||
Line 69: | Line 72: | ||
* scalegroup | * scalegroup | ||
* getselobjnam | * getselobjnam | ||
* selcount | * selcount: Scripter.activeDocument.selection (property), Scripter.activeDocument.activePage.selection (property) | ||
* selectobj | * selectobj | ||
* deselect | * deselect | ||
Line 77: | Line 80: | ||
'''cmddoc.cpp''' | '''cmddoc.cpp''' | ||
* newdocument | * newdocument: Scripter.newDocument(..) | ||
* newdoc | * newdoc: Scripter.newDocument(..) | ||
* setmargins | * setmargins: Scripter.activeDocument.margins.set(..) | ||
* setbaseline | * setbaseline | ||
* closedoc | * closedoc: Scripter.activeDocument.close() | ||
* havedoc | * havedoc: Scripter.activeDocument.available() | ||
* opendoc | * opendoc: Scripter.openDocument() | ||
* savedoc | * savedoc: | ||
* getdocname | * getdocname | ||
* savedocas | * savedocas | ||
Line 119: | Line 122: | ||
'''cmddialog.cpp''' | '''cmddialog.cpp''' | ||
* newdocdia | * newdocdia: Scripter.dialogs.newdocdia ''(added in gsoc2011)'' | ||
* filedia | * filedia | ||
* messdia | * messdia: Scripter.dialogs.alert(..) | ||
* valdialog | * valdialog | ||
* newstyledialog | * newstyledialog | ||
Line 131: | Line 134: | ||
* progresssetprogress | * progresssetprogress | ||
* setcursor | * setcursor | ||
* docchanged | * docchanged: Scripter.activeDocument.modified (property) | ||
* zoomdocument | * zoomdocument: Scripter.activeWindow.zoom (property) | ||
* scrolldocument | * scrolldocument: Scripter.activeWindow.scroll(..) | ||
'''cmdgetprop.cpp''' | '''cmdgetprop.cpp''' | ||
* getobjecttype | * getobjecttype: Scripter.activeDocument.activeItem.itemType (property) | ||
* getfillcolor | * getfillcolor: Scripter.activeDocument.activeItem.fillColor (property) | ||
* getfilltrans | * getfilltrans | ||
* getfillblend | * getfillblend | ||
* getlinecolor | * getlinecolor: Scripter.activeDocument.activeItem.lineColor(poperty) | ||
* getlinetrans | * getlinetrans | ||
* getlineblend | * getlineblend | ||
* getlinewidth | * getlinewidth: Scripter.activeDocument.activeItem.lineWidth (property) | ||
* getlineshade | * getlineshade: Scripter.activeDocument.activeItem.lineShade (property) | ||
* getlinejoin | * getlinejoin | ||
* getlineend | * getlineend | ||
* getlinestyle | * getlinestyle: Scripter.activeDocument.activeItem.lineStyle (property) | ||
* getfillshade | * getfillshade | ||
* getcornerrad | * getcornerrad: Scripter.activeDocument.activeItem.cornerRadius (property) | ||
* getimgscale | * getimgscale: Scripter.activeDocument.activeItem.{imageXScale, imageYScale} (property) | ||
* getimgname | * getimgname: | ||
* getposi | * getposi: Scripter.activeDocument.activeItem.{xPos, yPos} (property) | ||
* getsize | * getsize: Scripter.activeDocument.activeItem.{width, height} (property) | ||
* getrotation | * getrotation: Scripter.activeDocument.activeItem.rotation (property) | ||
* getallobj | * getallobj: Scripter.activeDocument.items(property), Scripter.activeDocument.activePage.items (property) | ||
'''svgimport.cpp''' | '''svgimport.cpp''' | ||
* placevec | * placevec | ||
* placesvg | * placesvg: Scripter.activeDocument.activePage.placeSVG(..) | ||
* placeeps | * placeeps: Scripter.activeDocument.activePage.placeEPS(..) | ||
* placesxd | * placesxd: Scripter.activeDocument.activePage.placeSXD(..) | ||
* placeodg | * placeodg: Scripter.activeDocument.activePage.placeODG(..) | ||
'''cmdobj.cpp''' | '''cmdobj.cpp''' | ||
* newrect | * newrect: Scripter.activeDocument.activePage.newRectangle(..) | ||
* newellipse | * newellipse: Scripter.activeDocument.activePage.newEllipse(..) | ||
* newimage | * newimage: Scripter.activeDocument.activePage.newImage(..) | ||
* newtext | * newtext: Scripter.activeDocument.activePage.newText(..) | ||
* newline | * newline: Scripter.activeDocument.activePage.newLine(..) | ||
* polyline | * polyline | ||
* polygon | * polygon | ||
Line 205: | Line 210: | ||
* gettextdistances | * gettextdistances | ||
* getcolumngap | * getcolumngap | ||
* getframetext | * getframetext. | ||
* gettext | * gettext | ||
* setboxtext | * setboxtext | ||
Line 232: | Line 237: | ||
* setpdfbookmark | * setpdfbookmark | ||
* ispdfbookmark | * ispdfbookmark | ||
== Not implemented in old scripter == | |||
* Scripter.dialogs.{bookmarks, documentChecker, layers, mainWindow, nodes, pages, properties, scrapbook} | |||
* code security checker | |||
* menu hooks | |||
== Testing the existing scripts == | |||
== Scripts distributed with Scribus == | |||
The corrected scripter must be committed to trunk, too (may happen slightly before or after the Scripter 2 has been integrated) | |||
{| | |||
|Script | |||
|Status | |||
|- | |||
| Autoquote | |||
| Not ported | |||
|- | |||
| CandendarWizard | |||
| Not ported | |||
|- | |||
| color2csv | |||
| Not ported | |||
|- | |||
| ColorChart | |||
| Not ported | |||
|- | |||
| csv2color | |||
| Not ported | |||
|- | |||
| DirectImageImport | |||
| Not ported | |||
|- | |||
| FontSmaple | |||
| Not ported | |||
|- | |||
| Importscv2table | |||
| Not ported | |||
|- | |||
| InfoBox | |||
| Not ported | |||
|} | |||
== Scripts from the Scribus Wiki == | |||
The most popular Scripts from the Wiki should be ported to Scripter 2. Until after the release of 1.6 (with Scripter 2) we will have to keep both versions of the scripts in there. | |||
Other Scripts can be ported later, after people will have started using them | |||
{| | |||
|Script | |||
|Status | |||
|- | |||
|} | |||
== Scripts from the community == | |||
We will get in touch with people having "private" scripts and help them migrate their scripts. It may be a chance to get a list of such scripts or pushing some people to make their scripts public. |
Latest revision as of 20:24, 11 January 2013
Old scripter functions and their equivalents with new scripter
cmdpage.cpp
- actualpage: Scripter.activeDocument.activePage.number (property)
- redraw: Scripter.activeWindow.update()
- pageposition: Scripter.activeDocument.activePage.position
- savepageeps: Scripter.activeDocument.activePage.savePageAsEPS(...) (added in gsoc2011)
- deletepage: Scripter.activeDocument.activePage.remove()
- gotopage: Scripter.activeDocument.number (property)
- newpage
- pagecount
- pagedimension: Scripter.activeDocument.dimensions
- pagensize
- pagenmargins
- getpageitems: Scripter.activeDocument.items
- getHguides
- setHguides
- getVguides
- setVguides
- getpagemargins: Scripter.activeDocument.margins
- importpage
scriptplugin.cpp
- retval
- getval
cmdmisc.cpp
- setredraw: Scripter.activeWindow.redraw (property)
- fontnames
- xfontnames
- renderfont
- getlayers
- setactlayer
- getactlayer
- senttolayer
- layervisible
- layerprint
- layerlock
- layeroutline
- layerflow
- layerblend
- layertrans
- glayervisib
- glayerprint
- glayerlock
- glayeroutline
- glayerflow
- glayerblend
- glayertrans
- removelayer
- createlayer
- filequit: qApp.close()
- getlanguage
- moveselectiontofront
- moveselectiontoback
cmdmani.cpp
- loadimage
- scaleimage
- setimagescale
- setimageoffset
- setimagebrightness
- setimagegrayscale
- moveobjrel
- moveobjabs
- rotobjrel
- rotobjabs
- sizeobjabs
- groupobj
- ungroupobj
- scalegroup
- getselobjnam
- selcount: Scripter.activeDocument.selection (property), Scripter.activeDocument.activePage.selection (property)
- selectobj
- deselect
- lockobject
- islocked
- setscaleimagetoframe
cmddoc.cpp
- newdocument: Scripter.newDocument(..)
- newdoc: Scripter.newDocument(..)
- setmargins: Scripter.activeDocument.margins.set(..)
- setbaseline
- closedoc: Scripter.activeDocument.close()
- havedoc: Scripter.activeDocument.available()
- opendoc: Scripter.openDocument()
- savedoc:
- getdocname
- savedocas
- setinfo
- setunit
- getunit
- loadstylesfromfile
- setdoctype
- closemasterpage
- masterpagenames
- editmasterpage
cmdsetprop.cpp
- setgradfill
- setgradstop
- setfillcolor
- setfilltrans
- setfillblend
- setlinecolor
- setlinetrans
- setlineblend
- setlinewidth
- setlineshade
- setfillshade
- setlinejoin
- setlineend
- setlinestyle
- setcornerrad
- setmultiline
cmdstyle.cpp
- createparagraphstyle
- createcharstyle
cmddialog.cpp
- newdocdia: Scripter.dialogs.newdocdia (added in gsoc2011)
- filedia
- messdia: Scripter.dialogs.alert(..)
- valdialog
- newstyledialog
guiapp.cpp
- messagebartext
- progressreset
- progresssettotalsteps
- progresssetprogress
- setcursor
- docchanged: Scripter.activeDocument.modified (property)
- zoomdocument: Scripter.activeWindow.zoom (property)
- scrolldocument: Scripter.activeWindow.scroll(..)
cmdgetprop.cpp
- getobjecttype: Scripter.activeDocument.activeItem.itemType (property)
- getfillcolor: Scripter.activeDocument.activeItem.fillColor (property)
- getfilltrans
- getfillblend
- getlinecolor: Scripter.activeDocument.activeItem.lineColor(poperty)
- getlinetrans
- getlineblend
- getlinewidth: Scripter.activeDocument.activeItem.lineWidth (property)
- getlineshade: Scripter.activeDocument.activeItem.lineShade (property)
- getlinejoin
- getlineend
- getlinestyle: Scripter.activeDocument.activeItem.lineStyle (property)
- getfillshade
- getcornerrad: Scripter.activeDocument.activeItem.cornerRadius (property)
- getimgscale: Scripter.activeDocument.activeItem.{imageXScale, imageYScale} (property)
- getimgname:
- getposi: Scripter.activeDocument.activeItem.{xPos, yPos} (property)
- getsize: Scripter.activeDocument.activeItem.{width, height} (property)
- getrotation: Scripter.activeDocument.activeItem.rotation (property)
- getallobj: Scripter.activeDocument.items(property), Scripter.activeDocument.activePage.items (property)
svgimport.cpp
- placevec
- placesvg: Scripter.activeDocument.activePage.placeSVG(..)
- placeeps: Scripter.activeDocument.activePage.placeEPS(..)
- placesxd: Scripter.activeDocument.activePage.placeSXD(..)
- placeodg: Scripter.activeDocument.activePage.placeODG(..)
cmdobj.cpp
- newrect: Scripter.activeDocument.activePage.newRectangle(..)
- newellipse: Scripter.activeDocument.activePage.newEllipse(..)
- newimage: Scripter.activeDocument.activePage.newImage(..)
- newtext: Scripter.activeDocument.activePage.newText(..)
- newline: Scripter.activeDocument.activePage.newLine(..)
- polyline
- polygon
- bezierline
- pathtext
- deleteobj
- textflow
- objectexists
- setstyle
- getstylenames
- duplicateobject
cmdcolor.cpp
- colornames
- getcolor
- getcolorasrgb
- setcolor
- setcolorcmyk
- setcolorrgb
- newcolor
- newcolorcmyk
- newcolorrgb
- delcolor
- replcolor
- isspotcolor
- setspotcolor
cmdtext.cpp
- getfontsize
- getfont
- gettextsize
- gettextlines
- getcolumns
- getlinespace
- gettextdistances
- getcolumngap
- getframetext.
- gettext
- setboxtext
- inserttext
- setalign
- setfontsize
- setfont
- setlinespace
- setlinespacemode
- settextdistances
- setcolumngap
- setcolumns
- selecttext
- deletetext
- settextfill
- settextstroke
- settextscalingh
- settextscalingv
- settextshade
- linktextframes
- unlinktextframes
- tracetext
- istextoverflowing
- hyphenatetext
- dehyphenatetext
- setpdfbookmark
- ispdfbookmark
Not implemented in old scripter
- Scripter.dialogs.{bookmarks, documentChecker, layers, mainWindow, nodes, pages, properties, scrapbook}
- code security checker
- menu hooks
Testing the existing scripts
Scripts distributed with Scribus
The corrected scripter must be committed to trunk, too (may happen slightly before or after the Scripter 2 has been integrated)
Script | Status |
Autoquote | Not ported |
CandendarWizard | Not ported |
color2csv | Not ported |
ColorChart | Not ported |
csv2color | Not ported |
DirectImageImport | Not ported |
FontSmaple | Not ported |
Importscv2table | Not ported |
InfoBox | Not ported |
Scripts from the Scribus Wiki
The most popular Scripts from the Wiki should be ported to Scripter 2. Until after the release of 1.6 (with Scripter 2) we will have to keep both versions of the scripts in there.
Other Scripts can be ported later, after people will have started using them
Script | Status |
Scripts from the community
We will get in touch with people having "private" scripts and help them migrate their scripts. It may be a chance to get a list of such scripts or pushing some people to make their scripts public.