Cluster (for Bunch) Alfred Workflow

  Keyword Triggered Functionality
    Bunches
      Open Bunch
        Keyword = bbo
        Opens a closed bunch
        You choose from a list of closed bunches
        Hold CMD to edit the bunch instead
      Close Bunch
        Keyword = bbc
        Closes an open bunch
        You choose from a list of open bunches
        Hold CMD to edit the bunch instead
      Toggle Bunch
        Keyword = bbt
        Toggle a bunch open/closed from a list of all bunches
        The bunches listing includes a red/greed icon at the start of the entry indicating if the bunch is currently closed (red) or open (green).
        Hold CMD to edit the bunch instead
      Edit Bunch
        Keyword = bbe
        Edit a bunch in the editor specified in the Bunch app. You choose from a list of bunches.
      Edit Last Modified Bunch
        Keyword = bbl
        Edit the last modified bunch in the editor specified in the bunch app.
      Create a New Bunch
        Keyword = bbn
        Create a new Bunch based on a list of options
          Option = Empty
            Specify a name and create an empty bunch file in the app’s bunch folder
          Option = Example
            Specify a name and create a bunch file in the app’s bunch folder containing the content of the app’s example bunch file
          Option = Personal
            Specify a name and select an existing bunch to create a copy of that bunch file but with the specified name, in the app’s bunch folder
          Option = Current
            Specify a name and create an bunch file populated with the currently open app names, in the app’s bunch folder
        Hold CMD to override and instead copy a list of open apps to the clipboard ready to paste into a bunch
      Archive a Bunch
        Keyword = bba
        Select a bunch from a list of all bunches and archive it so it no longer shows
          This works by renaming the bunch’s file extension to “._bunch”
      Restore Archived Bunch
        Keyword = bbr
        Select an archived bunch from a list of all archived bunches and restore it to being an active bunh
          This works by renaming the bunch’s file extension to “.bunch”
      Delete Bunch
        Keyword = bbd
        Select a bunch to delete
          The bunch file is actually moved to the trash rather than being outright deleted, and unless you disable the configuration setting, you also get a confirmation dialog.
      Copy Bunch Information
        Keyword = bbi
        Select a bunch and copy information about it
          Name
            Copies the base file name of the selected bunch
          Title
            Copies the title of the selected bunch. If no title is defined, it will default to the name
          File Name
            Copy the file name of the selected bunch
          File Path
            Copies the absolute file path of the selected bunch
          URL - Open Bunch By Name
            Copies a URL that when opened will cause the relevant Bunch app to open the selected bunch
          URL - Close Bunch By Name
            Copies a URL that when opened will cause the relevant Bunch app to close the selected bunch
          URL - Toggle Bunch By Name
            Copies a URL that when opened will cause the relevant Bunch app to toggle the selected bunch
          URL - Edit Bunch By Name
            Copies a URL that when opened will cause the relevant Bunch app to edit the selected bunch
    Bunch App
      Keyword = bbb
      Lists various options to indirectly control the Bunch app
        Force Refresh
          Triggers Bunch to reload the bunch information
        Quit
          Quits the Bunch app
        Restart
          Quits and then starts the Bunch app
        Reveal
          Open the folder (in Finder) configured in Bunch that holds the bunch files.
        Open Preferences
          Open the Bunch app’s settings
        Change Preference
          Toggle Bunches
            Toggles the Bunch app’s Toggle Bunches setting
          Single Bunch Mode
            Toggles the Bunch app’s Single Bunch Mode setting
          Preserve Open Bunches
            Toggles the Bunch app’s Preserve Open Bunches setting
          Debug Level
            There is a bug in Bunch at the moment with the URL scheme that means this does not work (including for the CLI Bunch app). Brett has picked up my issue for this in the GitHub repo and it will be fixed in due course.
            When it works, you will be able to set the debug level for 0-4, though I worked out the appropriate names for these levels and they are shown in the list you are presented with.
          NOTE: While technically a preference, the bunches folder seems to be one that is set more frequently, so I pulled out to a higher level for convenience
        Restore Example
          Places a copy of the example file for the application in the bunches folder.
        Switch Bunches Folder
          This is reliant on some tricker configuration that I will document. It allows you to specify a list that Alfred can display and you can choose from. The list should define folder locations that you can then choose to switch between setting the Bunch app’s bunch directly. Think of it like favourite folders rather than having to navigate each time.
            If you want to have a go, take a look at https://www.alfredapp.com/help/workflows/inputs/script-filter/json/ and make sure you set the ‘arg’ to be the absolute path of the folder you want to use.
        Set Bunches Folder
          Rather than switching between folders, this flow lets you browse for a folder. The selected folder will then be the one the Bunch app uses to read bunch file data from.
    Help
      Help
        Keyword = bbh
        Displays a list of help options to choose from
          Bunch Help
            See below
          Cluster Help
            See below
          Bunch Help - Search
            See below
      Bunch Help
        Keyword = bhb
        This links out to the Bunch documentation web site
      Cluster Help
        Keyword = bhw
        This will link out to the online documentation once I have created it
      Bunch Help - Search
        Keyword = bhs
        Carry out a keyword search on the Bunch web site
          I had to use Google for this. The usual Duck Duck Go search always seemed to yield no search results on the site.
    Tags
      Open Bunches Tagged
        Keyword = bto
        You select a tag from a pre-populated list of available tags and any bunch with that tag is then opened by Bunch
      Open Bunches With Tags
        Keyword = bot
        You manually enter tags into Alfred (you can combine with Bunch’s and/or syntax as per the docs), and Bunch will then open any matching bunches
      Close Bunches Tagged
        Keyword = btc
        You select a tag from a pre-populated list of available tags and any bunch with that tag is then closed by Bunch
      Close Bunches With Tags
        Keyword = bct
        You manually enter tags into Alfred (you can combine with Bunch’s and/or syntax as per the docs), and Bunch will then close any matching bunches
      Toggle Bunches Tagged
        Keyword = btt
        You select a tag from a pre-populated list of available tags and any bunch with that tag is then toggled by Bunch
      Toggle Bunches With Tags
        Keyword = bttt
        You manually enter tags into Alfred (you can combine with Bunch’s and/or syntax as per the docs), and Bunch will then toggle any matching bunches
    Cluster Workflow
      Cluster Workflow Configuration
        Keyword = bbw
        This lists various things you can do to the workflow. Or rather, at this point just one thing. I will add more in here later, but I won’t be adding every config item.
          Toggle App
            Running this flow will change the workflow configuration to toggle the app the workflow will interact with between Bunch and the Bunch Beta app. You need to have the appropriate app(s) installed for the change in setting to work. It is a convenience to save you having to jump into the config. In testing this workflow I needed to switch so I added it as an option
      Bunch Information to Help with Debugging
        Keyword = ÷d
        Lists various options that are occasionally be useful in trying to debug what is going on with the workflow. Generally nothing here will be of use unless you are having problems and want to check some settings. I expect I’ll build this out into a debug report at some point like I have for other Alfred workflows I have created.
          Bunch App Name
            Displays the name of the Bunch app being controlled based on the configuration of the workflow
          Bunches Folder
            Displays the path to the bunches folder that the Bunch app is currently configured to use
          Bunches
            Displays a list of bunches available to Bunch
          Flow End
            Displays information about the configuration of what happens at the end of each flow
          Tags
            Displays a list of the tags specified in the available data files (bunch and frontmatter).
      Lab
        Keyword = ÷t
        Just a little place I can add functions while I’m testing them or things useful to me while I’m in this initial build process
  Configuration
    Enable Beta Control
      Toggling this on will switch to the Beta version of the Bunch app rather than the standard one. You have to have the relevant version(s) installed to use the workflow, but the workflow is designed to work with both.
    Enable Audio Completion
      Turn an audio notification on/off that occurs on completion of a flow
    Audio to Play on Completion
      Specify the audio file to play on completion if Enable Audio Completion is enabled.
    Keywords
      There are a lot of keywords - They all begin “[Keyword]". You can modify them to specify your own trigger keywords, or remove any you do not wish to have.
    Bunch Locations
      The Switch Locations function lets you quick switch between different bunch folders without having to browse for them (another option). To configure this, you have to fill in a set of JSON for an Alfred script filter. I’ll document this properly when I do the documentation, along with an example, but if you already know about Alfred’s use of this, you can just build your own and set the `arg` property as the absolute path to the folder.
    Confirm Bunch Deletion
      Enables a confirmation for when you choose to delete a bunch file, giving you the chance to change your mind.
  VERSION: 0.1.0