vitor Posted February 26 Share Posted February 26 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 Link to comment
vitor Posted February 26 Author Share Posted February 26 When reporting issues, please include your exact installed versions of: The Workflow. Alfred. macOS. In addition to: The debugger output. Perform the failing action, click “Copy” on the top right and paste it here. Details on what you did, what happened, and what you expected to happen. A short video of the steps with the debugger open may help to find the problem faster. Thank you. Accurate and thorough information is crucial for a proper diagnosis which allows me to help you better. Link to comment
luciano Posted May 25 Share Posted May 25 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. Link to comment
vitor Posted May 25 Author Share Posted May 25 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. Link to comment
luciano Posted May 26 Share Posted May 26 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" Link to comment
vitor Posted May 26 Author Share Posted May 26 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. Link to comment
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