• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 13 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Miscellaneous small utils, mainly for the Bash shell.

Bash Utils (miscellaneous small utils for the Bash shell)

New (Jan 9, 2017)! All scripts were updated to Python 3. The original Python 2 version (which is not maintained anymore) is tagged as "v0.1". You can find that under the "release" link.

Here I collect some small command-line utils.

dictionary/meaning.py

  • Look up the meaning of a word.
  • Usage: meaning pen
  • Meaning: what does the word pen mean?

dropbox/dropbox_permissions.py

  • Set directory/file permissions in your Dropbox folder in an intelligent way.
  • Intended audience: Linux users who also use Windows sometimes.
  • Usage: put the script in the root of your Dropbox folder and launch it.
  • blog post

dropbox/get_public_link.py

  • Show the public Dropbox link(s) of one (or several) file(s).
  • Dropbox made some changes in 2017, so it doesn't work anymore.
  • Usage: get_public_link [<file> | -a]
  • blog post

firefox/export_firefox_cookies.py

  • This script extracts cookies from Firefox's cookies.sqlite that are specific to a given host. The exported cookies are saved in cookies.txt. New! It also exports session cookies from Firefox's recovery.js file. The exported cookies are saved to session_cookies.txt.
  • The original script was written by Dirk Sohler.
  • Usage: export_firefox_cookies.py <host>
  • blog post

mouse/mousepos_gui.py

radio/radio.py

  • A minimalistic radio player.
  • Available stations: Slay Radio, goa, trance, chillout, etc.
  • Usage: radio.py

replace_accents/replace_latex_accents.pl

  • This script allows you to write special Hungarian and French characters in a simple way (using the ISO-8859-1 (Latin-1) charset), then convert them to their LaTeX-equivalents.
  • Example: La'szlo' => L'{a}szl'{o}
  • blog post

replace_accents/replace_french_accents_to_latex.pl

  • This script converts a French accented text to LaTeX replacing the funny characters with their LaTeX equivalents.
  • Example: é => '{e}
  • blog post

alarm.py

  • A simple alarm script that plays a list of MP3s at a given time. Very useful if you leave your computer switched on during the night.
  • Usage:
$ alarm -p
    Play music first to adjust volume.
$ alarm -t 7h5
    Set alarm time (5 past 7 in this example).

cb.py

  • Print the content of the clipboard to the standard output.
  • Usage: cb.py

fftabs.py

  • A command line program for manipulating Firefox tabs.
  • Requirements: Firefox + MozRepl add-on.
  • Help: fftabs -h

from_base64.py

  • Ask a base64 string and convert it back to a normal string (decode).
  • Usage: from_base64

get_alap.py

  • An interactive program to generate a skeleton source code.
  • Supported languages: Python, Go, Java, C, D.
  • Usage: get_alap.py

get_images.py

  • Extract image links from a web page.
  • Usage: get_images URL [URL]... [-l]

get_links.py

  • Extract all links from a web page.
  • Usage: get_links.py <URL>
  • blog post

github_user_email.py

  • An interactive program that figures out the email address of a GitHub user.
  • Usage: github_user_email.py

here.py and here.sh

  • Print just the name of the current directory. For instance, if you are in /home/students/solo, then this script will print just solo.
  • here.sh simply prints the output, while here.py, in addition, copies the output to the clipboards.
  • Usage: here

img_to_base64.py

  • Take an image file and encode it with BASE64. Put the encoded data in an "img" HTML tag.
  • Usage: img_to_base64 <image_file>
  • blog post

inout.py

  • An interactive script for 1) compressing a folder to another directory, and 2) uncompressing an archive file to a destination directory.
  • Rationale: I always forget the order of parameters...
  • Usage: inout

is_net_back.py

  • Play a sound when the Internet connection is back.
  • Usage: is_net_back

myip.py

  • My external IP address.
  • Usage: myip

