Don't be Afraid of the Command Line, It Might Even be a Friend
THERE is no lack of blog posts and articles, both new and old, about fear of the command prompt. There's a tendency to think that only graphical interfaces were made to simplify usage, and any declarative interface is by design raw, inherently unfit for usage. I've only just crafted a simple duplicate/s detector for Tux Machines and Techrights, with the intention of ensuring that we don't repeat links to stories. The interface is very simple. It just checks or scans the existing database for occurrence of some substring.
Here we go:
#!/bin/bash # Licence: Public Domain, feel free to share as you see fit # # Author: Roy Schestowitz
echo Input string: $1 STRING=$1
grep -A4 -B4 --color=always -- $STRING /var/www/tuxmachines.org/db*
Now, a two-letter command followed by a portion of some URL will return the status, both from the server side and the laptop side. It's a very simple interface.
A match found on desktop (duplicate):
db wayland-firefox-snap-default Input string: wayland-firefox-snap-default Ubuntu 23.10 Runs Firefox in Wayland Mode by Default [...]
A match found on the server (duplicate):
./db wayland-firefox-snap-default Input string: wayland-firefox-snap-default grep: /var/www/tuxmachines.org/db/tm-static-site-generator.sqlite3: binary file matches
There's no need to make a GUI for it. A GUI would only slow down the process and reduce flexibility. █