Last active
June 1, 2023 20:53
-
-
Save T-Rave/3400f876e0f4226a09681e069bf28a68 to your computer and use it in GitHub Desktop.
Alfred, Mac OS X app, full clipboard dump to text file
This file contains 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
## Must have sqlite3 installed. Homebrew user? brew install sqlite | |
## Can be ran directly in command line and will place file directory where ran | |
## Remove `-header` if you don't want the output to have the column name `item` | |
## Checkout more options and Workflow - https://github.com/T-Rave/alfred-clipboard-dump | |
# dumps output with list option since single column. Produces cleaner data without double quotes | |
sqlite3 -header -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard;" > clipboard-dump.txt | |
# dumps full table to csv format | |
sqlite3 -header -csv ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT * FROM clipboard;" > clipboard-dump.csv | |
# dumps only items in descending (inverse) order with no column name | |
sqlite3 -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard ORDER BY item DESC;" > clipdump.txt | |
# To limit line output use `LIMIT n` in the `SELECT` statement. Example of outputing the first 5 items | |
sqlite3 -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard LIMIT 5;" > clipboard-dump.txt | |
# To limit output from last records up. Example of outputting the last 5 items | |
sqlite3 -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard ORDER BY item DESC LIMIT 5;" > clipboard-dump.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment