Skip to content

Commit

Permalink
Add silent option to suppress warning
Browse files Browse the repository at this point in the history
  • Loading branch information
subho007 committed Dec 5, 2023
1 parent 95225c7 commit 71dd1dc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 7 additions & 3 deletions apkinfo.1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.\"
.\" apkinfo(1)
.\"
.\" Copyright (C) 2018 Andres Salomon
.TH apkinfo 1 "June 2018"
.\" Copyright (C) 2023 Appknox
.TH apkinfo 1 "November 2023"
.SH NAME
apkinfo \- display information about an Android APK file
.SH SYNOPSIS
Expand All @@ -12,12 +12,16 @@ apkinfo \- display information about an Android APK file
.TP
\fB\-\-help\fR
Show a list of possible options and exit.
.TP
\fB\-s,\fP \-\-silent
Don't print any debug or warning logs
.SH DESCRIPTION
.B apkinfo
is a tool to display information about a downloaded Android APK file.
.B apkinfo
displays APK metadata such as package, version, and naming information.

This man page was contributed by Andres Salomon <[email protected]>
for the Debian GNU/Linux system (but may be used by others).
for the Debian GNU/Linux system (but may be used by others). This tool is
maintained by Appknox <[email protected]>

7 changes: 6 additions & 1 deletion pyaxmlparser/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@

from pyaxmlparser import APK

import logging

@click.command()
@click.argument('filename')
def main(filename):
@click.option('--silent', '-s', default=False, is_flag=True, help="Don't print any debug or warning logs")
def main(filename, quiet):
if quiet:
logging.basicConfig(level=logging.ERROR)

filename = os.path.expanduser(filename)
apk = APK(filename)

Expand Down

1 comment on commit 71dd1dc

@dilinger
Copy link
Contributor

@dilinger dilinger commented on 71dd1dc Dec 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should never remove copyright lines from source code - that gets you in trouble with the various free software licenses. Unless you're also removing the copyright holder's corresponding code, of course.

Instead, you generally add copyright lines. Eg,

." Copyright (C) 2018 Andres Salomon
." Copyright (C) 2022-2024 Appknox

Please sign in to comment.