Can I make hidden folders within my robofont scripts folder?



  • I'm making a set of scripts to control glyph marks:
    https://github.com/thundernixon/robofont-marx

    Eventually, I'll probably turn these into an extension, but for now, I'm pretty happy to experiment with them as scripts.

    However, because their folder is a git project, it includes docs (working notes, Drawbot design experiments) and a folder with modules that the scripts import from. Both folders are important, but neither optimal to show in the menu.

    Is there a way to make these folders hidden in the RoboFont scripts menu?

    91a02e8c-2b3b-4885-b2db-0c777d3503fc-image.png

    Or, is this impossible to do, and should I just make them into an extension already?


  • admin

    hi @StephenNixon,

    as far as I know, this is currently not possible. if you don’t want some files to appear in the Scripts menu, don’t put them in the Scripts folder :)

    you can also try launching your scripts from the Scripting Window’s Script Browser. I normally use that during development, it helps me to keep the Scripts menu clean.

    hope this helps! cheers


  • admin

    @frederik would it be possible to add support for aliases in the Scripts folder? so we could collect scripts from different folders in the menu.


  • admin

    I know designers using symlinks in the RF scripting folder redirecting from a git repo... this works!


  • admin

    @frederik it works indeed! I had tried it with a folder alias, that did not work. but aliases to individual .py files appear in the menu… nice!

    so @ThunderNixon, you can keep your robofont-marx files somewhere else, and create aliases to individual scripts in the Scripts folder.



  • Awesome, thanks @gferreira and @frederik, this is helpful!



  • I'll also add this to the repo's readme, but should another person come across this, here's how I solved it.

    1. Put main folder (the full git repo) in my general folder for type/code repos (for me, this is at /Users/stephennixon/type-repos).
    2. Make a new, empty folder in my robofont scripts folder.
    3. In a terminal, use cd <new_folder_path> to navigate to the new, empty folder.
    4. Use ln -s <general_repos_path>/*.py . to symlink all the python files into the current directory. For me, this is:
    ln -s /Users/stephennixon/type-repos/robofont-marx/*.py .
    

    Works like a charm!

    91b6c84b-3821-4cc5-98af-c815665f01f1-image.png



  • UPDATE: actually, it works like a charm to put the script names in the menu without the other folders, however they stopped importing the code they needed, so they longer worked.

    Possibly, I'm just using the wrong import strategy, though.


  • admin

    In the case where your script becomes a package, this could idd fail, as import will not find the correct py files.

    I guess a strategy where the main.py (the symlinked one) adds the package to sys.path and imports the required bits and pieces to be executed...