Closed andrewcincotta closed 6 months ago
Not sure if I understand. Do you need a script to print JSON-formatted text and row for each item in a tab in CopyQ? Something like:
for (var row = 0; row < size(); ++row) {
const text = str(read(mimeText, row));
print(JSON.stringify([text, row]));
print('\n');
}
My fault this is an old issue. If you're interested in what I'm working on, you can visit this repo!
Hello all! I am currently working on a Raycast extension, which you can find here! I have since found the quickest way to display clipboard contents would be through the use of the scripting API, in which a script could be passed on to the terminal command "copyq eval -{script}". I have successfully written a script in python that will get all of the clipboard contents of a given tab, and then save the contents and indexes to a 2d array.
My difficulty arises when I try to move this function into TypeScript. I am still a novice in both TypeScript and JavaScript, but I think recreating the following python script in JavaScript would be a great step into implementing this much needed change into my Raycast extension:
Essentially, I am looking for someone to assist me in creating a javascript source that runs the above script through the copyq eval command, and then populates items and rows with a list of clipboard contents and their respective index.