X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ashley;h=194b715dff04ef4aa197a273550c20544459ff75;hb=3686a00f1001f2d5692fa5e706b898053e39191a;hp=cce91ce5f4e89720884a76d4c25e08a392fc5295;hpb=c846e77a848d60dd115f00faa0d9a854161d99eb;p=dak.git diff --git a/ashley b/ashley index cce91ce5..194b715d 100755 --- a/ashley +++ b/ashley @@ -1,8 +1,8 @@ #!/usr/bin/env python # Dump variables from a .katie file to stdout -# Copyright (C) 2001, 2002 James Troup -# $Id: ashley,v 1.7 2002-10-16 02:47:32 troup Exp $ +# Copyright (C) 2001, 2002, 2004 James Troup +# $Id: ashley,v 1.9 2004-04-01 17:14:25 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ ################################################################################ # ooooooooooooooohhhhhhhhhhhhhhhhhhhhhhhhh dddddddddeeeeeeeaaaaaaaarrrrrrrrrrr -# iiiiiiiiiiiii tttttttttthhhhhhhhiiiiiiiiiiiinnnnnnnnnkkkkkkkkkkkkk iiiiiiiiiiiiii mmmmmmmmmmiiiiiiiisssssssssssssssseeeeeeeddd uuuupppppppppppp ttttttttthhhhhhhheeeeeeee xxxxxxxssssssseeeeeeeeettttttttttttt aaaaaaaarrrrrrrggggggsssssssss +# iiiiiiiiiiiii tttttttttthhhhhhhhiiiiiiiiiiiinnnnnnnnnkkkkkkkkkkkkk iiiiiiiiiiiiii mmmmmmmmmmeeeeeeeesssssssssssssssseeeeeeeddd uuuupppppppppppp ttttttttthhhhhhhheeeeeeee xxxxxxxssssssseeeeeeeeettttttttttttt aaaaaaaarrrrrrrggggggsssssssss # # ['xset r rate 30 250' bad, mmkay] @@ -29,9 +29,33 @@ import sys; import katie, utils; +import apt_pkg; + + +################################################################################ + +def usage(exit_code=0): + print """Usage: ashley FILE... +Dumps the info in .katie FILE(s). + + -h, --help show this help and exit.""" + sys.exit(exit_code) + +################################################################################ def main(): Cnf = utils.get_conf() + Arguments = [('h',"help","Ashley::Options::Help")]; + for i in [ "help" ]: + if not Cnf.has_key("Ashley::Options::%s" % (i)): + Cnf["Ashley::Options::%s" % (i)] = ""; + + apt_pkg.ParseCommandLine(Cnf, Arguments, sys.argv); + + Options = Cnf.SubTree("Ashley::Options") + if Options["Help"]: + usage(); + k = katie.Katie(Cnf); for arg in sys.argv[1:]: arg = utils.validate_changes_file_arg(arg); @@ -61,7 +85,8 @@ def main(): dsc = k.pkg.dsc; print " Dsc:"; - for i in [ "source", "version", "maintainer", "fingerprint", "uploaders" ]: + for i in [ "source", "version", "maintainer", "fingerprint", "uploaders", + "bts changelog" ]: if dsc.has_key(i): print " %s: %s" % (i.capitalize(), dsc[i]); del dsc[i]; @@ -100,6 +125,7 @@ def main(): if dsc_files[file]: utils.warn("dsc_files[%s] still has following unrecognised keys: %s" % (file, dsc_files[file].keys())); +################################################################################ if __name__ == '__main__': main()