Menu

#7 -o flag not honored with -fa

version 0.4.0
closed-fixed
dmtxwrite (13)
2
2008-01-08
2008-01-08
No

The -fa flag sends ascii to stdout, and ignores the existence of the -o flag. The following both print the ascii to the screen:

$ echo foo | dmtxwrite -fa
echo foo | dmtxwrite -fa -o bar

when a reasonable person might expect the output to be sent to the file named bar. However, shell redirection works as expected:

$ echo foo | dmtxwrite -fa > bar

The behavior of the -o flag should be consistent, regardless of the output format.

Discussion

  • Private Citizen

    Private Citizen - 2008-01-08
    • priority: 5 --> 2
     
  • Mike Laughton

    Mike Laughton - 2008-01-08

    Logged In: YES
    user_id=1384836
    Originator: NO

    Good suggestion -- This issue arose from the same problem as bug 1866550, which is now closed. The root cause was that I didn't intend for -fa and -fc to be treated as valid "scannable" barcode output, and as such they print to STDOUT without paying attention to the -o switch.

    Bug 1866550 was addressed by instead treating the ASCII-art (-fa) and codeword (-fc) output as "preview" options (-pa and -pc), which is now defined in the --help as something that prints to STDOUT. If a user still requires this to be captured in a file then they can use the same redirection or pipes as they would use with verbose log messages.

    Thanks for the suggestion!
    Mike

     
  • Mike Laughton

    Mike Laughton - 2008-01-08
    • status: open --> closed-fixed
     

Log in to post a comment.