Skip to main content

several small tools.

Project description

Plans:
- None. At the moment I'm happy with this structure.


Ideas:
- Adding information, how to use Mercurial to use this structure in your own project and keep it up to date while keeping your changes.
- Get the version information from the Changelog. -> i.e.: First line.split()[-1] => One less point where I have to change things when updating.


Source URL (Mercurial): U{http://bitbucker.org/ArneBab/babtools-misc/}

PyPI URL: U{http://pypi.python.org/pypi/babtools_misc}


## babplay_mpd_playlist

Use mplayer to play an mpd playlist.

Usage:
babplay_mpd_playlist.py [options] <playlist without suffix>

Options:
--random shuffle list before playing

Dependencies:
* shell
* cat
* sed
* mplayer




## babplay_randomly

Tell mplayer to randomly play all passed files.

usage: babplay_randomly.py [--help] [-fs] [DIR DIR ...] [FILE FILE ...]


## babsearch_n_replace

Search and replace text strings inside text files.

usage:
- babsearch_n_replace.py [options] "Search String" "Replace String" file1 dir1 file2 file3
replace text string
...

options:
--verbose
print the files in which we found the search string.
--dry-run
don't change any files.
--suffixes a list of suffixes seperated by commas.
Examples: "--suffixes=.txt,.html" - only .txt and .html , "--sufixes=" - match all files.

Decisions:
- No undoing, because undoing could do more harm than just replacing back (would remove all new file changes -> damn unexpected!).

Ideas:
- Treat linebreaks as whitespace.



## get_all_files

This module serves only for providing the get_all_files_in(dir) function,
since I need it quite often.

usage:
>>> from get_all_files import get_all_files_in
>>> files = get_all_files_in(".")


Changelog:

babtools_misc 0.1

- made the tools ready for PyPI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

babtools_misc-0.1.tar.gz (6.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page