chore: reformat readme
This commit is contained in:
53
README.md
53
README.md
@@ -2,11 +2,9 @@
|
||||
|
||||
Simple Rust Tests
|
||||
|
||||
Project or files:
|
||||
```
|
||||
.
|
||||
├── LICENSE
|
||||
├── README.md
|
||||
├── README_template.md
|
||||
├── __c_cpp
|
||||
│ ├── c_export
|
||||
│ └── cpp
|
||||
@@ -82,35 +80,32 @@ Simple Rust Tests
|
||||
│ ├── rweb
|
||||
│ ├── sincere
|
||||
│ └── warp
|
||||
├── build_readme.js
|
||||
├── build_summary
|
||||
├── scripts
|
||||
│ └── commit-msg.crs
|
||||
├── single_file_tests
|
||||
│ ├── 99.htm
|
||||
│ ├── 99.rs
|
||||
│ ├── chain.rs
|
||||
│ ├── closure.rs
|
||||
│ ├── core_macro.rs
|
||||
│ ├── display.rs
|
||||
│ ├── for.rs
|
||||
│ ├── format.rs
|
||||
│ ├── input.rs
|
||||
│ ├── lifecycle_str.rs
|
||||
│ ├── list.rs
|
||||
│ ├── loop.rs
|
||||
│ ├── make_executable.rs
|
||||
│ ├── match.rs
|
||||
│ ├── rc.rs
|
||||
│ ├── ref_n_and.rs
|
||||
│ ├── sample.txt
|
||||
│ ├── slice.rs
|
||||
│ ├── time.rs
|
||||
│ ├── vec.rs
|
||||
│ └── while.rs
|
||||
└── summary.md
|
||||
└── single_file_tests
|
||||
├── 99.htm
|
||||
├── 99.rs
|
||||
├── chain.rs
|
||||
├── closure.rs
|
||||
├── core_macro.rs
|
||||
├── display.rs
|
||||
├── for.rs
|
||||
├── format.rs
|
||||
├── input.rs
|
||||
├── lifecycle_str.rs
|
||||
├── list.rs
|
||||
├── loop.rs
|
||||
├── make_executable.rs
|
||||
├── match.rs
|
||||
├── rc.rs
|
||||
├── ref_n_and.rs
|
||||
├── sample.txt
|
||||
├── slice.rs
|
||||
├── time.rs
|
||||
├── vec.rs
|
||||
└── while.rs
|
||||
|
||||
77 directories, 28 files
|
||||
77 directories, 26 files
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
Simple Rust Tests
|
||||
|
||||
Project or files:
|
||||
```
|
||||
$$TREE_L2$$
|
||||
```
|
||||
|
||||
@@ -3,7 +3,18 @@
|
||||
var main = () => {
|
||||
var readmeTemplate = __.rfile.from('README_template.md').string();
|
||||
var tree = $$.shell().sh('tree -L 2').start()[0];
|
||||
__.rfile.from('README.md').write(readmeTemplate.replace('$$TREE_L2$$', tree));
|
||||
var treeLines = [];
|
||||
var treeOrigLines = $STR(tree).split('\n');
|
||||
var ignoreFileList = ['LICENSE', 'README.md', 'README_template.md', 'build_readme.js'];
|
||||
for (var i = 0; i < treeOrigLines.length; i++) {
|
||||
var ln = treeOrigLines[i];
|
||||
var matches = false;
|
||||
ignoreFileList.forEach((f) => { if (ln.endsWith(f)) { matches = true; } });
|
||||
if (!matches) {
|
||||
treeLines.push(ln);
|
||||
}
|
||||
}
|
||||
__.rfile.from('README.md').write(readmeTemplate.replace('$$TREE_L2$$', treeLines.join('\n')));
|
||||
};
|
||||
|
||||
main();
|
||||
|
||||
Reference in New Issue
Block a user