Closed LinqLover closed 1 year ago
convert classic figure scripts (%%) to modern \ExecuteSmalltalkScripts (2ef83d1241dac6b2a42f6a05bec1bf2e92ab6e54)
%%
\ExecuteSmalltalkScript
This did it:
| matcher files | matcher := '%%\{(SBESqueakPicture)(([^\r\n]*([\r\n]|\r\n))%%)*(])\}' asRegex. files := SBEScriptBuilder getTexFilesIn: SBEScriptBuilder resourceDirectory. files collect: [:file | file -> (SBEScriptBuilder collectScriptsFromFile: file)] as: Dictionary. files do: [:file | file writeStreamDo: [:stream | | translated | translated := matcher copy: file contents translatingMatchesUsing: [:s | '\begin{ExecuteSmalltalkScript}' , (matcher subexpression: 5) , (((matcher subexpressions: 2) , (matcher subexpressions: 4) , (matcher subexpressions: 6)) join) , (matcher subexpression: 5) , '\end{ExecuteSmalltalkScript}']. stream reset; nextPutAll: translated]]
Migrate all senders of SBESqueakPicture to SBEScreenshotRecorder (716c259cc9cbe38f38ef38606b8c200aa7b551f2)
Regex:
SBESqueakPicture( writeTo: .* (frame: .* ))using:(?= \[)
->
SBEScreenshotRecorder$1building:
extract: remove deprecated code (SBESqueakPicture, #collectScriptsClassicFromStream:) (6ae87c2)
convert classic figure scripts (
%%
) to modern\ExecuteSmalltalkScript
s (2ef83d1241dac6b2a42f6a05bec1bf2e92ab6e54)This did it:
Migrate all senders of SBESqueakPicture to SBEScreenshotRecorder (716c259cc9cbe38f38ef38606b8c200aa7b551f2)
Regex:
->
extract: remove deprecated code (SBESqueakPicture, #collectScriptsClassicFromStream:) (6ae87c2)