Skip to content

Commit 65f0089

Browse files
committed
β0.2.1
docs: Update paths in readme
1 parent 236047a commit 65f0089

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

crazywall/core/version.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
return "β0.2.0"
1+
return "β0.2.1"

readme.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Something else!
8484
(Important stuff)
8585
```
8686

87-
Let's say you wanted just `"[!h]"` to end all sections. Instead of modifying `./core/defaults/config.lua`, you can create a custom configuration in `./configs.lua`. The file should export a table where each config is mapped to a string. If you have a config mapped to `"DEFAULT"` (caps-sensitive), then crazywall will give this config priority over the other one, and fall back to the global defaults only when necessary. To use a specific custom config (e.g. `"foo"`), run `$ cw --config foo` or `$ cw -c foo`.
87+
Let's say you wanted just `"[!h]"` to end all sections. Instead of modifying `./crazywall/core/defaults/config.lua`, you can create a custom configuration in `./configs.lua`. The file should export a table where each config is mapped to a string. If you have a config mapped to `"DEFAULT"` (caps-sensitive), then crazywall will give this config priority over the other one, and fall back to the global defaults only when necessary. To use a specific custom config (e.g. `"foo"`), run `$ cw --config foo` or `$ cw -c foo`.
8888

8989
Here's an example `./configs.lua` setup to use `"[!h]"` for all close tags.
9090

@@ -127,11 +127,11 @@ To understand what each config option does, it's helpful to explain what happens
127127
1. **Command-line arguments are parsed**
128128
- See [Arguments](#arguments).
129129
2. **Some initialization is done.**
130-
- A [`Config`](./core/config.lua) object is created, based on the specified `--config` or `"DEFAULT"`. Missing options are filled in using global defaults from `./core/defaults/config.lua`.
131-
- A [`Context`](./core/context.lua) object is created using the config, the text of the source file, and the command line arguments.
132-
3. **The source text is parsed (see [`fold.parse`](./core/fold.lua)).**
130+
- A [`Config`](./crazywall/core/config.lua) object is created, based on the specified `--config` or `"DEFAULT"`. Missing options are filled in using global defaults from `./crazywall/core/defaults/config.lua`.
131+
- A [`Context`](./crazywall/core/context.lua) object is created using the config, the text of the source file, and the command line arguments.
132+
3. **The source text is parsed (see [`fold.parse`](./crazywall/core/fold.lua)).**
133133
- The entire source file is modeled as a doubly-linked tree of `Section` nodes, which can be traversed via `section.parent` and `section.children`.
134-
- A [`Section`](./core/section.lua) object is created with note type `{ "ROOT" }`, representing the entire source text.
134+
- A [`Section`](./crazywall/core/section.lua) object is created with note type `{ "ROOT" }`, representing the entire source text.
135135
- crazywall then parses the file using `config.note_schema`. `config.note_schema` should be a list of "note types", where each "note type" is a list of 3 strings:
136136
- the name of the note type
137137
- the open tag
@@ -161,7 +161,7 @@ To understand what each config option does, it's helpful to explain what happens
161161
└── * h1 section (lines 11 - 11)
162162
```
163163

164-
4. **Some preparation is done (see [`fold.prepare`](./core/fold.lua)).**
164+
4. **Some preparation is done (see [`fold.prepare`](./crazywall/core/fold.lua)).**
165165
- First, paths are resolved for each section.
166166
- The root section has its `section.path` manually set to the destination path speciffied by the command-line arguments (defaults to the same path as the source file).
167167
- All other sections are visited [in preorder](https://commons.wikimedia.org/wiki/File:Preorder-traversal.gif) (i.e. outtermost-in). For each section,
@@ -180,8 +180,8 @@ To understand what each config option does, it's helpful to explain what happens
180180
- If the function returns `false`, then *all* of the lines of the section will be deleted in the source text.
181181
- `config.transform_lines(...)` will not be called on the root sectoin.
182182

183-
5. **crazywall executes the fold in dry-run mode (see [`fold.prepare`](./core/fold.lua)).**
184-
- Regardless of whether or not `--dry-run` was actually passed, crazywall will always do a dry-run before executing. In this step, a [`Plan`](./core/plan/plan.lua) gets created, detailing all the filesystem changes that will be made.
183+
5. **crazywall executes the fold in dry-run mode (see [`fold.prepare`](./crazywall/core/fold.lua)).**
184+
- Regardless of whether or not `--dry-run` was actually passed, crazywall will always do a dry-run before executing. In this step, a [`Plan`](./crazywall/core/plan/plan.lua) gets created, detailing all the filesystem changes that will be made.
185185
- The sections are preorder traversed. For each section:
186186
- If a file or directory already exists at `section.path`
187187
- and `config.allow_overwrite == true`, then crazywall will continue to the next step.
@@ -244,5 +244,5 @@ So, for example, if a section was assigned the path `Path.void()` and the refere
244244

245245
crazywall makes two important assumptions to keep behavior simple and predictable:
246246

247-
- Two paths with the same string reprsentation are the same, and two paths with different string representations are different. Because of this, **the [`Path`](./core/path.lua) class used only works with absolute paths**, and will throw an error if a relative path is given. To use `"~/"` and `"./"`, see [`Path:join()`](./core/path.lua).
247+
- Two paths with the same string reprsentation are the same, and two paths with different string representations are different. Because of this, **the [`Path`](./crazywall/core/path.lua) class used only works with absolute paths**, and will throw an error if a relative path is given. To use `"~/"` and `"./"`, see [`Path:join()`](./crazywall/core/path.lua).
248248
- No relevant filesystem changes occur between running `cw` and confirming. As stated previously, regardless of whether `--dry-run` was passed, crazywall will always do a dry-run before making any filesystem changes. If you run `cw`, then add or delete files, and then confirm, crazywall might nto be able to stick to the plan object it presented to you.

0 commit comments

Comments
 (0)