p0deje / Maccy

Lightweight clipboard manager for macOS
https://maccy.app
MIT License
11.51k stars 495 forks source link

Edit text #792

Closed Alrazzouq closed 1 month ago

Alrazzouq commented 1 month ago

Before Submitting Your Feature Request

Problem

Hi... Could you add an option to edit the copied text.

Solution

No response

p0deje commented 1 month ago

@Alrazzouq Sorry, but I believe that's too much for a clipboard manager application.

timbaileyjones commented 3 weeks ago

@p0deje - normally I would agree with you, but I have a need to edit what gets saved too. I just finished a job search, and most of my use of Maccy revolved around cutting and pasting canned responses to recruiters (multi-line strings maybe 1k-2k in size).

The trouble is that what I "copy" from Linkedin-within-chrome got saved with too much additional whitespace and newlines. While I realize that this is probably because of LinkedIn's rendering of my conversations in the LinkedIn chat window, the extra newlines get pasted into the chat windows of other recipients when I select and paste.

Side note: I've had a devil of a time finding a tool that will let me edit the ZITEMHISTORY.ZTITLE field in the Storage.sqlite file. I've tried 3 vscode sqlite-database plugins, plus a standalone app called 'DB Browser for SQLite'. Like Maccy itself, they all show me the beginning and end of my items, but with '...' in the middle. I was expecting a multi-line editing window with the full text visible.

A simpler workaround might be a configuration checkbox that enables newly-copied clipboard items to have trim() and replace('[\n\r]', '', 'g') run on them prior to being saved. Would you consider this solution? @Alrazzouq didn't mention how he wanted to edit his text, but this would fix my problem.

For now, my workaround is paste into MacVim, use it to clean up all of LinkedIn's extra whitespace garbage, do a select all, and have Maccy copy from there. Then I can pin the item copied from MacVim.

p0deje commented 3 weeks ago

@timbaileyjones You could probably automate all of that via the Shortcuts.app. Just create a new workflow that receives selected text as input (you likely need to make it available via services menu), then cleanup all extra whitespace using "Replace Text" and finally copy it to the system clipboard using "Copy to Clipboard".

Alrazzouq commented 3 weeks ago

I believe that simple editing (eg delete/add spaces, delete/add words, clear format ...) will be very helpful.