vitor Posted February 26, 2024 Posted February 26, 2024 Usage Compare the two most recent clipboard entries via the clipdiff keyword. Press ↩ on the result to copy it to the clipboard. Compare two files or folders via the Universal Action. ⤓ Install on the Alfred Gallery | Source
vitor Posted February 26, 2024 Author Posted February 26, 2024 How to Report Issues Accurate and thorough information is crucial for a proper diagnosis. At a minimum, your report should include:The debugger output of the failing action.Your installed versions of: the Workflow, Alfred, and macOS. Be precise, don’t say “latest”.More information is always welcome. A short video of the steps with the debugger open may help to identify the problem faster.
luciano Posted May 25, 2024 Posted May 25, 2024 Not quite sure I understand output from clipdiff. Let's say these are the last two lines in clipboard: Apple, banana, orange. Apple, banana, grape. The difference is that the first contains orange, and the second contains grape. But the output from clipdiff just seems to have pasted in the last two clipboard entries. --- /Users/rossahmed2/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.simplediff/clip1.txt 2024-05-25 08:00:46 +++ /Users/rossahmed2/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.simplediff/clip0.txt 2024-05-25 08:00:46 @@ -1 +1 @@ -Apple, banana, orange. +Apple, banana, grape.
vitor Posted May 25, 2024 Author Posted May 25, 2024 The diff is line based. It shows you the range of lines where there is a difference and what lines are different by showing which would need to be removed or added to make the text identical. To learn more, read the diff Wikipedia page.
luciano Posted May 26, 2024 Posted May 26, 2024 Thanks for that, although I'm still struggling to be honest. I'm used to setdiff function in R. This compares one vector to another and the output is elements that are different - see attached. Is there any way of doing this in Alfred? c("Apple", "banana", "orange") -> a c("Apple", "banana", "grape") -> b setdiff(a,b) [1] "orange"
vitor Posted May 26, 2024 Author Posted May 26, 2024 29 minutes ago, luciano said: Is there any way of doing this in Alfred? Yes, any text you can produce, e.g. by leveraging the R command-line tool, you can show in the Text View. This workflow works as a proof of concept. It’s not going to support all different diffing methods, it supports the one which can be produced by tools which ship with macOS, which is also a format most other popular tools use and thus most users know.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now