awslabs / awslabs/diagram-as-code

[Feature Request] Add automatic .png extension to output filename

Open Beginner friendly
#77 0 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
Go
Stars
1.6k
Forks
102
Avg merge
2d 9h
Merged PRs (30d)
2

Description

## Request

Add automatic .png extension to output filename.
For example,
* If the user enters example as the filename, the tool should save the file as example.png.
* If the user enters example.png as the filename, the tool should keep the filename as is.

## Background

Currently, when specifying a filename for the output file, if the .png extension is not included, the tool does not automatically append it. This can lead to confusion and errors, especially for users who are not familiar with file extensions.
To improve the user experience and prevent potential issues, it would be beneficial to implement a feature that automatically adds the .png extension to the output filename if it is not already present.

Contributor guide

Open the contributing guide

Research direction

No files or tests are named in the issue. Start by tracing how the CLI receives and writes the output filename, then check the existing output-related tests if present. Done means a filename without an extension is saved with .png, while one already ending in .png remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.