@@ -51,10 +51,12 @@ The library is designed to be used as a command-line tool. It is available on [C
51
51
- [ Documentation] ( #documentation )
52
52
- [ Usage] ( #usage )
53
53
- [ Command-line interface] ( #command-line-interface )
54
- - [ Generate a new library using a CSV file] ( #generate-a-new-library-using-a-csv-file )
55
- - [ Generate a new library using a JSON file] ( #generate-a-new-library-using-a-json-file )
56
- - [ Generate a new library using a TOML file] ( #generate-a-new-library-using-a-toml-file )
57
- - [ Generate a new library using a YAML file] ( #generate-a-new-library-using-a-yaml-file )
54
+ - [ Passing a configuration file] ( #passing-a-configuration-file )
55
+ - [ Generate a new library using a CSV file] ( #generate-a-new-library-using-a-csv-file )
56
+ - [ Generate a new library using an INI file] ( #generate-a-new-library-using-an-ini-file )
57
+ - [ Generate a new library using a JSON file] ( #generate-a-new-library-using-a-json-file )
58
+ - [ Generate a new library using a TOML file] ( #generate-a-new-library-using-a-toml-file )
59
+ - [ Generate a new library using a YAML file] ( #generate-a-new-library-using-a-yaml-file )
58
60
- [ Generate a new library using the command-line interface (CLI) directly] ( #generate-a-new-library-using-the-command-line-interface-cli-directly )
59
61
- [ Examples] ( #examples )
60
62
- [ Semantic Versioning Policy] ( #semantic-versioning-policy )
@@ -99,7 +101,7 @@ libmake --help
99
101
100
102
### Requirements
101
103
102
- The minimum supported Rust toolchain version is currently Rust ` 1.71.1 ` or later (stable).
104
+ The minimum supported Rust toolchain version is currently Rust ` 1.75.0 ` or later (stable).
103
105
104
106
` LibMake ` is supported and has been tested on the following platforms:
105
107
@@ -149,72 +151,91 @@ support additional platforms, please submit a pull request.
149
151
150
152
` LibMake ` provides a command-line interface to generate a new library project. There are a few options available to help you get started.
151
153
152
- #### Generate a new library using a CSV file
154
+ #### Passing a configuration file
155
+
156
+ ##### Generate a new library using a CSV file
153
157
154
158
The following command generates a library template from a CSV file.
155
159
156
160
Have a look at the ` tests/data/mylibrary.csv ` file for an example and
157
161
feel free to use it for your own library as a template.
158
162
159
163
``` shell
160
- libmake --csv tests/data/mylibrary.csv
164
+ libmake file --csv tests/data/mylibrary.csv
165
+ ```
166
+
167
+ or locally if you have cloned the repository:
168
+
169
+ ``` shell
170
+ cargo run -- file --csv tests/data/mylibrary.csv
171
+ ```
172
+
173
+ ##### Generate a new library using an INI file
174
+
175
+ The following command generates a library template from an INI file.
176
+
177
+ Have a look at the ` tests/data/mylibrary.ini ` file for an example and
178
+ feel free to use it for your own library as a template.
179
+
180
+ ``` shell
181
+ libmake file --ini tests/data/mylibrary.ini
161
182
```
162
183
163
184
or locally if you have cloned the repository:
164
185
165
186
``` shell
166
- cargo run -- --csv tests/data/mylibrary.csv
187
+ cargo run -- file --ini tests/data/mylibrary.ini
167
188
```
168
189
169
- #### Generate a new library using a JSON file
190
+ ##### Generate a new library using a JSON file
170
191
171
192
The following command generates a library template from a JSON file.
172
193
173
194
Have a look at the ` tests/data/mylibrary.json ` file for an example and
174
195
feel free to use it for your own library as a template.
175
196
176
197
``` shell
177
- libmake --json tests/data/mylibrary.json
198
+ libmake file --json tests/data/mylibrary.json
178
199
```
179
200
180
201
or locally if you have cloned the repository:
181
202
182
203
``` shell
183
- cargo run -- --json tests/data/mylibrary.json
204
+ cargo run -- file --json tests/data/mylibrary.json
184
205
```
185
206
186
- #### Generate a new library using a TOML file
207
+ ##### Generate a new library using a TOML file
187
208
188
209
The following command generates a library template from a TOML file.
189
210
190
211
Have a look at the ` tests/data/mylibrary.toml ` file for an example and
191
212
feel free to use it for your own library as a template.
192
213
193
214
``` shell
194
- libmake --toml tests/data/mylibrary.toml
215
+ libmake file --toml tests/data/mylibrary.toml
195
216
```
196
217
197
218
or locally if you have cloned the repository:
198
219
199
220
``` shell
200
- cargo run -- --toml tests/data/mylibrary.toml
221
+ cargo run -- file --toml tests/data/mylibrary.toml
201
222
```
202
223
203
- #### Generate a new library using a YAML file
224
+ ##### Generate a new library using a YAML file
204
225
205
226
The following command generates a library template from a YAML file.
206
227
207
228
Have a look at the ` tests/data/mylibrary.yaml ` file for an example and
208
229
feel free to use it for your own library as a template.
209
230
210
231
``` shell
211
- libmake --yml tests/data/mylibrary.yaml
232
+ libmake file --yaml tests/data/mylibrary.yaml
212
233
```
213
234
214
235
or locally if you have cloned the repository:
215
236
216
237
``` shell
217
- cargo run -- --yml tests/data/mylibrary.yaml
238
+ cargo run -- file --yaml tests/data/mylibrary.yaml
218
239
```
219
240
220
241
#### Generate a new library using the command-line interface (CLI) directly
@@ -223,7 +244,7 @@ The following command generates a library template using the command-line
223
244
interface.
224
245
225
246
``` shell
226
- libmake \
247
+ libmake manual \
227
248
--author " John Smith" \
228
249
--build " build.rs" \
229
250
--categories " ['category 1', 'category 2', 'category 3']" \
@@ -238,15 +259,15 @@ libmake \
238
259
--output " my_library" \
239
260
--readme " README.md" \
240
261
--repository " https://github.com/example/my_library" \
241
- --rustversion " 1.71.1 " \
262
+ --rustversion " 1.75.0 " \
242
263
--version " 0.1.0" \
243
264
--website " https://example.com/john-smith"
244
265
```
245
266
246
267
or locally if you have cloned the repository:
247
268
248
269
``` shell
249
- cargo run -- --author " John Smith" \
270
+ cargo run -- manual --author " John Smith" \
250
271
--build " build.rs" \
251
272
--categories " ['category 1', 'category 2', 'category 3']" \
252
273
--description " A Rust library for doing cool things" \
@@ -260,7 +281,7 @@ cargo run -- --author "John Smith" \
260
281
--output " my_library" \
261
282
--readme " README.md" \
262
283
--repository " https://github.com/example/my_library" \
263
- --rustversion " 1.71.1 " \
284
+ --rustversion " 1.75.0 " \
264
285
--version " 0.1.0" \
265
286
--website " https://example.com/john-smith"
266
287
```
@@ -276,6 +297,7 @@ To run the examples, clone the repository and run the following command in your
276
297
| ` generate_from_args ` | Generates a library template using the command-line interface. | ` cargo run --example generate_from_args ` |
277
298
| ` generate_from_config ` | Generates a library template from a configuration file. | ` cargo run --example generate_from_config ` |
278
299
| ` generate_from_csv ` | Generates a library template from a CSV file. | ` cargo run --example generate_from_csv ` |
300
+ | ` generate_from_ini ` | Generates a library template from an INI file. | ` cargo run --example generate_from_ini ` |
279
301
| ` generate_from_json ` | Generates a library template from a JSON file. | ` cargo run --example generate_from_json ` |
280
302
| ` generate_from_toml ` | Generates a library template from a TOML file. | ` cargo run --example generate_from_toml ` |
281
303
| ` generate_from_yaml ` | Generates a library template from a YAML file. | ` cargo run --example generate_from_yaml ` |
@@ -334,6 +356,6 @@ providing a lot of useful suggestions on how to improve this project.
334
356
[ crates-badge ] : https://img.shields.io/crates/v/libmake.svg?style=for-the-badge " Crates.io Badge "
335
357
[ divider ] : https://kura.pro/common/images/elements/divider.svg " divider "
336
358
[ docs-badge ] : https://img.shields.io/docsrs/libmake.svg?style=for-the-badge " Docs.rs Badge "
337
- [ libs-badge ] : https://img.shields.io/badge/lib.rs-v0.2.1 -orange.svg?style=for-the-badge " Lib.rs Badge "
359
+ [ libs-badge ] : https://img.shields.io/badge/lib.rs-v0.2.2 -orange.svg?style=for-the-badge " Lib.rs Badge "
338
360
[ license-badge ] : https://img.shields.io/crates/l/libmake.svg?style=for-the-badge " License Badge "
339
361
[ made-with-rust-badge ] : https://img.shields.io/badge/rust-f04041?style=for-the-badge&labelColor=c0282d&logo=rust " Made With Rust Badge "
0 commit comments