• Erik Brodnick

Extending the Desktop App with Plugins

Updated: Jan 27

Create Custom File Actions to Tailor Yadle to Your Workflow


In an earlier blog post, we introduced the Yadle Desktop app and it’s added capabilities compared to the web app. We encourage you to read that one first and then continue here. What we will be focusing on in this post is how to define your own custom actions. As a result, instead of just simply opening a file (which is also useful!), more specific file transformations can be called upon such as copying to a specific project folder or converting to a different format. Yadle provides the framework for developers to call their own scripts to be used as file actions.

Installing Example Desktop Plugins

The team at Yadle has come up with a few example actions that can be installed for your own use as well. The main purpose of these examples, which are published on Yadle’s public GitHub, is to provide specific implementation examples to use as templates for creating more sophisticated actions. For our customers who do not have dev resources for things such as this, our team is available to work with you to define and implement your own custom plugins. Ok, let’s get these example plugins installed.


The following steps and screenshots are from a Windows PC. For instructions on macOS and Linux refer to the readme on the desktop-plugins-examples Github page.


1. Download the GitHub repo as a ZIP archive from https://github.com/yadleinc/plugins-desktop.




2. Double click on the windows_installer.bat file to install the example plugins on Windows.




That’s it! The example plugins are now installed locally and immediately available for use.


Try the Plugins!


Set Bucket -> Add To Bucket

First the destination folder "bucket" is set. We'll create a folder on the Desktop named "My Bucket" for this. Now directly from search results, we can go through and select "Copy to Bucket" for desired files to be copied from their source location to our bucket.



Tag a File as #favorite

This plugin uses the Yadle API to tag files as #favorite with just the click of a mouse. In the example below, three files are tagged using the "Tag as favorite" action from the dropdown menu. We then search using the tag #favorite which returns only the 3 tagged files.


Customize The Menu


The Yadle desktop app gives users complete control over not just the scripts that can be called, but also how the menu appears on a per user basis. Depending on the operating system and logged in user, different menu structures and options can be presented. Enabling specific workflow tailored plugins for each of your organizations teams.


The menu layout customization is handled by a single plugins.json file. Here is a sample plugins.json file that would display the same menu actions as shown above.


[
  {
    "item": "Set Bucket Folder",
    "plugin": "set_bucket.json"
  },
  {
    "item": "Add to Bucket",
    "plugin": "bucket.json"
  },
  {
    "item": "Tag as Favorite",
    "plugin": "tag.json"
  }
]

Notice that each menu "item" has a corresponding json file with additional details. Here is what the set_bucket.json looks like.


{
  "name": "Set Bucket Folder",
  "command": [
    "$HOME/yadle/plugins/set_bucket.sh"    
    ],
  "enabled": true,
  "platforms": {
    "win32": true,
    "darwin": true,
    "linux": true    
  }
}

In the plugin json file, the path of the script that is to be executed is put in the "command" value. In this file is where you might also choose to turn this plugin off for certain users or to only make accessible when on certain operating systems.


Check out Yadle's GitHub for further information about customizing the desktop app menu with plugins. We'd love to hear what would be a useful plugin for you!



15 views

Recent Posts

See All
Yadle_Logo_01.png

© 2020, Datawhere | Your Privacy | Contact

  • Instagram_Logo
  • Linkedin_Logo