On Monday 12 June 2017 04:52 AM, Glenn Hoetker wrote:
Iâm crafting a short program to help me process a large text file (specifically: extract, sorting, and regularizing the âkeywordâ fields of a large BibTex file). Especially since I donât really know what Iâm doing, working in a Playground has been a great development environment. Now that the program is complete (under 30 lines, wonderful), I want to be able to save it for future reference (and perhaps for future use). If Iâd written a shell script, Iâd just save âfixBibDeskKeyWords.shâ to a directory. Iâm not sure what to do in the Pharo environment, thought.
Playground saves your scripts in pharo-local/play-cache folder. Use Tools->File Browser to look in play-cache/ or pharo-local/play-cache/ folder. You will find all your playground scripts saved in *.ph files. Note down this name (or rename it to something easy to remember) and make a copy. Pass this file as an argument: $ ./pharo Pharo myscript.st BTW, Playground is just that and a file is for unstructured stream of bytes. You may want to start using System Browser to create classes and methods, tests etc. for code worth preserving. Pharo offers you a lot of services like live debug, cross-refs, tracking changes, packaging etc. It is a lot easier than you think ;-). HTH .. Subbu