Skip to content

Commit

Permalink
Add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadeáš Lejsek committed Feb 18, 2024
1 parent 7126e5b commit b2c86c1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
QR Code generator app
=====================

## Usage

Use the `qr` console app to safely generate a QR code offline without relying on any external web services.

The root command encodes text as a QR code.

```
echo -n "foo" | qr --format svg > foo.svg
```

The wifi command produces a QR code that contains a WiFi login.

```
qr wifi $SSID --format png --output wifi.png
```

The app supports SVG and PNG output formats. Use -h or --help option to display a more detailed usage information.

## Building the app

Use .NET SDK 8 to build the app. The native build toolchain is needed to publish the app for the given platform in the native AOT mode. See <https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/> for more details.

1. Navigate to src/qr folder.
2. Execute `dotnet build` to build the app.
3. Execute `dotnet publish` to publish the app. The fitting native build toolchain is needed.

## Notes

I've created the app to be able to safely create a QR code containing WiFi credentials and to test the .NET AOT publish mode. Thus, the app is a command line application published as a single binary file that does not depend on external libraries.

0 comments on commit b2c86c1

Please sign in to comment.