Jump to content

Higashifukai

Member
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Higashifukai

  1. I just realised that "Show Alfred with the selected text" also copies the selected text into the clipboard. Quite logical... So "Showing the clipboard history without copying the selected text" is probably impossible. Another solution would be to automatically delete the clipboard history's last entry, but some sql command would be necessary for that (too complicated for me, I gave up). I'll just have to ignore the first result in the clipboard history results. Not perfect, but very close.
  2. The title says it all. You select a text in any app and use the "Show clipboard history" keyboard shortcut to search for the selected text in the clipboard history. This way you don't have to copy the selected text before searching for it in the clipboard history. (Copying the selected text before searching for it adds a new entry to the clipboard...) It's exactly the same as Show Alfred with selection in OS, but for the clipboard search.
  3. Politicus, your first solution would be fine if I had only a few sentences, but to find the good sentence will be a hard task if I have hundreds or thoushands of sentences in the clipboard history (database). As for the other solution, I already have something quite good.. that uses Alfred to launch mdfind and grep to search for the selected text in a folder (I have millions of sentences in that folder, in thousands of tab delimited txt files). The search syntax is: mdfind -onlyin /Users/.../folder containing hundred of small tab delimited texts \"{query}\" | xargs grep -i -h --max-count=50 --color "{query}" In 2 or 3 seconds I get all the sentences that contain the selected string (full sentence or a few words), and the searched string is colored so I can find it easily in the results (the string can be in the middle of a long paragraph). The search is triggered with a hot key, with the "Selection in OS X" argument selected. In can also add my news translated sentences to a txt file, with another hot key, with the following syntax: echo "{query}" >>/Users/...path to my tab delimited.txt file && osascript -e 'tell application "Terminal" to close window 1' The first part adds my selected text at the end of the file, and the second part closes the terminal's window. (I have another one to delete a string when I realise that it contains a mistake, but it's becoming a bit off topic ; ) The only problem is that it uses mdfind, and mdfind doesn't index all the words. Frustrating. That's why I started using the clipboard history, since it uses sqlite and probably makes a better indexing job than mdfind (Spotlight). For the moment I copy the text and launch the clipboard search. Segments are also quite easy to del from the history (fn delete). I just wish I had the possibility to launch the clipboard search with the selected text. Maybe I should make a feature request for Launching Clipboard Search with selected text... after all it's similar to Show Alfred with the selected text...
  4. Rectification: I don't understand how you can open the clipboard with the selected text.. without copying first.
  5. Thank you politicus, For the first solution, I don't understand how you can open the clipboard without copying the text to translate. It would be the ideal solution, but how do you actually open the clipboard with the selected text? (As for the 3 months limit, it doesn't really matter since I can import the clipboard database (the sqlite3 file) and export it to a txt file that I will still be able to search with mdfind. But of course removing the 3 months limit would be a better option... maybe this will be possible in a future release)
  6. Hi politicus, I'm a translator, and I'm using Alfred as a simple CAT tool (computer assisted translation) for certain jobs. My clipboard history contains translated strings (each string contains the source sentence followed by the target sentence). When I have to translate a new sentence that I know I already translated a few minutes, hours ou days ago, I want to select the sentence in Pages (Numbers, or any other app) without copying it in the clipboard. The reason is quite simple: I want the clipboard history to contain only strings with both source and target sentences. If I copy the selected text (sentence to translate) in the clipboard and then look into the clipboard history, I get 2 results (one with only the source to translate that I just copied, and the second result with both the source and the target). This is almost perfect... all I need is a way to look at the clipboard history without adding a "source only string" in the clipboard. Concrete example with a screenshot (the clipboard history shows the "source only string" as first choice, and then the previously translated (source and target) segment. I need to get rid of the source only string to make the process perfect... (smaller clipboard, only translated strings, and no disturbing "source only strings" in the search results).
  7. Hi, I'm trying to figure out how to automatically paste the OS X selected text when I trigger the Clipboard Viewer Hotkey. In other words, is it possible to create a workflow that: - opens the Clipboard viewer... and - pastes the "selection in OS" text?
  8. Thank you RodgerWW, I appreciate but I don't know how to implement this solution (I'm not familiar with applescripts). I finally decided to use the character "|" instead of the tabulation. It's not as good as the tabulation... but it will be OK.
  9. Thank you RodgerWW... I gave it a try and it didn't work. I guess I will have to learn how to parse the text with sed...
  10. Hi, I have a very simple workflow for pasting the clipboard content at the end of a txt file, with echo. echo "{query}" >>/Users/.../mytextfile.txt && osascript -e 'tell application "Terminal" to close window 1' It works perfectly... but when the string contains a tabulation, the tabulation is ignored. How can I keep the tabulation?
×
×
  • Create New...