Skip to content

Commit c3175ff

Browse files
committed
Reorganize workspace
1 parent 5a44b68 commit c3175ff

28 files changed

Lines changed: 122 additions & 103 deletions

Cargo.lock

Lines changed: 19 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[workspace]
2-
members = ["crates/*", "tests"]
3-
default-members = ["crates/svg2pdf-cli"]
2+
members = ["cli", "tests"]
43
resolver = "2"
54

65
[workspace.package]
@@ -11,3 +10,49 @@ repository = "https://github.com/typst/svg2pdf"
1110
readme = "README.md"
1211
license = "MIT OR Apache-2.0"
1312

13+
[workspace.dependencies]
14+
svg2pdf = { path = "." }
15+
clap = { version = "4.4.2", features = ["derive"] }
16+
clap_complete = "4.4.3"
17+
clap_mangen = "0.2.14"
18+
fontdb = "0.15"
19+
image = { version = "0.24", default-features = false, features = ["jpeg", "png", "gif"] }
20+
indicatif = "0.17.5"
21+
lazy_static = "1.4.0"
22+
miniz_oxide = "0.7"
23+
once_cell = "1.18.0"
24+
oxipng = { version = "9", default-features = false, features = ["filetime", "parallel", "zopfli"] }
25+
pdf-writer = "0.9"
26+
pdfium-render = "0.8.6"
27+
regex = "1.8.4"
28+
termcolor = "1.2"
29+
usvg = { version = "0.36", default-features = false }
30+
walkdir = "2.3.3"
31+
32+
[package]
33+
name = "svg2pdf"
34+
description = "Convert SVG files to PDFs."
35+
categories = ["encoding", "graphics", "multimedia"]
36+
keywords = ["svg", "pdf", "vector-graphics", "conversion"]
37+
version = { workspace = true }
38+
authors = { workspace = true }
39+
edition = { workspace = true }
40+
repository = { workspace = true }
41+
license = { workspace = true }
42+
43+
[lib]
44+
bench = false
45+
46+
[features]
47+
default = ["image"]
48+
image = ["dep:image"]
49+
50+
[dependencies]
51+
miniz_oxide = { workspace = true }
52+
once_cell = { workspace = true }
53+
pdf-writer = { workspace = true }
54+
usvg = { workspace = true }
55+
image = { workspace = true, optional = true }
56+
57+
[dev-dependencies]
58+
usvg = { workspace = true, features = ["text", "system-fonts"] }

NOTICE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
================================================================================
22
The Creative Commons Zero v1.0 Universal License applies to:
3-
* The ICC profiles found in `crates/svg2pdf/src/icc/*`
3+
* The ICC profiles found in `src/icc/*`
44

55
================================================================================
66

@@ -560,7 +560,7 @@ Creative Commons may be contacted at creativecommons.org.
560560
The Mozilla Public License Version 2.0 applies to:
561561

562562
* The `image_rect`, `fit_view_box` and `calc_node_bbox` functions in `src/util/helper.rs`
563-
and parts of the 'draw_path' method in 'src/render/path.rs'
563+
and parts of the 'draw_path' method in 'src/render/path.rs'
564564
in the resvg repository (https://github.com/RazrFalcon/resvg)
565565

566566
Mozilla Public License Version 2.0
@@ -1059,4 +1059,4 @@ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
10591059
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
10601060
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
10611061
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
1062-
OTHER DEALINGS IN THE FONT SOFTWARE.
1062+
OTHER DEALINGS IN THE FONT SOFTWARE.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ std::fs::write("target/time_series.pdf", pdf)?;
3131

3232
## CLI
3333

34-
This crate also contains a command line interface. Install it by running the command below:
34+
This crate also contains a command line interface. Install it by running the
35+
command below:
3536

3637
```bash
3738
cargo install svg2pdf-cli

cli/Cargo.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[package]
2+
name = "svg2pdf-cli"
3+
description = "The command line interface for svg2pdf."
4+
categories = ["encoding", "graphics", "multimedia", "command-line-utilities"]
5+
keywords = ["svg2pdf", "cli"]
6+
build = "build.rs"
7+
version = { workspace = true }
8+
authors = { workspace = true }
9+
edition = { workspace = true }
10+
repository = { workspace = true }
11+
license = { workspace = true }
12+
13+
[[bin]]
14+
name = "svg2pdf"
15+
path = "src/main.rs"
16+
test = false
17+
doctest = false
18+
bench = false
19+
doc = false
20+
21+
[dependencies]
22+
clap = { workspace = true }
23+
fontdb = { workspace = true }
24+
image = { workspace = true }
25+
miniz_oxide = { workspace = true }
26+
pdf-writer = { workspace = true }
27+
svg2pdf = { workspace = true }
28+
termcolor = { workspace = true }
29+
usvg = { workspace = true, features = ["text"] }
30+
31+
[build-dependencies]
32+
clap = { workspace = true, features = ["string"] }
33+
clap_complete = { workspace = true }
34+
clap_mangen = { workspace = true }
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ use std::path::Path;
33
use std::process;
44

55
use clap::Parser;
6+
use svg2pdf::Options;
67
use termcolor::{ColorChoice, ColorSpec, StandardStream, WriteColor};
78
use usvg::{TreeParsing, TreeTextToPath};
89

9-
use svg2pdf::Options;
10-
1110
mod args;
1211

1312
fn main() {

crates/svg2pdf-cli/Cargo.toml

Lines changed: 0 additions & 35 deletions
This file was deleted.

crates/svg2pdf/Cargo.toml

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)