Copyq: Divide clip in to smaller clips

Created on 20 Aug 2017  路  3Comments  路  Source: hluk/CopyQ

I was looking for a way to take a clip with a lot of lines of text and separate each line into individual clips.
I know this could be done manually, but I have a list as an ascii text file that has hundreds of lines that I would like each line to be it's own clip. To manually clip each one would take awhile.

Most helpful comment

Following command could help (how to add this to CopyQ).

[Command]
Command="
    copyq:
    var text = str(input())
    var items = text.split('\\n').reverse()
    add.apply(this, items)"
Icon=\xf0ca
InMenu=true
Input=text/plain
Match=\\n
Name=Split
Shortcut=ctrl+shift+s

All 3 comments

Following command could help (how to add this to CopyQ).

[Command]
Command="
    copyq:
    var text = str(input())
    var items = text.split('\\n').reverse()
    add.apply(this, items)"
Icon=\xf0ca
InMenu=true
Input=text/plain
Match=\\n
Name=Split
Shortcut=ctrl+shift+s

Could Help!?! That's exactly what I was looking for! Thank you!!
I'm new to this JavaScript or is it QTScript? Do you know of some kind of tutorial for this Scripting language?

Yup, it's Qt Script but it's basically the same as JavaScript (only a few functions may not be available).

To dive deeper, definitely check these links:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maricn picture maricn  路  3Comments

lepalmtree picture lepalmtree  路  7Comments

reagle picture reagle  路  4Comments

sebflipper picture sebflipper  路  8Comments

orschiro picture orschiro  路  7Comments