ocr.py

  • A wrapper script around the Tesseract OCR engine. Convert an image to string.
  • Usage: ocr <image_file>

open_in_tabs.py

  • Read URLs from the standard input and open them in separated browser tabs.
  • Usage: cat url_list.txt | open_in_tabs
  • blog post

prettify.py

  • Prettify an HTML page, i.e. pretty print its HTML source.
  • The script prints the HTML source that is built by BeautifulSoup (BS). Idea: if you want to manipulate a page with BS, analyze the prettified source instead of the original because this is how BS stores it.
  • Usage: prettify <URL>
  • blog post

prettyjson.py

  • Prettify a JSON file.
  • Usage: prettyjson ugly.json

py2rtf.py

  • Transform a python source file to RTF.
  • Usage: py2rtf [-f] hello.py
  • Meaning: the output is written to hello.rtf
  • blog post

redirect_to.py

  • This script tells you where a webpage redirects.
  • Usage: redirect_to.py <URL>
  • blog post

rep.py

  • Repeat a bash command several times.
  • Usage: rep <rep> <cmd>
  • Example: rep 3 echo hello
  • Meaning: print the text "hello" three times.

slogan.py

  • Generate some slogans from a keyword.
  • Usage: slogan <keyword>

sp.py

  • Print the absolute path of a file. If no parameter is passed, show the current path. The name stands for "show path".
  • This is one of my most useful scripts :) I use it every day.
  • Usage: sp [<filename>]
  • blog post

to_base64.py

  • Ask a string and convert it to a base64 string (encode).
  • Usage: to_base64

to_md5.py

  • This scripts reads a text interactively and prints its md5-encoded version. The output is a 32-character long hexa string.
  • Usage: to_md5

to_utf8.py

  • Convert a text file to an UTF-8-encoded text. The output is printed to the screen.
  • Usage: to_utf8 input.txt

tocb.py

  • Copy the text from the standard input to ALL clipboards. Thus, you can use any paste method to insert your text (middle mouse button or Shift+Insert). The name stands for "to clipboard(s)".
  • Usage: cat file.txt | tocb
  • Options: with -t you can trim the text first (remove whitespaces from both ends of the text).
  • blog post

top10.py

  • Show the top 10 largest files in the current directory. Filesizes can be shown in a human-readable format with the -h option.
  • Usage: top10 [-h]

twitch2mp3.py

  • Grab a twitch video in mp3.
  • Usage: twitch2mp3 TWITCH_VIDEO_URL

userpass.py

  • Username and password generator.
  • Usage: userpass

us.py

  • Change spaces to underscores. Pass a string as a parameter OR pass it on the standard input.
  • Example #1: us "How to Think Like a Computer Scientist.pdf"
  • Result #1: How_to_Think_Like_a_Computer_Scientist.pdf
  • Example #2: echo "he he" | us
  • Result #2: he_he

xml2json.py

  • Convert an XML file to JSON.
  • This is a wrapper around the excellent xmltodict library.
  • Usage: xml2json <input.xml>

More Repositories

1

PythonEXE

How to create an executable file from a Python script?
Python
280
star
2

JSON-path

Find the path of a key / value in a JSON hierarchy easily.
Python
93
star
3

Jabba-Webkit

Jabba's headless webkit browser for scraping AJAX-powered webpages.
Python
91
star
4

graphviz-java-api

With this simple API you can simply call GraphViz's dot from your Java programs.
Java
72
star
5

SpeedTests

comparing the execution speeds of various programming languages
Python
70
star
6

screenshot.py

Taking a screenshot of a webpage.
JavaScript
49
star
7

DigitalOceanFlask

installing a Flask webapp on a Digital Ocean (or Linode, etc.) Ubuntu box
Python
43
star
8

jabbapylib

A Python library that I use for my projects.
Python
33
star
9

Copy-Queue

A command line "cp" and "mv" that use a queue.
Python
28
star
10

PrimCom

