Robot for reading python documentation

Goal: To be able to read documentation like RPA.Robocorp.Vault or dict.get from python libraries.

Steps required:

  1. Download rcc and make it executable (from Robocorp `rcc` downloads).
  2. Create robot using rcc create rpahelpr and make it a python robot.
  3. Write little python code with your favorite editor: vim rpahelpr/task.py
  4. Run that robot using rcc run --robot rpahelpr/robot.yaml --silent -- RPA.Robocorp.Vault | vim - (and using your favorite editor as pager).
  5. Profit!

What should that code in task.py look like?

import sys

if __name__ == "__main__":
    for what in sys.argv[1:]:
        try: exec(f'import {what}')
        except: pass
        try: help(what)
        except: pass

… or something like that.

Ideas how you, dear reader, can make it even better:

  • make alias or shell script out of that rcc run ... command …
  • make it Assistant and use RPA.Dialogs.library to ask what help to look for …
  • make it available thru Github as a community assistant …
  • what ever else can you come up …

Happy hacking.

1 Like