Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Miscellaneous small utils, mainly for the bash shell.

branch: master
Octocat-spinner-32 dictionary dictionary added
Octocat-spinner-32 dropbox README updated
Octocat-spinner-32 firefox linted
Octocat-spinner-32 mouse get_alap.py: rename feature
Octocat-spinner-32 radio linted
Octocat-spinner-32 reddit linted
Octocat-spinner-32 replace_accents replace_accents/ added
Octocat-spinner-32 templates top10.py added
Octocat-spinner-32 README top10.py added
Octocat-spinner-32 alarm.py small changes
Octocat-spinner-32 get_alap.py top10.py added
Octocat-spinner-32 get_images.py linted
Octocat-spinner-32 get_links.py get_links.py added
Octocat-spinner-32 img_to_base64.py linted
Octocat-spinner-32 markdown.py linted
Octocat-spinner-32 open_in_tabs.py linted
Octocat-spinner-32 prettify.py linted
Octocat-spinner-32 py2rtf.py linted
Octocat-spinner-32 redirect_to.py redirect.py added
Octocat-spinner-32 sp.py code simplified
Octocat-spinner-32 tocb.py linted
Octocat-spinner-32 top10.py samples added
Octocat-spinner-32 us.py example added
README
Bash Utils (miscellaneous small utils for the bash shell)
=========================================================

Here I collect some small command-line utils.

Author:  Laszlo Szathmary, 2011 (jabba.laci@gmail.com)
Github:  https://github.com/jabbalaci/Bash-Utils


py2rtf.py
   Website: http://ubuntuincident.wordpress.com/2012/08/07/insert-syntax-highlighted-source-in-powerpoint/
   Transform a python source file to RTF.
   Usage: ./py2rtf [-f] hello.py       # the output is written to hello.rtf

redirect_to.py
   Website: http://pythonadventures.wordpress.com/2010/12/21/where-does-a-page-redirect-to/
   This script tells you where a webpage redirects.
   Usage: ./redirect_to.py <URL>

mouse/mousepos_gui.py
   Website: https://ubuntuincident.wordpress.com/2011/09/11/gui-to-monitor-mouse/
   Monitor the mouse position in real-time. 
   I made it to facilitate the usage of autopy (http://www.autopy.org).
   Usage: ./mousepos_gui.py

firefox/export_firefox_cookies.py
   Website: https://ubuntuincident.wordpress.com/2011/09/05/download-pages-with-wget-that-are-protected-by-cookies/
   Original script written by Dirk Sohler (https://old.0x7be.de/2008/06/19/firefox-3-und-cookiestxt/).
   This script extracts cookies from Firefox's cookies.sqlite file hat are 
   specific to a given host. The exported cookies are saved in the file cookies.txt.
   Usage: ./export_firefox_cookies.py <host>

reddit/reddit_get_all_pages.py
    Website: https://ubuntuincident.wordpress.com/2011/08/27/browse-all-pages-of-a-subreddit/
    This script allows you to browse all the older pages of a subreddit.
    Limitation: since reddit.com lists only the last 1000 posts, the script will only list 40 pages.
    Usage: ./reddit_get_all_pages.py

reddit/reddit_get_posts.py
    Website: https://ubuntuincident.wordpress.com/2011/08/11/browse-your-favorite-subreddits-painlessly/
    This script can extract links to posts in a subreddit.
    You can get links to comments (-c switch) or to direct URLs (-u switch).
    Basic usage:    ./reddit_get_posts.py -c /r/earthporn
    Advanced usage: ./reddit_get_posts.py -u /r/earthporn | open_in_tabs -s

replace_accents/
    Website: https://ubuntuincident.wordpress.com/2011/07/01/replace-accents-for-latex/
    Here you find two scripts for replacing accents for LaTeX.
    (1) 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}
    (2) 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}

get_public_link.py
    Website: https://ubuntuincident.wordpress.com/2011/06/01/get-the-public-dropbox-links-of-several-files/
    Show the public Dropbox link(s) of one (or several) file(s).
    Usage: get_public_link <file> | -a

dropbox/dropbox_permissions.py
    Website: https://ubuntuincident.wordpress.com/2011/05/08/setting-file-permissions-in-your-dropbox-folder-recursively/
    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.

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

get_links.py
    Website: https://pythonadventures.wordpress.com/2011/03/10/extract-all-links-from-a-web-page/
    Extract all links from a web page.
    Usage: get_links <URL>

open_in_tabs.py
    Website: https://ubuntuincident.wordpress.com/2011/03/09/open-urls-in-browser-tabs-simultaneously/
    Read URLs from the standard input and open them in separated tabs.
    Usage: cat url_list.txt | open_in_tabs
    
markdown.py
    Website: https://ubuntuincident.wordpress.com/2011/05/05/readme-markdown-on-github/
    Preview markdown files in a browser.
    Usage: markdown.py <file.markdown> [-u]

img_to_base64.py
    Website: https://ubuntuincident.wordpress.com/2011/04/17/embed-images-in-html-pages/
    Take an image file and encode it with BASE64. Put the encoded data in
    an "img" HTML tag.
    Usage: img_to_base64 <image_file>

alarm.py
    Website: https://ubuntuincident.wordpress.com/2011/04/17/alarm-script/
    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).

prettify.py
    "prettify an HTML page"
    Website: https://pythonadventures.wordpress.com/2011/04/03/prettify-html-with-beautifulsoup/
    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>

sp.py
    "show path"
    Website: https://ubuntuincident.wordpress.com/2011/03/17/show-the-absolute-path-of-a-file/
    Print the absolute path of a file. If no parameter is passed, show the current path.
    Usage: sp <filename>

tocb.py
    "to clipboard(s)"
    Website: https://pythonadventures.wordpress.com/2011/03/05/copy-string-to-x-clipboards/
    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).
    Usage: cat file.txt | tocb

top10.py
    "top 10 largest files"
    Website: ...
    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]
Something went wrong with that request. Please try again.