Last active
January 8, 2021 00:57
-
-
Save martinandersen3d/37fa72cfecf41639290e66266e25c45f to your computer and use it in GitHub Desktop.
CopyQ Export CLI commandline - How to export all tabs to .txt files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CopyQ - How to export ALL you tabs from copyq to text files! | |
# Use Powershell for the export | |
# CopyQ Help, with command: copyq help | Write-Output | |
# https://copyq.readthedocs.io/en/latest/command-line.html | |
# http://manpages.ubuntu.com/manpages/bionic/man1/copyq.1.html | |
# ------------------------------------------------------- | |
# STEP 1. List the availible tabs with command: | |
copyq tab | Write-Output | |
# ------------------------------------------------------- | |
# STEP 2. open "Windows Powershell ISE", create a new "CopyQ_Export.ps1" file. Copy/Paste the content below | |
# Replace the output from step 1 with the names, that my tabs where called | |
$exportTab = @( | |
'Bash Info', | |
'Bash File', | |
'Bash Folder', | |
'Bash Utils', | |
'Choco', | |
'Git Commit', | |
'Git Branch', | |
'Git Diff', | |
'Git Log', | |
'Git Merge', | |
'Git Remote', | |
'Git Reset', | |
'Laravel Cmd', | |
'Npm', | |
'Regex', | |
'Vue', | |
'MySql' | |
) | |
foreach ($i in $exportTab) { | |
copyq eval -- "tab('$i'); for(i=size(); i>0; --i) print(str(read(i-1)) + '\n');" | Write-Output > "$i.txt" | |
} | |
# ------------------------------------------------------- | |
# Final note: I'm half angry that I need to code, to get simple stuff out of a GUI program! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment