eltos / PasteIntoFile

Paste clipboard data into files and copy file contents directly via hotkey or context menu
MIT License
87 stars 6 forks source link

Append into file #41

Closed lmerega closed 6 months ago

lmerega commented 9 months ago

Appendo into same file (text only).

Sometimes I need to add some information to a text file. It would be nice a contextual menu to append clipboard to an existing text file. Do you think it could be useful?

Thanks

Luca

eltos commented 9 months ago

When you say "text only", do you mean only for .txt files? How about other text based files like .md or *.py? On first thought adding it for any file seems better than maintaining a list of extensions.

@lmerega Do you have a suggestion on how best to minimise the clutter in the file context menu, considering that we already have "copy file content" and "replace with clipboard content" entries?

lmerega commented 9 months ago

Hallo, yes, I meant any text file. It should be easy opening the file for append and adding the text. Regarding the context menu, you're right. There are already two entries. It's true that adding another one isn't too serious, especially since I'm not a fan of tree-style context menus. However, we could also consider that solution, perhaps including it in the options: tree-style context menu or "flat" context menu.

eltos commented 9 months ago

How about making the entries into a sub-menu only if the user decides to enable 3 or more?

Another idea could be to re-use the "replace" entry and use the SHIFT key to switch from replace to append mode, since that is very similar in functionality. It's not that intuitive, but SHIFT and CTRL are already used to change the behaviour of the "paste into file" menu entry.

hirenshah commented 8 months ago

I came across this program and then this issue when looking for the same thing.

When researching things online rather than opening each link in a separate tab or going off in tangents, it would be perfect if I could just start a program running which until I turn off, appends all copied text to a .txt file. It could potentially be enhanced to provide the option of prefixing each entry with a date time stamp.

eltos commented 8 months ago

Start a program running which until I turn off, appends all copied text to a .txt file.

Sounds like you need the append option for what is called "Batch mode", not another context menu entry. As of now, batch mode will create a new file with timestamp every time you press CTRL+C.

eltos commented 8 months ago

I am thinking of the following:

Any comments? @lmerega @hirenshah

eltos commented 8 months ago

Preview version at ~https://github.com/eltos/PasteIntoFile/actions/runs/7746499182/artifacts/1213166259~

EDIT: New version see below

hirenshah commented 8 months ago

/Edit: Sorry, I wrote this ages ago and only just realised I never actually posted it. #fail

@eltos

I had disabled the context menu options from the start because my use case had no use for them. Can't really add any value around that functionality, at least not until I have had a play around. Currently in the middle of a house move so give me a few days to do that.

Regarding batch mode:

eltos commented 8 months ago

@hirenshah I see, it seams this is outdated information now. Maybe you first want to give that preview version a try and then update your feedback?

hirenshah commented 8 months ago

@hirenshah I see, it seams this is outdated information now. Maybe you first want to give that preview version a try and then update your feedback?

Yep, I was just annoyed about not having posted it and also didn't want you to think you were being ignored 🙂

Will check out the new version and report back... will make sure to actually report back lol.

eltos commented 6 months ago

New preview at https://github.com/eltos/PasteIntoFile/actions/runs/8316160819/artifacts/1333099887

Scheduled for 5.3 release