Robofont shell output also inside shell


  • admin

    @RafaŁ-Buchner yes, thanks for the suggestion. it’s on my to-do list.

    see also Editing the documentation if you wish to submit changes directly.


  • admin

    @bahman @RafaŁ-Buchner @ThunderNixon I’ve collected your instructions for running scripts from SublimeText / Atom / VS Code into a new How-To: Using external code editors to run scripts in RoboFont

    I hope it’s all correct, please double check when you can. thanks!



  • Thank you Gustavo, the only thing missing for the sublime text part is the code to create the build system. So I would suggest changing the instruction to match that. Because right now your instructions are referring to a file that is missing in your page.


  • admin

    @bahman yep, I noticed that too – fixed. two very sneaky bugs btw :) 🐞 🐞




  • admin

    @bahman thanks. added to the docs.



  • @frederik @gferreira how does RoboFont handle output, internally? Perhaps it traps stdout and stderr in order to display them in the Output window?

    On Version 3.3b (build 1910091627) if I call $ echo "print('hello')" > /tmp/foo.py && roboFont -p /tmp/foo.py I’m seeing nothing either in RoboFont’s output window, in the shell nor in ~/Library/Application\ Support/RoboFont/robofont-3-py3.log

    I do wonder if RoboFont can somehow be configured to redirect stdout and stderr to the shell when in remote scripting mode. Perhaps optionally behind a command line switch, so if people prefer output in the Output window, they can still get that?


  • admin

    if the tool is installed correctly and pointing to the correct RoboFont, it should end up in the output window.

    there is no option to send output back to the remote terminal window...

    Screen Shot 2019-11-04 at 09.44.26.png



  • I figured out a small trick to have an output in the terminal's console:

    1. in the terminal app I'm going to the dir, where the log file is being stored
    2. I'm typing this: tail -f -n 100 robofont-3-py3.log

    I'm not a pro-UNIX-terminal-user, but this command displays the last 100 lines of the chosen text file. This particular command tracks for every change in the file.

    I'm wondering how to get rid of the left 'time' section of the *.log file. It takes to much space on the terminal and sometimes causes poor text wrapping. In general, the biggest issue of this is poor wrapping (maybe there is a way to make it better?)

    What is cool about this 'tailing', the terminal console won't crash along with RF. So if you are working on some crashy-crashy script/extension/font, the output text won't disappear when suddenly your RF dies (you don't have to waste additional time with opening logfile in the external code editor, as I did before).



  • If I want to have an almost pythonic "console" behavior, I'm doing the following:

    1. open two windows in my terminal
    2. setup tailing in one
    3. use robot font shell commands in the second

    It looks like this:
    Screenshot 2019-11-06 at 16.09.09.png

    With this I think it wouldn't be too hard to create python script for the console, that would create something more like "python console".



  • I created an alias for the terminal, which shortens the output a little bit. I'm not a master of the grep instructions so I wasn't able to get rid of the date. But I hope it will help you:

    alias robofontOutput="tail -f -n 100 ~/Library/Application\ Support/RoboFont/robofont-3-py3.log | sed 's/>   OUTPUT > ROBOFONT >>/>>>/; s/                     >>/>>/'"
    

    Cheers


Log in to reply