ScripterNG/Development/PortingOldScripter: Difference between revisions
Line 253: | Line 253: | ||
|Status | |Status | ||
|- | |- | ||
| Autoquote | Not ported | | | 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 | |||
|} | |} | ||
Revision as of 14:24, 28 September 2011
Old functions and their new equivalents
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
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.