this post was submitted on 07 Mar 2025
15 points (89.5% liked)

Linux

52095 readers
1595 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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 are viewing a single comment's thread
view the rest of the comments
[–] nmtake@lemm.ee 4 points 1 week ago (1 children)

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.

[–] Wolfie@lemm.ee 1 points 3 days ago

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!