Skip to content

Commit

Permalink
Add mdbook-slide-evaluator (#2258)
Browse files Browse the repository at this point in the history
I created a first implementation for the mdbook-slide-evaluator I
described in #2234.

One has to run a WebDriver compatible browser (e.g. selenium-chromium)
so the slides can be rendered. The browser can access the file either
via a file:// or http:// uri.

The tool grabs the configurable element from that page and evaluates the
size of this element. Output can be stored in a csv file or at stdout
and looks like this at the moment:
```
$ mdbook-slide-evaluator book/html/android/aidl
book/html/android/aidl/birthday-service.html: 750x134
book/html/android/aidl/example-service/changing-definition.html: 750x555
book/html/android/aidl/example-service/changing-implementation.html: 750x786
book/html/android/aidl/example-service/client.html: 750x1096
book/html/android/aidl/example-service/deploy.html: 750x635
book/html/android/aidl/example-service/interface.html: 750x570
book/html/android/aidl/example-service/server.html: 750x837
book/html/android/aidl/example-service/service-bindings.html: 750x483
book/html/android/aidl/example-service/service.html: 750x711
book/html/android/aidl/types/arrays.html: 750x291
book/html/android/aidl/types/file-descriptor.html: 750x1114
book/html/android/aidl/types/objects.html: 750x1258
book/html/android/aidl/types/parcelables.html: 750x637
book/html/android/aidl/types/primitives.html: 750x366
book/html/android/aidl/types.html: 750x197
```

---------

Co-authored-by: Martin Geisler <[email protected]>
  • Loading branch information
michael-kerscher and mgeisler authored Aug 21, 2024
1 parent 958bfe5 commit 355d65b
Show file tree
Hide file tree
Showing 9 changed files with 824 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ crowdin.yml
# Google's Project IDX files and VSCode
.idx/
.vscode/

# Python virtualenv (for mdbook-slide-evaluator local installation)
.venv/
219 changes: 214 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
members = [
"mdbook-course",
"mdbook-exerciser",
"mdbook-slide-evaluator",
"src/android/testing",
"src/bare-metal/useful-crates/allocator-example",
"src/bare-metal/useful-crates/zerocopy-example",
Expand Down
22 changes: 22 additions & 0 deletions mdbook-slide-evaluator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "mdbook-slide-evaluator"
version = "0.1.0"
authors = ["Michael Kerscher <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/google/comprehensive-rust"
description = "A tool for evaluating mdbook slides by rendering the html pages and spot violations to the policies"

[dependencies]
anyhow = "1.0.86"
clap = { version = "4.5.9", features = ["derive"] }
csv = "1.3.0"
fantoccini = "0.21.0"
glob = "0.3.1"
log = "0.4.22"
pretty_env_logger = "0.5.0"
serde = { version = "1.0.204", features = ["derive"] }
strum = { version = "0.26.3", features = ["derive"] }
tokio = { version = "1.38.1", features = ["full"] }
tokio-util = "0.7.11"
url = "2.5.2"
Loading

0 comments on commit 355d65b

Please sign in to comment.