Changeset 32:80a51180155e in stamper for bin/stamps


Ignore:
Timestamp:
Aug 9, 2014, 10:04:58 AM (10 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

Added support to delete up to N stamps from the list:

  • Delete the last recorded stamp:

stamp -d 1

  • Delete the last 10 stamps:

stamp -d 10

We ask for confirmation before proceeding with every stamp, in case
the user asks for the removal of multiple stamps, as soon as he does
not remove one of them, the following stamps could not be deleted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/stamps

    r30 r32  
    2121    parser.add_argument('-t', '--timeline', action="store_true",
    2222                        help='Show a timeline of recorded times')
     23    parser.add_argument('-d', '--delete', action="store", type=int,
     24                        help='Delete up to n recorded stamps')
    2325
    2426    args = parser.parse_args()
     
    3638    if args.timeline:
    3739        s.timeline()
     40    elif args.delete:
     41        s.remove_stamps(args.delete)
    3842    elif args.graph:
    3943        s.graph_stamps(args.customer, args.filter)
Note: See TracChangeset for help on using the changeset viewer.