Skip to content

Commit

Permalink
add README.md and rename main to converter
Browse files Browse the repository at this point in the history
  • Loading branch information
1mpossible-code committed Dec 7, 2024
1 parent b287c06 commit b0375b4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions converter/src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Usage
```
usage: converter.py [-h] input_file output_file
Converts ninja files to ShadowDash manifest files.
positional arguments:
input_file Path to the input file to process
output_file Path to the output file
options:
-h, --help show this help message and exit
```

You can call it using the following command:
```bash
python3 converter.py input_file output_file
```

# Prerequisites
- Python 3.6 or higher

# Test

To test the program we can use the files in the `docs` folder. The following command will convert the `build.ninja` file to a `build.ninja.cc` file:
```bash
python3 converter.py ../docs/build.ninja build.ninja.cc
```
Aside from formatting, the file `build.ninja.cc` should be identical to the `build.ninja.cc` file in the docs directory.

# Implementation

The program is implemeted to match the languages developed by the `ninja` build system and Team 4 `new-language` subteam.
2 changes: 1 addition & 1 deletion converter/src/main.py → converter/src/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os

def main():
parser = argparse.ArgumentParser(description='Process a file.')
parser = argparse.ArgumentParser(description='Converts ninja files to ShadowDash manifest files.')

parser.add_argument('input_file',
help='Path to the input file to process')
Expand Down

0 comments on commit b0375b4

Please sign in to comment.