LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Uncategorized Entries with no category
Old

Google reverse image search from command line/Geeqie/etc with python and shell scripts

Posted 10-04-2015 at 12:43 AM by the dsc (linux-related notes)
Updated 10-04-2015 at 01:42 AM by the dsc

There's another method which consists in uploading the image from your computer in some free host and then giving this URL to google via command line, but it's kind of a scumbag-ish thing to do, I think.

Based on/essentially identical to the first answer to a question in stack overflow:

Code:
#!/usr/bin/env python
# WARNING: I DON'T KNOW PYTHON AT ALL, THIS MAY BE GRUESOME AND IDIOTIC
import sys
filePath = sys.argv[-1]

import requests
...
Member
Posted in Uncategorized
Views 1362 Comments 0 the dsc is offline
Old

Semi-auto-generated, nicely formatted, apropos-like list of your custom bash functions

Posted 10-01-2015 at 12:35 AM by the dsc (linux-related notes)

Code:
bold=$(tput bold)
normal=$(tput sgr0)

lsfunctions ()
{
tail -n+10 /path/to/custom-bash-functions | grep "()" | sort | sed 's|(.*#||'  | sed "s|^|${bold}|;s|\ |${normal}\ |"
}
↑ Change the number "10" to whichever line you want to start grepping the functions

"lsfunctions" would be like "apropos /usr/bin/*", or whatever really works, but restricted to your custom...
Member
Posted in Uncategorized
Views 966 Comments 0 the dsc is offline
Old

Collection of random small tricks

Posted 09-26-2015 at 08:40 PM by the dsc (linux-related notes)
Updated 04-30-2016 at 12:45 PM by the dsc (recycling)

☻☻☻ Pipeing youtube-dl output to a given player (and having it as a mini-script)

Code:
youtube-dl -f ${2:-5} $1 -q -o - | mpv -
The first parameter is the youtube url, for a single video, and the second, optional, the quality code, like "best", "worst", or a given number. The default there (5) is the 240p flv.

Just "mpv youtube-URL" was supposed to work, but isn't working right now for me. It says the youtube-dl version is old,...
Member
Posted in Uncategorized
Views 1531 Comments 4 the dsc is offline
Old

KDE hidden command line tools

Posted 09-17-2015 at 02:03 PM by the dsc (linux-related notes)
Updated 09-24-2015 at 08:02 PM by the dsc

Haven't checked yet, posting as a "shared bookmark" and to myself:

http://www.bramschoenmakers.nl/node/610.html

I'm particularly interested in "kde-move". I've actually came up with bash-script approximations to the functionality of auto-renaming the moved files when the target directory has files with the same file names, but I've only made something that just does that by default, whereas KDE can do that but also allows one to compare and rename,...
Member
Posted in Uncategorized
Views 889 Comments 0 the dsc is offline
Old

Adding a "copy image to clipboard" editor (not really) to geeqie

Posted 09-07-2015 at 01:22 AM by the dsc (linux-related notes)
Updated 09-07-2015 at 01:22 AM by the dsc (closing tag with the wrong tag)

First you need some script or command-line application that does that to begin with. Apparently things like xsel and xclip used to be able to do that, but that's no longer the case, if it ever was.

But some people have come up with scripts that do that. I've copied one from somewhere that looks somewhat like those found here:

http://unix.stackexchange.com/questi...e-to-clipboard

But there's a problem when you add this...
Member
Posted in Uncategorized
Views 1285 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 03:12 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration