Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sohomsahaun authored Apr 18, 2023
1 parent 7b5fdcc commit 02fbda3
Showing 1 changed file with 42 additions and 4 deletions.
46 changes: 42 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
GM Code Exporter exports code from `.gml` files in a GameMaker project.

It is very quickly put together without much polish - but it does the job!
 


## Usage

You need to have [Node.js](https://nodejs.org/) installed to use this tool from the CLI.

If you are using it for the first time, you need to install the dependecies using:
```shell
npm install;
npm install
```

Run the following command:
Expand All @@ -23,6 +24,43 @@ node index.js --obj --scr --yyp <yyp_path_here>
| --obj | Get code from the objects |
| --scr | Get code from the scripts |

&nbsp;

An output text file will be generated in the `./out/` directory.


## Customization

You can customize the header and footer of how each file is printed in the output. The classes can be edited from `./src/Types.js`.

<table>
<thead>
<tr>
<th>Class</th>
<th>Method</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan=2>Object</td>
<td>get_header</td>
<td>Header of code from GM objects</td>
</tr>
<tr>
<td>get_footer</td>
<td>Footer of code from GM objects</td>
</tr>
</tbody>
<tbody>
<tr>
<td rowspan=2>Script</td>
<td>get_header</td>
<td>Header of code from GM scripts</td>
</tr>
<tr>
<td>get_footer</td>
<td>Footer of code from GM scripts</td>
</tr>
</tbody>
</table>

All methods have the same argument, `fname`, which indicates the gml file name the code is being read from.

0 comments on commit 02fbda3

Please sign in to comment.