Permalink
Browse files

Improved help displaying, fixed typo

  • Loading branch information...
1 parent 9f79faa commit 7e8ce7557e9af8f50962725613b9ed36a9d56bf2 Marcin Karpezo committed Dec 17, 2009
Showing with 2 additions and 529 deletions.
  1. +0 −402 CHANGELOG
  2. +2 −3 simpleburner.pl
  3. +0 −124 simpleburner.py
View
402 CHANGELOG
@@ -1,402 +0,0 @@
-commit 1f55adb03fd07abc022fa86ea6e30e7ba78752a8
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Tue Oct 27 15:34:06 2009 +0100
-
- Prepared for new release
-
-:100644 000000 67c4dc2... 0000000... D KNOWN_BUGS
-:100644 100644 e993557... 8622fc8... M README
-:100755 100755 92d2b61... 7b083fc... M simpleburner.pl
-
-commit 6e6437772314982e56389d9d3bf8be6a3e87e7be
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Tue Oct 27 15:11:37 2009 +0100
-
- Little fix
-
-:100755 100755 b91a4f7... 92d2b61... M simpleburner.pl
-
-commit 92ad8e2102c6ded2bef16e8349107be167717a7c
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Tue Oct 27 15:00:01 2009 +0100
-
- Finished perl rewrite
-
-:100755 100755 57d5a4c... b91a4f7... M simpleburner.pl
-
-commit 029c4b12bfae853426b9f32ff92327f2fadb5579
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Mon Oct 26 21:38:43 2009 +0100
-
- Perl rewrite almost completed
-
-:100755 100755 5c3f3b0... 57d5a4c... M simpleburner.pl
-
-commit 6aaf8efc19fae9a05b1552fe5746c4569fad598a
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Mon Oct 26 19:38:08 2009 +0100
-
- Started perl rewrite -- as You wish [;
-
-:000000 100755 0000000... 5c3f3b0... A simpleburner.pl
-:100755 100755 305ca4b... 5e7bdf5... M simpleburner.py
-
-commit d66fba5a0e666d8f10abea13262bd7231ee64284
-Author: Marcin Karpezo <marcin@arch.localdomain>
-Date: Mon Oct 12 17:39:02 2009 +0200
-
- Added achlinux pkgbuild
-
-:000000 100644 0000000... 9488c6d... A PKGBUILD
-
-commit ac837fc5afcdd3d47d445916acd4e73894d071cc
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Mon Sep 28 10:53:55 2009 +0200
-
- Added known bugs list
-
-:000000 100644 0000000... 67c4dc2... A KNOWN_BUGS
-
-commit 6f709b4ba75ff385fb18a545592868970fbe8219
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Mon Sep 28 10:29:08 2009 +0200
-
- Removed undeveloped perl implementation
-
-:100755 000000 680e601... 0000000... D simpleburner.pl
-
-commit 22588c3d8a19f4463d96b4dbfdef505dfe929f34
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Mon Sep 28 10:27:23 2009 +0200
-
- Fixed bug with checking --data option in burn-only mode
-
-:100755 100755 1064e0a... 305ca4b... M simpleburner.py
-
-commit b1627d4f02857c4a11d0a27d8e23346fa71f1d57
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Sep 26 00:16:45 2009 +0200
-
- Licence changed to BSD, added new checks and new option --mode
-
-:100644 100644 94a9ed0... 27265c6... M COPYING
-:100755 100755 9742562... 680e601... M simpleburner.pl
-:100755 100755 91fe283... 1064e0a... M simpleburner.py
-
-commit c6a3174acd341924d6a038a39e9b64ecb0e85ed4
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Sep 19 19:45:35 2009 +0200
-
- Some major fixes, added check for data option
-
-:100644 100644 d75fc0e... e993557... M README
-:100755 100755 1ef6c82... 91fe283... M simpleburner.py
-
-commit 5324cbef3d440963c5fe865a8af6ea57e9332632
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Fri Sep 18 17:55:41 2009 +0200
-
- Updated README
-
-:100644 100644 ccb634f... d75fc0e... M README
-:100755 100755 c58c707... 1ef6c82... M simpleburner.py
-
-commit 463df33593e8b28f2db48401b5b3b6c5343b1b7e
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Fri Sep 18 11:07:19 2009 +0200
-
- Small cleanup
-
-:100755 100755 0b935f3... c58c707... M simpleburner.py
-
-commit 174b2a2f952631793b177d0f63bf15e96185590b
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Fri Sep 18 10:09:48 2009 +0200
-
- Added python rewrite (version 0.2)
-
-:000000 100755 0000000... 0b935f3... A simpleburner.py
-
-commit fa1b0d6644af282b6f554d81eb1a3e3a5c108a46
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Wed Jul 29 15:58:03 2009 +0200
-
- Added version number
-
-:100755 100755 9c352ea... 9742562... M simpleburner.pl
-
-commit 6e249fde5e46e66287418e2c96bb699712ef003a
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Wed Jul 29 14:04:54 2009 +0200
-
- fixed help bug
-
-:100755 100755 ebfdfe9... 9c352ea... M simpleburner.pl
-
-commit c9f5dd6a3e07a4f820ecf848a39108c909ea7f27
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sun Jul 26 18:26:42 2009 +0200
-
- Fixed bug with making iso.
-
-:100755 100755 20ce9e0... ebfdfe9... M simpleburner.pl
-
-commit 648b80cbb585696d3207b40ee1559dd0d37abc04
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Fri Jul 24 17:44:31 2009 +0200
-
- Cleanup, README update
-
-:100644 100644 812934c... ccb634f... M README
-:100644 000000 8daa74e... 0000000... D homepage/index.html
-:100644 000000 d254caa... 0000000... D homepage/simpleburner.png
-:100644 000000 e563d3f... 0000000... D homepage/style.css
-:100755 100755 e9bd8e8... 20ce9e0... M simpleburner.pl
-
-commit c6a8c1fbdc2a1a06ef6e76bb8cc514d3511432bb
-Author: marcin <marcin@asus.aster.pl>
-Date: Thu Jun 18 13:04:04 2009 +0200
-
- Added compatibility with older perl versions (for Gentoo users)
-
-:100755 100755 dbf1d7e... e9bd8e8... M simpleburner.pl
-
-commit 6f294ba9a838db36bdaf22304ed020ef3d185c9e
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sun May 3 23:30:26 2009 +0200
-
- homepage update
-
-:100644 100644 c27c04c... 8daa74e... M homepage/index.html
-
-commit d098f8210a1fa5dbd1b48bc5e728e246cde9bac1
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sun May 3 15:59:32 2009 +0200
-
- Updated README and site
-
-:100644 100644 00c632a... 812934c... M README
-:100644 100644 f796b31... c27c04c... M homepage/index.html
-
-commit 980eae3c9060ba7dc1bcdaed060660ce36bf2473
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Fri Apr 24 15:36:50 2009 +0200
-
- Fixed burniso-only mode, release 0.1.2
-
-:100755 100755 8b9a513... dbf1d7e... M simpleburner.pl
-
-commit 9c1e019c59e2189c4b25efe4abeb3762c021f17a
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Tue Apr 21 22:07:08 2009 +0200
-
- Clean-up
-
-:000000 100644 0000000... f796b31... A homepage/index.html
-:000000 100644 0000000... d254caa... A homepage/simpleburner.png
-:000000 100644 0000000... e563d3f... A homepage/style.css
-:100644 000000 f796b31... 0000000... D index.html
-:100644 000000 d254caa... 0000000... D simpleburner.png
-:100644 000000 e563d3f... 0000000... D style.css
-
-commit f749aacbf112ca3001fc2c208bef89c7fd1ea514
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Tue Apr 21 22:06:10 2009 +0200
-
- Updated hompeage code
-
-:100644 100644 389a5bb... f796b31... M index.html
-:000000 100644 0000000... d254caa... A simpleburner.png
-:000000 100644 0000000... e563d3f... A style.css
-
-commit 8d97e4292951c209bdc1084bc627c10649cf703c
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Mon Apr 20 22:55:29 2009 +0200
-
- Homepage update
-
-:100644 100644 b721dff... 389a5bb... M index.html
-
-commit 4b9940550db5e9e73e159a75fde7055ac492d946
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Mon Apr 20 17:15:44 2009 +0200
-
- Fixed README and added homepage code
-
-:000000 100644 0000000... 00c632a... A README
-:100644 000000 2ee50e1... 0000000... D README.md
-:000000 100644 0000000... b721dff... A index.html
-
-commit 58a527a593e45c89a8dd693bc10bce9569e8f96f
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Mon Apr 20 13:56:55 2009 +0200
-
- Little cleanup
-
-:100755 100755 fcddcd0... 8b9a513... M simpleburner.pl
-
-commit 4835b0035f3047ab296956d7d12681c2cd82cbe7
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sun Apr 19 11:35:21 2009 +0200
-
- Little code improvements
-
-:100755 100755 b461467... fcddcd0... M simpleburner.pl
-
-commit 7431eb53ea9d93bbf97db391a8d74c08b389842d
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sun Apr 19 10:36:30 2009 +0200
-
- README fix
-
-:100644 100644 ddeb4dd... 2ee50e1... M README.md
-:100755 100755 710f3ef... b461467... M simpleburner.pl
-
-commit 463037d38e4b27785b82c67ed2714d32466daee8
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sun Apr 19 10:29:28 2009 +0200
-
- README fix
-
-:100644 100644 b9abf23... ddeb4dd... M README.md
-
-commit 29110d88eac564ce625e79fc9863612bf920b6e2
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sun Apr 19 10:28:54 2009 +0200
-
- README fix
-
-:100644 100644 f615f0f... b9abf23... M README.md
-
-commit 0f6c4973e05433691561f04661cc7914ff0b779f
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sun Apr 19 10:26:21 2009 +0200
-
- From now You can define other location where created iso image will be stored, some fixes. Release 0.1.1
-
-:100644 100644 9e2fb48... f615f0f... M README.md
-:100755 100755 0086028... 710f3ef... M simpleburner.pl
-
-commit 27b3b68ffb34f686956fbac8612ed837c32f59f2
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Apr 18 16:13:27 2009 +0200
-
- ble
-
-:100644 100644 7435842... 9e2fb48... M README.md
-
-commit 00d9eadfc1a9c010db04a0de0da1e25b12111473
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Apr 18 15:41:47 2009 +0200
-
- Little fix
-
-:100755 100755 0f3639c... 0086028... M simpleburner.pl
-
-commit ebb3f7d85864890f40161b34d1dd453c2d7222a3
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Apr 18 15:38:07 2009 +0200
-
- Readme update
-
-:100644 100644 eb11832... 7435842... M README.md
-
-commit e50b73c3243749787cf10f7330abb304715bea37
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Apr 18 15:33:27 2009 +0200
-
- Next name change
-
-:100644 100644 409f50c... eb11832... M README.md
-:100755 000000 aee83a4... 0000000... D simpleburn.pl
-:000000 100755 0000000... 0f3639c... A simpleburner.pl
-
-commit 1f46789714060a465294fa1173ecb8afa176d0c4
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Apr 18 15:11:32 2009 +0200
-
- Added README
-
-:000000 100644 0000000... 409f50c... A README.md
-
-commit e10547d656b9d7fc6bd091660854eafe43cbd155
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Apr 18 12:48:00 2009 +0200
-
- Update
-
-:100755 100755 b447747... aee83a4... M simpleburn.pl
-
-commit 0cdca53014c7ab5c9e202c52945c45da2af6313c
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Apr 18 12:32:52 2009 +0200
-
- Changed name
-
-:100755 000000 b447747... 0000000... D burner.pl
-:000000 100755 0000000... b447747... A simpleburn.pl
-
-commit af11b0d4d3d116b1605b8151ef78f04dacae0101
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Apr 18 10:08:27 2009 +0200
-
- Added makeiso-only and burn-only modes.
-
-:100755 100755 1475175... b447747... M burner.pl
-
-commit 24a7598801360cdcdc544370e98c50523395f301
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Apr 18 00:43:54 2009 +0200
-
- Ble
-
-:100755 100755 7b92cef... 1475175... M burner.pl
-
-commit 4434a84e56074f463ea4e03ea22bbce7df3a681f
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Apr 18 00:41:09 2009 +0200
-
- Improved help message. Release 0.1
-
-:100755 100755 7d9a327... 7b92cef... M burner.pl
-
-commit 4eae8d00efa33fc200783ec2f5193d17ca446ef5
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Sat Apr 18 00:37:44 2009 +0200
-
- Burner will now burn Your CD's \o/. Added some options that will let You choose burn options that will fit You, added test burn mode. For more information run burner with h|help option
-
-:100755 100755 262c659... 7d9a327... M burner.pl
-
-commit 8ea9053f26c4361c9149633994e19e4c3117c976
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Fri Apr 17 23:37:01 2009 +0200
-
- Improved checking for missing extension
-
-:100755 100755 9229fce... 262c659... M burner.pl
-
-commit 53acd02bb56e921aece76ed808b4e7c2e28f712a
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Fri Apr 17 23:11:23 2009 +0200
-
- Added comments
-
-:100755 100755 dc4702b... 9229fce... M burner.pl
-
-commit d2781a54b5b53f50d84197f491058c13e540768c
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Fri Apr 17 22:57:45 2009 +0200
-
- Now script will automatically add '.iso' extension if You forgot to define it in Your iso image name
-
-:100755 100755 368955b... dc4702b... M burner.pl
-
-commit b66e5d1bfd0ca48e9679908f8173c2b98efa42e1
-Author: Marcin Karpezo <sirmacik@gmail.com>
-Date: Fri Apr 17 21:55:20 2009 +0200
-
- Initial commit, burner now could only create iso image, I think that it'll burn Your CD's in next few days.
-
-:000000 100644 0000000... 94a9ed0... A COPYING
-:000000 100755 0000000... 368955b... A burner.pl
View
5 simpleburner.pl
@@ -55,7 +55,7 @@
"h|help" => \&helpmsg,);
sub helpmsg {
- my $helpmsg = <<EOM;
+ print <<EOM;
Simpleburner, made to simplyfi CD/DVD burning under CLI
Usage: simpleburner [options]
@@ -71,7 +71,6 @@ sub helpmsg {
Please send any bug reports to simpleburner-bugs\@googlegroups.com
EOM
- print($helpmsg);
exit 0;
}
sub programcheck {
@@ -94,7 +93,7 @@ sub programcheck {
sub optcheck {
unless ($burn) {
unless ($datadir) {
- print("Failed! You must deine --data option.\nRun -h|--help for more information.\n");
+ print("Failed! You must define --data option.\nRun -h|--help for more information.\n");
exit 1;
}
}
View
124 simpleburner.py
@@ -1,124 +0,0 @@
-#!/usr/bin/env python
-#-*- coding: utf-8 -*-
-# Copyright (c) 2009, Marcin Karpezo
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification,
-# are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright notice,
-# this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-# * Neither the name of the simpleburner nor the names of its contributors may
-# be used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-import os
-import sys
-import subprocess
-from optparse import OptionParser
-
-def programcheck():
- print "Looking for cdrkit..."
- if os.path.exists('/usr/bin/wodim') and os.path.exists('/usr/bin/genisoimage'):
- globals() ["writer"] = 'wodim'
- globals() ["isomaker"] = 'genisoimage'
- print "[OK]"
-
- else:
- print >>sys.stderr, "Not found\nLooking for cdrtools..."
- if os.path.exists('/usr/bin/cdrecord') and os.path.exists('/usr/bin/mkisofs'):
- globals() ["writer"] = 'cdrecord'
- globals() ["isomaker"] = 'mkisofs'
- print "[OK]"
- else:
- print >>sys.stderr, "Not found: Please install cdrkit or cdrtools!"
- sys.exit(1)
-def optcheck():
- if not burn:
- if not datadir:
- print >>sys.stderr, "Failed! You must deine --data option."
- sys.exit(1)
- elif not os.path.exists(datadir):
- print >>sys.stderr, "Failed! Data directory does not exist!"
- sys.exit(1)
-def makeiso():
- print "Making iso image..."
- command = "%s -U -quiet -o %s "%s"" % (isomaker, isoname, datadir)
- makeiso = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True).communicate()[0]
- if makeiso:
- print >>sys.stderr, "Failed!"
- sys.exit(1)
- else:
- print "[OK]\nFile stored in %s" % isoname
-def burniso():
- print "Burning iso..."
- if speed:
- burnspeed = " --speed=%s" % speed
- else:
- burnspeed = ''
- if test == "True":
- runtest = ' --dummy'
- else:
- runtest = ''
- command = "%s --eject -vs -%s --dev=%s %s %s %s" % (writer, mode, device, burnspeed, runtest, isoname)
- burniso = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True).communicate()[0]
- if burniso:
- print >>sys.stderr, "Failed or ended successfully with warnings"
- sys.exit(1)
- else:
- print "[OK]"
-
-if __name__=="__main__":
- usage = "usage: %prog [options]"
- parser = OptionParser(usage=usage)
- parser.add_option("--data", dest="datadir",
- help="set directory with data to burn")
- parser.add_option("--name", dest="isoname", default="/tmp/cd.iso",
- help="set path and/or name of iso image (by default /tmp/cd.iso)")
- parser.add_option("--device", dest="device", default="/dev/sr0",
- help="set device to use (default /dev/sr0)")
- parser.add_option("--speed", dest="speed",
- help="set burn speed (by default it will be autodetected)")
- parser.add_option("--mode", dest="mode", default="tao",
- help="set burn mode; available options are: TAO (default), DAO, SAO, RAW)")
- parser.add_option("-t", "--test", action="store_true", dest="test", default= False ,
- help="run in test burn mode")
- parser.add_option("-b", "--burn-only", action="store_true", dest="burn", default=False,
- help="run without making iso image")
- parser.add_option("-m", "--makeiso", action="store_true", dest="make", default=False,
- help="make only iso image")
-
- (options, args) = parser.parse_args()
- datadir = options.datadir
- isoname = options.isoname
- device = options.device
- speed = options.speed
- mode = options.mode
- test = options.test
- burn = options.burn
- make = options.make
-
- programcheck()
- optcheck()
- if burn == True:
- burniso()
- elif make == True:
- makeiso()
- else:
- makeiso()
- burniso()
-

0 comments on commit 7e8ce75

Please sign in to comment.