Skip to content

export to text in specific format #2901

Answered by hluk
noideawhatshappening asked this question in Q&A
Discussion options

You must be logged in to vote

"Shortcut1" copies the text in a tab called "notes", in an item that has the tag "title". This item is emptied before copying something new.

I hope the following command help (here is how to add the command to CopyQ):

[Command]
Command="
    copyq:
    tab('notes');

    // Remove \"title\" tagged item
    const sel = ItemSelection().select(/title/, plugins.itemtags.mimeTags);
    sel.removeAll();

    // Send Ctrl+C to the active window to copy
    copy();
    const text = clipboard();
    let newItem = {};
    newItem[mimeText] = text;
    newItem[plugins.itemtags.mimeTags] = 'title';
    add(newItem);"
Icon=
IsGlobalShortcut=true
Name=Shortcut 1

"Shortcut3", exports to a text file.…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@noideawhatshappening
Comment options

@noideawhatshappening
Comment options

Answer selected by noideawhatshappening
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants