|
1 | | -# Grimoire CSS Transmute (`gcsst`) |
| 1 | +# ⚠️ DEPRECATED: gcsst |
2 | 2 |
|
3 | | -A tool for seamlessly transforming standard CSS into [Grimoire CSS](https://github.com/persevie/grimoire-css) spells. |
4 | | -`gcsst` is available both as a CLI tool and as a Rust library crate. It helps you convert your CSS files or inline CSS content into a structured JSON format suitable for use with the Grimoire CSS system. |
| 3 | +**This crate is deprecated and no longer maintained.** |
5 | 4 |
|
6 | | -## Features |
7 | | - |
8 | | -- **Batch conversion**: Process multiple CSS files or patterns at once. |
9 | | -- **Inline content**: Convert CSS provided as a string. |
10 | | -- **Flexible output**: Save results to a file or print to stdout. |
11 | | -- **Oneliner support**: Optionally include a one-line representation for each class. |
12 | | - |
13 | | -## Installation |
14 | | - |
15 | | -You need [Rust](https://www.rust-lang.org/tools/install) installed. |
16 | | - |
17 | | -```sh |
18 | | -cargo install --path . |
19 | | -``` |
20 | | - |
21 | | -## Usage |
22 | | - |
23 | | -```sh |
24 | | -gcsst [OPTIONS] [INPUT] |
25 | | -``` |
26 | | - |
27 | | -### Options |
28 | | - |
29 | | -- `-p`, `--paths` Process comma-separated list of CSS file paths or glob patterns |
30 | | -- `-c`, `--content` Process CSS content provided as a string |
31 | | -- `-o`, `--output` Specify output file (default: `./grimoire/transmuted.json`) |
32 | | -- `-l`, `--with-oneliner` Include `oneliner` property in output (default: disabled) |
33 | | -- `-h`, `--help` Display help message |
34 | | - |
35 | | -### Examples |
36 | | - |
37 | | -Convert multiple CSS files: |
38 | | - |
39 | | -```sh |
40 | | -gcsst -p styles.css,components.css |
41 | | -``` |
42 | | - |
43 | | -Convert all CSS files in a directory: |
44 | | - |
45 | | -```sh |
46 | | -gcsst -p "src/**/*.css" |
47 | | -``` |
48 | | - |
49 | | -Convert inline CSS content: |
50 | | - |
51 | | -```sh |
52 | | -gcsst -c '.button { color: red; }' -l |
53 | | -``` |
54 | | - |
55 | | -Custom output file: |
56 | | - |
57 | | -```sh |
58 | | -gcsst -p '*.css' -o custom_output.json --with-oneliner |
59 | | -``` |
60 | | - |
61 | | -## Output |
62 | | - |
63 | | -The output is a JSON file (or stdout) containing an array of objects, each representing a CSS class and its corresponding Grimoire CSS spells. Example: |
64 | | - |
65 | | -```json |
66 | | -{ |
67 | | - "scrolls": [ |
68 | | - { |
69 | | - "name": "button", |
70 | | - "spells": ["color=red"], |
71 | | - "oneliner": ".button { color: red; }" |
72 | | - } |
73 | | - ] |
74 | | -} |
75 | | -``` |
76 | | - |
77 | | -## Library and CLI Usage |
78 | | - |
79 | | -You can use `gcsst` both as a command-line tool and as a Rust library crate. |
80 | | - |
81 | | -### As a library |
82 | | - |
83 | | -Add `gcsst_lib` to your `Cargo.toml` dependencies and use it in your Rust code: |
84 | | - |
85 | | -```rust |
86 | | -use gcsst_lib::transmute_from_content; |
87 | | -let (duration, json) = transmute_from_content(".foo { color: blue; }", false).unwrap(); |
88 | | -println!("{}", json); |
89 | | -``` |
90 | | - |
91 | | -## License |
92 | | - |
93 | | -MIT |
94 | | - |
95 | | -## Links |
96 | | - |
97 | | -- [Grimoire CSS](https://github.com/persevie/grimoire-css) |
98 | | -- [Documentation](https://docs.rs/grimoire-css-transmute) |
99 | | -- [Repository](https://github.com/persevie/grimoire-css-transmute) |
| 5 | +Please use **[`grimoire_css_transmutator`](https://crates.io/crates/grimoire_css_transmutator)** instead. |
0 commit comments