Skip to content

Latest commit

 

History

History
73 lines (45 loc) · 2.05 KB

placeholder.md

File metadata and controls

73 lines (45 loc) · 2.05 KB

Placeholder

In this section, we'll walk you through writing a random emoji string as the placeholder.

Writing Placeholder

Commandline

In this example, you should build an executable binary file or write an executable shell script, you can get an argument from commandline.

And you can refer our sample code in commandline demo plugin.

HTTP

In this example, you need expose an endpoint /placeholder in your web server, we'll use post method to request you.

And you can refer our sample code in http demo plugin.

Python

In this example we create a placeholder file named placeholder.py, and writing the following content:

placeholder.py

QLExpress

In this example we create a placeholder file named placeholder.qlexpress, and writing the following content:

placeholder.qlexpress

Adding To Specification File

Add the following content to plugin-spec.yml:

Commandline

placeholder-updaters:
  - updater: "{entry}"
    preview-text: a commandline placeholder

HTTP

placeholder-updaters:
  - updater: "{entry}/placeholder"
    preview-text: 😁

Python

placeholder-updaters:
  - updater: ./placeholder.py
    preview-text: a python placeholder

QLExpress

placeholder-updaters:
  - updater: ./placeholder.qlexpress
    preview-text: 😁