Skip to content

3. How to write a plugin

corey edited this page Jan 9, 2023 · 4 revisions

Conversion

Seer takes the first argument as the executor and then replaces the placeholders. ${input_file} is the absolute file path you just triggered. ${output_file} is the temp file path used to save converted file.

C:/ApkMetaInfo2Json/ApkMetaInfo2Json.exe ${input_file} ${output_file}.json
  • process

    1. A file is triggered by SPACE
    2. Seer searches from plugin settings and finds that apk is defined as a plugin type
    3. Seer runs ApkMetaInfo2Json.exe with defined parameters
      • In this case, ApkMetaInfo2Json.exe read contents from the triggered apk file, then write a json file at ${output_file}
    4. When the ApkMetaInfo2Json.exe finishes and exits, Seer will go to the temporary directory to read the json file and display it.
  • A plugin can be any executable program

  • Usually such plugins generate a temporary file.

    • Seer will automatically delete temporary files older than 20 days.
    • Temporary files will be removed by adding the parameter ${no_cache} at the end of the commands.

Embedded Window(OIT)

This kind of plugin can customize the display instead of the built-in display mode of the Seer.

  • The Qt/C++ example can be found here: FontViewer
  • The Python example for Scripts module can be found here: ipynb