PrimCom: manage and access your personal knowledge base easily
Python
25
star
11

Movie-Ratings

Get the ratings of a movie on IMDB and RottenTomatoes.
Python
23
star
12

Linux-Voice-issues

collection of freely available issues of Linux Voice (http://www.linuxvoice.com) and MagPi (https://www.raspberrypi.org/magpi/)
19
star
13

Programozas_2

A Programozás 2 c. tárgyhoz kapcsolódó anyagok.
Java
17
star
14

update-pip-packages

update all the packages (in alphabetical order) that were installed with pip
Python
17
star
15

ClosestX11Color

Find the closest xterm-256 colors (between 0 and 255) to an arbitrary HTML hexa color (e.g. #ABCDEF)
Python
16
star
16

JiVE-Image-Viewer

A general purpose, cross-platform image viewer with some built-in NSFW support, written in Python 3.6+ using PyQt5.
Python
15
star
17

django-show_urls-formatter

Beautify the output of `manage.py show_urls`.
Python
13
star
18

VS-Code-workspaceStorage-Cleaner

Delete VS Code workspaceStorage cache folders that are older than 60 days
Python
13
star
19

wpython

With wpython you can launch scripts residing in virtual environments without the need of activating the venv.
Python
13
star
20

TrashMail.net-disposable-email-address

Creates a disposable email address on TrashMail.net.
Python
12
star
21

PyLint-Output-Visualizer

PyLint report is shown in a window. The report can be refreshed with a key press.
Python
12
star
22

jabbatron

interactive installer script for Ubuntu
Python
11
star
23

Full-Circle-Magazine-Series

Extract parts of a series from Full Circle Magazine and combine them in a single PDF.
Python
11
star
24

Wallpaper-Downloader-and-Rotator-for-Gnome

Download images from several wallpaper sites and set them as wallpapers.
Python
11
star
25

quickjump

QuickJump allows you to bookmark directories and switch between them easily
Python
10
star
26

Elite

Elite Planet Name Generator
Python
10
star
27

PyJava

PyJava is a small Java library that aims to bring some Python fun to Java
Java
10
star
28

melt

a visual cat-like file viewer with syntax highlighting supporting 2-file views
Python
9
star
29

go-present-for-python

Using Go's present with Python code snippets
Python
9
star
30

Crypto-Converter

A command-line application for converting currencies (crypto and fiat).
Python
9
star
31

pdfmanip

Manipulate PDF files (e.g. remove given pages)
Python
8
star
32

Programozas_1

A Programozás 1 c. tárgyhoz kapcsolódó anyagok (2024. febr.)
C
8
star
33

DigitalOceanNotes

How to configure a Digital Ocean (or Linode, etc.) Ubuntu box.
Vim Script
7
star
34

go-jsonpath

Find the path of a key / value in a JSON hierarchy easily.
Go
7
star
35

MyPew

getting started with Pew (Python Env Wrapper) under Linux
Shell
7
star
36

Record-Soundcard-Output

Capture and record any audio output that comes through the soundcard. Requires ALSA.
Python
7
star
37

blog-assets

Source codes for some posts on my blogs.
C#
6
star
38

jabbapylib3

A lightweight, general-purpose Python library, written in Python 3.
Python
6
star
39

JabbaCustomExtensions-for-C-Sharp

My own extensions for C#. Inspired by Python, Kotlin, etc.
C#
5
star
40

AdventOfCode2022

My solutions for AoC 2022. Targeted languages: Python / Go.
Python
4
star
41

zsh-themes-plugins

My own ZSH themes and plugins, using the oh-my-zsh framework
Shell
4
star
42

Pomodoro-Timer

A simple GUI countdown timer for your pomodoro sessions.
Python
4
star
43

Archives-List-Generator

Generate archives list for wordpress.com blogs in HTML format.
Python
3
star
44

Hello-World

test project, exploring git and github
Python
3
star
45

movie2android

Resize movies for your Android/iOS device with ffmpeg.
Python
3
star
46

AdventOfCode2018

My solutions for AoC 2018. Targeted language: Nim. I may also add some Python solutions.
Nim
3
star
47

virtualenv-tools

Some simple wrapper functions for working with Python virtual environments.
Shell
3
star
48

teaching-assets

Teaching assets.
HTML
3
star
49

UrlShortener-go

A URL shortener command-line app. for bit.ly; implemented in Go.
Go
3
star
50

nimpykot

Porting some Python / Kotlin features to Nim
Nim
3
star
51

go-cpc-ctc

Home of two CLI utilities. cpc: copy path to clipboard; ctc: copy text to clipboard.
Go
3
star
52

XboxGamePriceChecker

Xbox Game Price Checker
Python
3
star
53

jabbagolib

A simple library to facilitate transition from Python to Go.
Go
3
star
54

Jerly

A Java implementation of Earley’s efficient parsing algorithm for lambda-free context-free grammars.
Java
2
star
55

AdventOfCode2019

My solutions for AoC 2019. Targeted languages: Python, C, Rust.
C++
2
star
56

AutoFocus

A Greasemonkey script that puts the focus on the selected input field.
JavaScript
2
star
57

jabbas-zsh-settings

This repo contains my own ZSH settings.
Shell
2
star
58

JabbaPyLib-in-Action

Miscellaneous Python projects that rely on the library "jabbapylib".
Python
2
star
59

ClickBot

A Python bot playing online Flash games.
Python
2
star
60

AdventOfCode2023

My solutions for Advent of Code 2023.
Python
2
star
61

UrlShortener-nim

A URL shortener command-line app. using bit.ly
Nim
2
star
62

micro-plugins

Some of my own (and found) plugins for the micro text editor
Lua
2
star
63

GUI-Dev-with-Python

Some simple examples on how to get started with GUI development in Python.
Python
2
star
64

jabba-lib

A utility library for Rust.
Rust
2
star
65

NimCliHelper

make Nim development easier in the command-line
Nim
2
star
66

Image-Gallery

Creates a stylish HTML/CSS image gallery from a list of URLs. Typical use case: you scrape the URLs of some images and you want to visualize them.
Python
2
star
67

Vuze-Restarter

This script restarts your vuze process if it dies unexpectedly.
Python
1
star
68

Flask-url_map-formatter

beautify the output of `app.url_map`
Python
1
star
69

C-Sharp-CLI-Helper

A wrapper around the "dotnet" command to facilitate command-line usage.
Python
1
star
70

docker-pyenv

A basic development environment for Python 2.7.
Shell
1
star
71

AdventOfCode2021

My solutions for AoC 2021. Targeted languages: Python / Julia.
Python
1
star
72

Flask-TailwindCSS-HTMX-Sample-Project

A Flask + Tailwind CSS + HTMX sample project
CSS
1
star
73

jabba-cpc

Copies the path of the current working dir. to the clipboard. If a parameter is given, it's also added to the path.
Rust
1
star
74

keysound

Play an audio file (a click sound) when a keyboard button is pressed
Python
1
star
75

ShowMousePosition

A little GUI tool that shows the current mouse position
Python
1
star
76

dontsleep

Prevent HDD from going to sleep
Go
1
star
77

HenWer

an online and offline image viewer
Python
1
star
78

django-hello_project

A skeleton that can be used for creating new Django projects.
Python
1
star
79

szakdoga

Szakdolgozat letöltése PDF-ben
Go
1
star
80

Talky-G

A vertical data mining algorithm for extracting frequent generators (FGs). Talky-G is part of the Coron System.
Java
1
star
81

alap

A little CLI tool for scaffolding basic source codes
Go
1
star
82

Next-and-Previous-Image-for-Vimperator

"next image" and "previous image" bookmarklets for vimperator
1
star
83

say-it

Convert arbitrary text to audio
Python
1
star