clipboard#

class platypush.plugins.clipboard.ClipboardPlugin(*args, **kwargs)[source]#

Bases: RunnablePlugin

Plugin to programmatically copy strings to your system clipboard, monitor and get the current clipboard content.

Requires:

  • pyclip (pip install pyclip)

Triggers:

__init__(*args, **kwargs)[source]#
Parameters:
  • poll_interval – How often the loop() function should be execute (default: 15 seconds). NOTE: For back-compatibility reasons, the poll_seconds argument is also supported, but it’s deprecated.

  • stop_timeout – How long we should wait for any running threads/processes to stop before exiting (default: 5 seconds).

copy(text)[source]#

Copies a text to the OS clipboard

Parameters:

text (str) – Text to copy

main()[source]#

Implementation of the main loop of the plugin.

paste()[source]#

Get the current content of the clipboard