Auto Typing Script
-
I have a job where a part of our job is to write comments on some entries. Such as if we have edited it. This same string can get quite repetitive. Writing out initials followed by the current date. It would be amazing to have a script so each time you press a shortcut command, this script will fire and type out in the looks of "ABC YYYY-MM-DD: ". Making that process simpler. I'm quite new to Linux and thought maybe the community has some ideas. (We aren't allowed to install any type of software due to security purposes. So if something already comes pre-baked within Ubuntu, would be quite neat! :P)
-
-
I have a job where a part of our job is to write comments on some entries. Such as if we have edited it. This same string can get quite repetitive. Writing out initials followed by the current date. It would be amazing to have a script so each time you press a shortcut command, this script will fire and type out in the looks of "ABC YYYY-MM-DD: ". Making that process simpler. I'm quite new to Linux and thought maybe the community has some ideas. (We aren't allowed to install any type of software due to security purposes. So if something already comes pre-baked within Ubuntu, would be quite neat! :P)
What program are you using to write or edit the comments?
-
I have a job where a part of our job is to write comments on some entries. Such as if we have edited it. This same string can get quite repetitive. Writing out initials followed by the current date. It would be amazing to have a script so each time you press a shortcut command, this script will fire and type out in the looks of "ABC YYYY-MM-DD: ". Making that process simpler. I'm quite new to Linux and thought maybe the community has some ideas. (We aren't allowed to install any type of software due to security purposes. So if something already comes pre-baked within Ubuntu, would be quite neat! :P)
-
I have a job where a part of our job is to write comments on some entries. Such as if we have edited it. This same string can get quite repetitive. Writing out initials followed by the current date. It would be amazing to have a script so each time you press a shortcut command, this script will fire and type out in the looks of "ABC YYYY-MM-DD: ". Making that process simpler. I'm quite new to Linux and thought maybe the community has some ideas. (We aren't allowed to install any type of software due to security purposes. So if something already comes pre-baked within Ubuntu, would be quite neat! :P)
You could write a simple python script using
datetime
andpyperclip
. Datetime would supply the date format and pyperclip to copy that to your clipboard. You could setup a key binding to call the script then[Ctrl + v]
to paste.I believe all linix distros have python installed OTB.
There are probably a bash solution but my bash is rubbish.
-
I have a job where a part of our job is to write comments on some entries. Such as if we have edited it. This same string can get quite repetitive. Writing out initials followed by the current date. It would be amazing to have a script so each time you press a shortcut command, this script will fire and type out in the looks of "ABC YYYY-MM-DD: ". Making that process simpler. I'm quite new to Linux and thought maybe the community has some ideas. (We aren't allowed to install any type of software due to security purposes. So if something already comes pre-baked within Ubuntu, would be quite neat! :P)
If I were to do it, I’d do it with doom eMacs. ‘’’q i ABC SPC ESC SPC i s current-time RET’’’. Then press Q to recall macro.
-
You should look into Espanso. It was made for this kind of things, and many others you didn't thought you need!
Basically, it replaces "triggers" input into strings, which can be set dynamically with short scripts.
I had been using beeftext for the longest time but it's windows only, espanso looks dope!
-
I had been using beeftext for the longest time but it's windows only, espanso looks dope!
-
What program are you using to write or edit the comments?
Just a normal internal website. Imagine there is a comment section. You press the input box and can type within it. Then press save
-
I have a job where a part of our job is to write comments on some entries. Such as if we have edited it. This same string can get quite repetitive. Writing out initials followed by the current date. It would be amazing to have a script so each time you press a shortcut command, this script will fire and type out in the looks of "ABC YYYY-MM-DD: ". Making that process simpler. I'm quite new to Linux and thought maybe the community has some ideas. (We aren't allowed to install any type of software due to security purposes. So if something already comes pre-baked within Ubuntu, would be quite neat! :P)
-
I have a job where a part of our job is to write comments on some entries. Such as if we have edited it. This same string can get quite repetitive. Writing out initials followed by the current date. It would be amazing to have a script so each time you press a shortcut command, this script will fire and type out in the looks of "ABC YYYY-MM-DD: ". Making that process simpler. I'm quite new to Linux and thought maybe the community has some ideas. (We aren't allowed to install any type of software due to security purposes. So if something already comes pre-baked within Ubuntu, would be quite neat! :P)
Personaly I use KeepassXC autotype functionality for these kind of thing.. I have entries that are just notes and then have the autotype command be:
{NOTES}{ENTER}
so it types the content of the note and types enter.The nice thing is that I can leverage the autotype dialogs from Keepass so I just ned to remember 1 shortcut and it will show different Note options based on the title of the window I'm in. It also works across platforms (which is great if at work you still need to use Windows).
I haven't tried to use date placeholders, but in theory, they are suported in the keepass documentation (no idea if keepassXC in particular supports them): https://keepass.info/help/base/placeholders.html
-
I have a job where a part of our job is to write comments on some entries. Such as if we have edited it. This same string can get quite repetitive. Writing out initials followed by the current date. It would be amazing to have a script so each time you press a shortcut command, this script will fire and type out in the looks of "ABC YYYY-MM-DD: ". Making that process simpler. I'm quite new to Linux and thought maybe the community has some ideas. (We aren't allowed to install any type of software due to security purposes. So if something already comes pre-baked within Ubuntu, would be quite neat! :P)
#!/bin/sh printf 'ABC %s: ' "$(date --rfc-3339=date)" | xclip
-
#!/bin/sh printf 'ABC %s: ' "$(date --rfc-3339=date)" | xclip
You have 404 comments
-
Just a normal internal website. Imagine there is a comment section. You press the input box and can type within it. Then press save
I'd write a bookmarklet for that case:
javascript: { const name = 'ABC'; const d = new Date(); const year = d.getFullYear(); const month = d.getMonth(); const date = d.getDate(); document.activeElement.value = `${year}/${month}/${date} ${name}`; void 0; }
This bookmarklet inserts the desired text into the currently focused text box. Tested on Lemmy Web UI.
-
I'd write a bookmarklet for that case:
javascript: { const name = 'ABC'; const d = new Date(); const year = d.getFullYear(); const month = d.getMonth(); const date = d.getDate(); document.activeElement.value = `${year}/${month}/${date} ${name}`; void 0; }
This bookmarklet inserts the desired text into the currently focused text box. Tested on Lemmy Web UI.
Amazing! Will fiddle around with this as a temporary fix. Wish I could mark some comments as being the 'solution' and highlight them in some way. Much appreciated!
-