Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Linux
  3. Auto Typing Script

Auto Typing Script

Scheduled Pinned Locked Moved Linux
linux
14 Posts 10 Posters 12 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W [email protected]

    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)

    ? Offline
    ? Offline
    Guest
    wrote on last edited by
    #3

    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.

    hadek@lemmings.worldH 1 Reply Last reply
    0
    • W [email protected]

      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)

      maiq@lemy.lolM This user is from outside of this forum
      maiq@lemy.lolM This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #4

      You could write a simple python script using datetime and pyperclip. 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.

      1 Reply Last reply
      0
      • W [email protected]

        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)

        L This user is from outside of this forum
        L This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #5

        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.

        1 Reply Last reply
        0
        • ? Guest

          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.

          hadek@lemmings.worldH This user is from outside of this forum
          hadek@lemmings.worldH This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #6

          I had been using beeftext for the longest time but it's windows only, espanso looks dope!

          ? 1 Reply Last reply
          0
          • hadek@lemmings.worldH [email protected]

            I had been using beeftext for the longest time but it's windows only, espanso looks dope!

            ? Offline
            ? Offline
            Guest
            wrote on last edited by
            #7

            It is. Working great on Linux. The only pain is it has to be recompile from time to time (several months apart) on a rolling, but otherwise I had a great experience with it. It's been recommended to me on this very community, so I'm sharing the tip!

            1 Reply Last reply
            0
            • N [email protected]

              What program are you using to write or edit the comments?

              W This user is from outside of this forum
              W This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #8

              Just a normal internal website. Imagine there is a comment section. You press the input box and can type within it. Then press save 🙂

              N 1 Reply Last reply
              0
              • W [email protected]

                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)

                J This user is from outside of this forum
                J This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #9

                https://github.com/snyball/Hawck

                1 Reply Last reply
                0
                • W [email protected]

                  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)

                  ferk@lemmy.mlF This user is from outside of this forum
                  ferk@lemmy.mlF This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #10

                  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

                  1 Reply Last reply
                  0
                  • W [email protected]

                    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)

                    B This user is from outside of this forum
                    B This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #11
                    #!/bin/sh
                    printf 'ABC %s: ' "$(date --rfc-3339=date)" | xclip
                    
                    R 1 Reply Last reply
                    0
                    • B [email protected]
                      #!/bin/sh
                      printf 'ABC %s: ' "$(date --rfc-3339=date)" | xclip
                      
                      R This user is from outside of this forum
                      R This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #12

                      You have 404 comments

                      1 Reply Last reply
                      0
                      • W [email protected]

                        Just a normal internal website. Imagine there is a comment section. You press the input box and can type within it. Then press save 🙂

                        N This user is from outside of this forum
                        N This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #13

                        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.

                        W 1 Reply Last reply
                        0
                        • N [email protected]

                          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.

                          W This user is from outside of this forum
                          W This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #14

                          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!

                          1 Reply Last reply
                          0
                          • System shared this topic on
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups