Remove requirement for positional arguments
This commit is contained in:
+4
-4
@@ -39,10 +39,10 @@ def plot_freq(stats_df: pd.DataFrame, title: str) -> go.Figure:
|
|||||||
return fig
|
return fig
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = argparse.ArgumentParser(description="Analyze CAN bus frequency.")
|
parser = argparse.ArgumentParser(description="Analyze CAN bus message frequency")
|
||||||
parser.add_argument("-i", "--input", type=Path, required=True)
|
parser.add_argument("input", type=Path, help="Path to the input CAN log file")
|
||||||
parser.add_argument("-o", "--output", type=Path, default=Path("freq_report.html"))
|
parser.add_argument("output", type=Path, nargs="?", default=Path("freq_report.html"), help="Path to the output HTML report")
|
||||||
parser.add_argument("-t", "--title", type=str, default="CAN Bus Message Frequency")
|
parser.add_argument("title", nargs="?", default="CAN Bus Message Frequency", help="Title for the HTML report")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
df = load_data(args.input)
|
df = load_data(args.input)
|
||||||
|
|||||||
Reference in New Issue
Block a user