pilotmoon / PopClip-Extensions

Source code for extensions in the official PopClip Extensions directory.
https://www.popclip.app/extensions/
MIT License
1.92k stars 440 forks source link

How to execute python program via popclip #1202

Closed mafulong closed 2 years ago

mafulong commented 2 years ago

The ideal effect is that I can select a word text, and transfer it to my python3 program which can be called in my system environment. If it's not possible, my python program can also use the content from system clipborad, so I need poplicp to execute my python program. How to implement that? Thanks a lot.

pilotmoon commented 2 years ago

You can include as python script in the extension executable. What the script does, is of course up to you. This page https://github.com/pilotmoon/PopClip-Extensions details how to make extensions. You need to look at the section about Shell Script Extensions in particular. Also you might find examples in the source and source-contrib directories.