Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file name as a flag #339

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

0WN463
Copy link
Contributor

@0WN463 0WN463 commented Sep 28, 2024

  • renamed --output to --output-dir (note: backwards incompatible)
  • added --file flag
    • also supports - to output data to stdout
    • this is for future support for piping the output to another program, but we need to change the QR code and other details to be printed to stderr instead when we want this
  • when both are used, the output-dir will be prepended to the filename

Examples:

# saves file with the file path of ./output
./qrcp receive  --file output

# saves file with the file path of ./dir/$FILENAME
./qrcp receive  --output-dir dir 

# saves file with the file path of ./dir/output
./qrcp receive  --file output --output-dir dir 

# dumps file to stdout
./qrcp receive  --file -

@0WN463 0WN463 marked this pull request as draft September 28, 2024 04:09
@0WN463 0WN463 marked this pull request as ready for review October 5, 2024 02:52
@0WN463 0WN463 force-pushed the feature-file-flag branch from 3c646ad to bb22a18 Compare October 5, 2024 02:53
@claudiodangelis
Copy link
Owner

Hello, many thanks for this contribution. I need some more time to review it!
C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants