-
-
Save davemenninger/e65b9df9efd9bf230d9be28c6d2f530a to your computer and use it in GitHub Desktop.
findintext and TODO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl │+ $order->$method( | |
│+ line_item_numbers => [ $message->{order_item}->[0]->{line_item_number} ], | |
use warnings; │+ description => $message->{event}->[0]->{description}, | |
use File::Find; │+ metadata => \%metadata, | |
│+ ); | |
my $text = shift; │ | |
find( { wanted => \&wanted, follow => 1 }, '.' ); │- # TODO order notes | |
│+ # order notes | |
sub wanted │+ for my $note ( @{ $message->{order}->[0]->{order_notes}->[0]->{order_note} } ) | |
{ │+ { | |
if ( -T && -s ) │+ $logger->debug($note->{note}); | |
{ │+ $order->add_note($note->{subject},$note->{note}); | |
my $match = `fgrep -l '$text' '$_'`; │+ } | |
print "$File::Find::name\n" if $match; │ | |
} │ $supplier_processor->send_order_updates( order => $order ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash │- # TODO line_item_number, event, description | |
│- # $order->$method( | |
here=`pwd` │- # line_item_numbers => [ $message->{line_item_number} ], | |
cd `git rev-parse --show-toplevel` │- # description => $message->{event}->{description}, | |
findintext TODO | egrep -v '*~$' │- # metadata => \%metadata, | |
cd $here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
findintext is just a recursive grep
TODO tells me which files in my repo have TODO's in them