Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

summer.py Manual

Author: Marc 'BlackJack' Rintsch
Contact: marc@rintsch.de
Date: 2005-02-27
Version: 0.0.1
Copyright: This document has been placed in the public domain.

1   Name

summer.py -- calculates checksums of files.

2   Synopsis

summer.py [path ...]

If - or no path is given at the command line the input is read from stdin.

3   Description

The program calculates checksums of the given file(s). It uses the md5 and the sha1 algorithms and produces output compatible with the commands md5sum and sha1sum. Those tools can be used to test the files against the checksums later.

The reason to use summer.py instead of the two programs mentioned above is that this program calculates both checksums in one pass, i.e. the data is just read once. This makes a noticable difference in execution time, especially on large files like movies, CD or DVD images.

4   Requirements

The script requires Python version 2.3 or higher.

5   Examples

Calculate the md5 and sha1 checksum of an ISO image and store them into a file:

./summer.py image.iso > checksums.txt

6   Output Format

The output format is the same as the one of the standard md5sum and sha1sum programs. It is a text file with one line per checksum with the checksum as hexdigest, followed by a single space, followed by another space if the file was opened as text file or a * if it was opened in binary mode, followed by the filename.

Example of checksums for a file that was opened in text mode:

c83e90b70123138ec8de3528eb1aa5ba  image.iso
bc7c898b034bec1de8cf8fc76185e2432ac360eb  image.iso

7   History

0.0.1a : 2005-02-27
Initial alpha release.

8   ToDo

9   Bugs

None known yet. If you find some please send me a mail.

Recent activity

Marc 'BlackJack' Rintsch

Commits by Marc 'BlackJack' Rintsch were pushed to blackjack/summer.py

75c86e4 - Changed encoding of README to UTF-8.
Marc 'BlackJack' Rintsch

Commits by Marc 'BlackJack' Rintsch were pushed to blackjack/summer.py

dd781ab - Removed default.css as it is embedded into the HTML by recent versions of docutils.
Marc 'BlackJack' Rintsch

Commits by Marc 'BlackJack' Rintsch were pushed to blackjack/summer.py

9af7b5e - Ignore editor backup files and Python bytecode.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.