Posts tagged python

  • Workflow build script for Alfred

    A script for building Alfred workflows. Focussed on Python-based workflows.

    Creates an .alfredworkflow file from the contents of the specified directory. The generated file’s name is based on the workflow’s name and version extracted from info.plist.

  • Text Table in Python

    Python class to pretty-print tabluar data in a terminal.

    t = Table(titles=['Name', 'Position', 'Goals'])
    t.add_row(['Dave Smith', 'striker', 12])
    t.add_row(['Angus McGregor', 'full back', 1])
    print(t)
    

    produces:

         Name      | Position  | Goals
    ----------------------------------
    Dave Smith     | striker   |    12
    Angus McGregor | full back |     1