Scripting

From GNUstepWiki

(Difference between revisions)
Revision as of 07:50, 18 February 2005
Stefan Urbanek (Talk | contribs)

← Previous diff
Current revision
Stefan Urbanek (Talk | contribs)

Line 1: Line 1:
-GNUstep offers following possibilities for scripting:+Scripting is a process for task automation, functionality enhancing, fast prototyping, batch processing, etc. The process is done by a scripting language interpreter.
-* [[StepTalk]] - official GNUstep scripting framework+== Introduction ==
-* [[GNUstep Guile]] - GNUstep extension to make use of the GUILE scripting language.+
-== For Users ==+There are situations, where you would like to:
-* [[Scripting introduction]]+* quickly create a handy program
-* [[Objects in scripting environments]]+* do some computation with numbers or objects
-* [[StepTalk shell]]+* process some objects with one or more applications in a batch
-* [[Scripts]]+* use functionality of some framework without an application
-* [[Using scripting capabilities of bundles]]+* test your program
 +* ...
 +Those are situations where you can do scripting. Well, what the scripting is? It can be thought as manipulating objects in a handy way without need of long development process. The GNUstep environment offers more possibilities for scripting:
-== For Developers ==+* [[StepTalk]] - official GNUstep, language independent, scripting framework with [[Smalltalk]] as the default scripting language.
 +* [[GNUstep Guile]] - GNUstep extension to make use of the [[GUILE]] scripting language.
-* [[Script objects]]+Following sections describes StepTalk scripting capabilites. For more information, you can also consult articles in the [[:Category:Scripting|scripting category]].
-* [[Adding scripting support]] to a Tool or an Application - how to execute scripts from an application+ 
-* [[Scripting in applications]] - how to create an application automatically scriptable+== Ways of scripting ==
-* [[Scripts for applications and tools]]+ 
-* [[Advertising scripting capabilities]] in Bundles - how to say, what can be used in a bundle for scripting+How would you like to do that? Interactively, in a batch, from an application, from automaticaly generated script or from a database? There are many ways how you can do the scripting.
-* [[Scripting language bundles]] - how to create a language bundle+ 
-* [[Scripting ideas]] - notes for the future of StepTalk (optional TODO list)+'''Shell''' - a handy tool for interactive scripting with GNUstep objects. StepTalk offers a tool named ''stshell ([[StepTalk tools]])''.
 + 
 +'''Stand-alone script execution''' - The tool '''stexec ([[StepTalk tools]])''' allows you to execute scripts stored in files. Just use:
 + 
 + > stexec myscript.st
 + 
 +'''Applications''' can have built-in scripting capabilities. To access them, just find the ''Scripting'' menu item, which opens standard application scripting panel with all application related scripts. For more information, read the [[Application scripting]].
 + 
 +'''Any tool''' can create a scripting interface for users, where users can do customisation of the tool's behaviour. If you are interested in adding scripting extension to your tool, follow: [[Scripting support]].
 + 
 +== Languages ==
 + 
 +It is language independent - it uses languages as separate bundles. It can be extended by the "language bundles" providing other scripting languages. One experimental language bundle for Guile is included in the sources package.
 + 
 +See: [[Scripting language bundle]]
 + 
 +== References ==
 + 
 +'''For developers (mainly)'''
 +* [[Scripting of frameworks]] - how to make your framework or bundle scriptable
 +* [[Scripting support]] - how to make your product scriptable
 +* [[Scripting language bundle|Language bundle]] - how to add a new language
 +* [[Script management]]
 + 
 +'''For users (mainly)'''
 +* [[Scripting context]] - what object do you know in scripts? what you should do with them?
 +* [[Script objects]] - how to build objects with script-defined behaviour
 + 
 +* [[:Category:Scripting]] - everything about scripting in GNUstep
 + 
 +== Future ==
 + 
 +See: [[Scripting ideas]]
 + 
 +[[Category:Scripting]]

Current revision

Scripting is a process for task automation, functionality enhancing, fast prototyping, batch processing, etc. The process is done by a scripting language interpreter.

Contents

Introduction

There are situations, where you would like to:

  • quickly create a handy program
  • do some computation with numbers or objects
  • process some objects with one or more applications in a batch
  • use functionality of some framework without an application
  • test your program
  • ...

Those are situations where you can do scripting. Well, what the scripting is? It can be thought as manipulating objects in a handy way without need of long development process. The GNUstep environment offers more possibilities for scripting:

  • StepTalk - official GNUstep, language independent, scripting framework with Smalltalk as the default scripting language.
  • GNUstep Guile - GNUstep extension to make use of the GUILE scripting language.

Following sections describes StepTalk scripting capabilites. For more information, you can also consult articles in the scripting category.

Ways of scripting

How would you like to do that? Interactively, in a batch, from an application, from automaticaly generated script or from a database? There are many ways how you can do the scripting.

Shell - a handy tool for interactive scripting with GNUstep objects. StepTalk offers a tool named stshell (StepTalk tools).

Stand-alone script execution - The tool stexec (StepTalk tools) allows you to execute scripts stored in files. Just use:

> stexec myscript.st

Applications can have built-in scripting capabilities. To access them, just find the Scripting menu item, which opens standard application scripting panel with all application related scripts. For more information, read the Application scripting.

Any tool can create a scripting interface for users, where users can do customisation of the tool's behaviour. If you are interested in adding scripting extension to your tool, follow: Scripting support.

Languages

It is language independent - it uses languages as separate bundles. It can be extended by the "language bundles" providing other scripting languages. One experimental language bundle for Guile is included in the sources package.

See: Scripting language bundle

References

For developers (mainly)

For users (mainly)

  • Scripting context - what object do you know in scripts? what you should do with them?
  • Script objects - how to build objects with script-defined behaviour

Future

See: Scripting ideas