| Crates.io | wikidot-path |
| lib.rs | wikidot-path |
| version | 0.6.0 |
| created_at | 2020-01-02 04:29:30.285401+00 |
| updated_at | 2023-09-29 21:41:36.342227+00 |
| description | Simple library to provide Wikidot-compatible path parsing |
| homepage | |
| repository | https://github.com/scpwiki/wikidot-path |
| max_upload_size | |
| id | 194387 |
| size | 17,694 |
Simple library to provide Wikidot-compatible path parsing.
Wikidot accepts paths in an unusual manner: each argument is submitted as another "directory".
For instance, to access page scp-xxxx with options norender and edit, you would go to /scp-xxxx/norender/true/edit/true.
However this also extends its usage in a few minor ways. For instance, options like edit only make sense when true, but passing that field is always required by Wikidot. Thus the logical URL /scp-xxxx/edit doesn't work, despite it being rather clear to a human what the intent is. This library adjusts this by allowing "solo keys" (those without values).
Additionally URL normalization is performed. See the wikidot-normalize crate for more information.
Available under the terms of the MIT License. See LICENSE.md.
This library targets the latest stable Rust. At time of writing, that is 1.68.2
$ cargo build --release
$ cargo test
Add -- --nocapture to the end if you want to see test output.