dotfiles
command_help
Our great sponsors
dotfiles | command_help | |
---|---|---|
5 | 8 | |
15 | 93 | |
- | - | |
0.0 | 0.0 | |
over 1 year ago | over 3 years ago | |
Shell | Shell | |
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dotfiles
-
[newsboat] How to update feeds in a cron job/background?
I have done it through a systemd user timer+service unit, where the service runs the command and the timer activates the service at the right times.
-
Mind helping a newbie a qutebrowser with scripts?
I have something like that in my setup for redirecting twitter to nitter. Notice it is a javascript-based greasemonkey userscript which qutebrowser injects on webpages, so it goes in a different folder in the same place as the userscripts folder, just named greasemonkey. The difference is that qutebrowser userscripts are more like custom scripts or programs you can call from qutebrowser using :spawn and similar commands.
-
What tools / utilities have you written that you use regularly?
From my dotfiles ~/bin, I have a few that I use more than once every day:
-
Convertion of youtube links to invidious links when opened in new tab?
I have something like that setup for twitter->nitter, just change them to youtube and invidious in both the greasemonkey script metadata and the code itself.
-
A simple script to convert reddit links to old.reddit links
Now, to answer you question, I made this greasemonkey script that does something similar with twitter converting them to nitter links any time the page starts loading, just change the @match rules to www.reddit.com urls and change the parameters in the replace() to where you want to redirect, and drop it in your greasemonkey script directory.
command_help
-
Ask HN: What do you use to make CLIs?
I use a lot of CLI tools, but haven't written many for myself. Mostly, aliases/functions and some scripts in Bash/Python.
Extract details for command options from man/help: https://github.com/learnbyexample/command_help/blob/master/c...
cut-like syntax for field manipulations with regexp, negative indexing, etc: https://github.com/learnbyexample/regexp-cut/blob/main/rcut
simple calculator using python syntax: https://learnbyexample.github.io/practice_python_projects/ca...
- A better way of displaying help text on the command line
-
Enter a command to see help text for each arg
I wrote a Linux CLI tool [0] that parses the man/help pages to extract option details. Works most of the time for me, but there are plenty of corner cases that don't work.
[0] https://github.com/learnbyexample/command_help
-
What tools / utilities have you written that you use regularly?
https://github.com/learnbyexample/command_help to extract help text from builtin commands and man pages, ex:
-
What's a program you made that you actually use regularly?
https://github.com/learnbyexample/command_help is big enough to warrant a repo, examples, limitations, etc. I had a list of todo items to improve the script, but after years of usage, I'm fine with the limitations since I rarely encounter them. This helps me to extract documentation of particular options, here's an example:
-
Save Time Using Manop to Print Only Selected Content From the Man Page using Manop
I wrote one a few years back (https://github.com/learnbyexample/command_help). It has a few corner case issues, but works most of the time for me and supports multiple options to be retrieved.
-
Explainshell - A tool that takes any shell commands, looks up the syntax and options from man pages, and steps you through what it does!
I particularly wanted to lookup documentation for command options from my terminal (instead of the website), so wrote a script for it: https://github.com/learnbyexample/command_help ... Have a long pending todo list, but despite the issues, the tool is good enough for my needs.
-
Testing
When I start a project, I usually try to write the programs incrementally. Say I need to iterate over files from a directory. I will make sure that portion is working (usually with print() statements), then add another feature — say file reading and test that and so on. This reduces the burden of testing a large program at once at the end. And depending upon the nature of the program, I'll add a few sanity tests at the end. For example, for my command_help project, I copy pasted a few test runs of the program with different options and arguments into a separate file and wrote a program to perform these tests programmatically whenever the source code is modified.
What are some alternatives?
enchive - Encrypted personal archives
hn-reader - A dark mode reader app for Hacker News
nbrowser - 🔗 🌐 : an easy way to open links in browsers, mimic the "Open URL with..." dialog on Android, `nbrowser` help you open links in a browser
pinpoint - Keystroke launcher and personal command central. Alternative to Spotlight and Alfred for Windows. Alternative to Wox, PowerToys.
vids - 🔍 🔘 ⏯️ 🔁 - search for videos to play from youtube.com and other platforms...
tera - Interactive Bash script terminal music radio player. Play your favorite radio station, CRUD your favorite lists, and explore new radio stations from your terminal.
note-keeper - :notebook: A tiny bash tool for taking and organizing notes.
sc2-replay-go
gitstart - Gitstart automates creating a GitHub repo. The script will create .gitignore, a license.txt, a README.md file and commit with a message. It will create a remote repo and push all the files.
ffupdate - A shellscript to automatically install and update firefox on linux.
dark-toggle - A small POSIX compliant shell script that toggles between the dark and light variants of a GTK theme.
smenu - smenu started as a lightweight and flexible terminal menu generator, but quickly evolved into a powerful and versatile CLI selection tool for interactive or scripting use.