From 33a48f7cd2c0e97c185e7a28b72cf8c64c9b577c Mon Sep 17 00:00:00 2001 From: ruidajo Date: Thu, 31 Mar 2022 22:49:43 -0500 Subject: [PATCH] Creating external word cloud generator for Nitter user. --- .../instance/externalWordCloud.st | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Datanalitica.package/NitterUser.class/instance/externalWordCloud.st diff --git a/Datanalitica.package/NitterUser.class/instance/externalWordCloud.st b/Datanalitica.package/NitterUser.class/instance/externalWordCloud.st new file mode 100644 index 0000000..f527851 --- /dev/null +++ b/Datanalitica.package/NitterUser.class/instance/externalWordCloud.st @@ -0,0 +1,21 @@ +accessing +externalWordCloud + + | text outputFile | + outputFile := (self folder / 'nube.png')fullName. + text := (self folder / 'texto.txt')fullName. + OSSUnixSubprocess new + command: 'wordcloud_cli'; + arguments: { '--text' . text . + '--imagefile' . outputFile . + '--color' . '#5B83DE' . + '--width' . '1153' . + '--height' . '357' . + '--background' . 'white' . + '--mode' . 'RGBA' . + '--stopwords' . 'stopwords-es.txt' . + '--mask' . 'nube-mascara.jpg'}; + workingDirectory: self folder fullName; + redirectStdout; + redirectStderr; + runAndWaitOnExitDo: [ :process :outString | ^ outputFile asFileReference ] \ No newline at end of file