Generate documentation from the docs crate directly

This commit is contained in:
Sebastian Dröge 2020-06-19 13:04:23 +03:00
parent 70ee13db53
commit 801998c717
32 changed files with 145 additions and 418 deletions

View file

@ -27,7 +27,7 @@ gstreamer-base = { path = "../gstreamer-base" }
once_cell = "1.0" once_cell = "1.0"
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[dev-dependencies] [dev-dependencies]
futures-util = { version = "0.3", features = ["sink"] } futures-util = { version = "0.3", features = ["sink"] }
@ -40,8 +40,8 @@ v1_12 = ["gstreamer/v1_12", "gstreamer-base/v1_12", "gstreamer-app-sys/v1_12", "
v1_14 = ["gstreamer/v1_14", "gstreamer-base/v1_14", "gstreamer-app-sys/v1_14", "v1_12"] v1_14 = ["gstreamer/v1_14", "gstreamer-base/v1_14", "gstreamer-app-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-app-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-app-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-base/v1_18", "gstreamer-app-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-base/v1_18", "gstreamer-app-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-app-sys/dox", "glib/dox", "gstreamer/dox", "gstreamer-base/dox"] dox = ["v1_18", "gstreamer-app-sys/dox", "glib/dox", "gstreamer/dox", "gstreamer-base/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstApp, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-app/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -27,7 +27,7 @@ array-init = "0.1"
once_cell = "1.0" once_cell = "1.0"
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[dev-dependencies] [dev-dependencies]
itertools = "0.9" itertools = "0.9"
@ -39,8 +39,8 @@ v1_12 = ["gstreamer/v1_12", "gstreamer-base/v1_12", "gstreamer-audio-sys/v1_12",
v1_14 = ["gstreamer/v1_14", "gstreamer-base/v1_14", "gstreamer-audio-sys/v1_14", "v1_12"] v1_14 = ["gstreamer/v1_14", "gstreamer-base/v1_14", "gstreamer-audio-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-audio-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-audio-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-base/v1_18", "gstreamer-audio-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-base/v1_18", "gstreamer-audio-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-audio-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-audio-sys/dox", "glib/dox", "gstreamer/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstAudio, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-audio/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -23,7 +23,7 @@ glib = { git = "https://github.com/gtk-rs/glib" }
gstreamer = { path = "../gstreamer" } gstreamer = { path = "../gstreamer" }
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
default = [] default = []
@ -33,8 +33,8 @@ v1_14 = ["gstreamer/v1_14", "gstreamer-base-sys/v1_14", "v1_12"]
v1_14_1 = ["gstreamer/v1_14", "gstreamer-base-sys/v1_14_1", "v1_14"] v1_14_1 = ["gstreamer/v1_14", "gstreamer-base-sys/v1_14_1", "v1_14"]
v1_16 = ["gstreamer/v1_16", "gstreamer-base-sys/v1_16", "v1_14_1"] v1_16 = ["gstreamer/v1_16", "gstreamer-base-sys/v1_16", "v1_14_1"]
v1_18 = ["gstreamer/v1_18", "gstreamer-base-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-base-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-base-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-base-sys/dox", "glib/dox", "gstreamer/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstBase, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-base/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -22,7 +22,7 @@ glib = { git = "https://github.com/gtk-rs/glib" }
gstreamer = { path = "../gstreamer" } gstreamer = { path = "../gstreamer" }
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
default = [] default = []
@ -31,8 +31,8 @@ v1_12 = ["gstreamer/v1_12", "gstreamer-check-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer/v1_14", "gstreamer-check-sys/v1_14", "v1_12"] v1_14 = ["gstreamer/v1_14", "gstreamer-check-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer/v1_16", "gstreamer-check-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-check-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-check-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-check-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-check-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-check-sys/dox", "glib/dox", "gstreamer/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstCheck, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-check/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -27,7 +27,7 @@ gstreamer-base = { path = "../gstreamer-base" }
gstreamer-pbutils = { path = "../gstreamer-pbutils" } gstreamer-pbutils = { path = "../gstreamer-pbutils" }
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
v1_10 = ["gstreamer/v1_10", "gstreamer-base/v1_10", "gstreamer-pbutils/v1_10", "gstreamer-editing-services-sys/v1_10"] v1_10 = ["gstreamer/v1_10", "gstreamer-base/v1_10", "gstreamer-pbutils/v1_10", "gstreamer-editing-services-sys/v1_10"]
@ -35,8 +35,8 @@ v1_12 = ["gstreamer/v1_12", "gstreamer-base/v1_12", "gstreamer-pbutils/v1_12", "
v1_14 = ["gstreamer/v1_14", "gstreamer-base/v1_14", "gstreamer-pbutils/v1_14", "gstreamer-editing-services-sys/v1_14", "v1_12"] v1_14 = ["gstreamer/v1_14", "gstreamer-base/v1_14", "gstreamer-pbutils/v1_14", "gstreamer-editing-services-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-pbutils/v1_16", "gstreamer-editing-services-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-pbutils/v1_16", "gstreamer-editing-services-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-base/v1_18", "gstreamer-pbutils/v1_18", "gstreamer-editing-services-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-base/v1_18", "gstreamer-pbutils/v1_18", "gstreamer-editing-services-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-editing-services-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-editing-services-sys/dox", "glib/dox", "gstreamer/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GES, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-editing-services/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -29,7 +29,7 @@ gstreamer-base = { path = "../gstreamer-base", features = ["v1_14"] }
gstreamer-video = { path = "../gstreamer-video", features = ["v1_14"] } gstreamer-video = { path = "../gstreamer-video", features = ["v1_14"] }
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
default = [] default = []
@ -37,8 +37,8 @@ dox = ["v1_18", "gstreamer-gl-sys/dox", "glib/dox", "gstreamer/dox", "gstreamer-
egl = ["gstreamer-gl-sys/egl"] egl = ["gstreamer-gl-sys/egl"]
x11 = ["gstreamer-gl-sys/x11"] x11 = ["gstreamer-gl-sys/x11"]
wayland = ["gstreamer-gl-sys/wayland"] wayland = ["gstreamer-gl-sys/wayland"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-video/v1_16", "gstreamer-gl-sys/v1_16"] v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-video/v1_16", "gstreamer-gl-sys/v1_16"]
v1_18 = ["gstreamer/v1_18", "gstreamer-base/v1_18", "gstreamer-video/v1_18", "gstreamer-gl-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-base/v1_18", "gstreamer-video/v1_18", "gstreamer-gl-sys/v1_18", "v1_16"]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstGL, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-gl/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -22,7 +22,7 @@ gstreamer = { path = "../gstreamer" }
gio = { git = "https://github.com/gtk-rs/gio" } gio = { git = "https://github.com/gtk-rs/gio" }
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
default = [] default = []
@ -31,8 +31,8 @@ v1_12 = ["gstreamer/v1_12", "gstreamer-net-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer/v1_14", "gstreamer-net-sys/v1_14", "v1_12"] v1_14 = ["gstreamer/v1_14", "gstreamer-net-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer/v1_16", "gstreamer-net-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-net-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-net-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-net-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-net-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-net-sys/dox", "glib/dox", "gstreamer/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstNet, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-net/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -24,7 +24,7 @@ gstreamer = { path = "../gstreamer" }
thiserror = "1.0" thiserror = "1.0"
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
default = [] default = []
@ -33,8 +33,8 @@ v1_12 = ["gstreamer/v1_12", "gstreamer-pbutils-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer/v1_14", "gstreamer-pbutils-sys/v1_14", "v1_12"] v1_14 = ["gstreamer/v1_14", "gstreamer-pbutils-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer/v1_16", "gstreamer-pbutils-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-pbutils-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-pbutils-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-pbutils-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-pbutils-sys/dox"] dox = ["v1_18", "gstreamer-pbutils-sys/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstPbutils, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-pbutils/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -24,15 +24,15 @@ gstreamer = { path = "../gstreamer", features = ["v1_12"] }
gstreamer-video = { path = "../gstreamer-video", features = ["v1_12"] } gstreamer-video = { path = "../gstreamer-video", features = ["v1_12"] }
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
default = [] default = []
v1_14 = ["gstreamer/v1_14", "gstreamer-video/v1_14", "gstreamer-player-sys/v1_14"] v1_14 = ["gstreamer/v1_14", "gstreamer-video/v1_14", "gstreamer-player-sys/v1_14"]
v1_16 = ["gstreamer/v1_16", "gstreamer-video/v1_16", "gstreamer-player-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-video/v1_16", "gstreamer-player-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-video/v1_18", "gstreamer-player-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-video/v1_18", "gstreamer-player-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-player-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-player-sys/dox", "glib/dox", "gstreamer/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstPlayer, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-player/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -22,9 +22,8 @@ gstreamer-rtp-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-
glib = { git = "https://github.com/gtk-rs/glib" } glib = { git = "https://github.com/gtk-rs/glib" }
gstreamer = { path = "../gstreamer" } gstreamer = { path = "../gstreamer" }
[build-dependencies.rustdoc-stripper] [build-dependencies]
version = "0.1" gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
optional = true
[features] [features]
default = [] default = []
@ -33,8 +32,8 @@ v1_12 = ["gstreamer/v1_12", "gstreamer-rtp-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer/v1_14", "gstreamer-rtp-sys/v1_14", "v1_12"] v1_14 = ["gstreamer/v1_14", "gstreamer-rtp-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer/v1_16", "gstreamer-rtp-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-rtp-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-rtp-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-rtp-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-rtp-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-rtp-sys/dox", "glib/dox", "gstreamer/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstRtp, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-rtp/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -32,7 +32,7 @@ gstreamer-rtsp = { path = "../gstreamer-rtsp" }
gstreamer-net = { path = "../gstreamer-net" } gstreamer-net = { path = "../gstreamer-net" }
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
default = [] default = []
@ -41,8 +41,8 @@ v1_12 = ["gstreamer/v1_12", "gstreamer-sdp/v1_12", "gstreamer-rtsp/v1_12", "gstr
v1_14 = ["gstreamer/v1_14", "gstreamer-sdp/v1_14", "gstreamer-rtsp/v1_14", "gstreamer-net/v1_14", "gstreamer-rtsp-server-sys/v1_14", "v1_12"] v1_14 = ["gstreamer/v1_14", "gstreamer-sdp/v1_14", "gstreamer-rtsp/v1_14", "gstreamer-net/v1_14", "gstreamer-rtsp-server-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer/v1_16", "gstreamer-sdp/v1_16", "gstreamer-rtsp/v1_16", "gstreamer-net/v1_16", "gstreamer-rtsp-server-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-sdp/v1_16", "gstreamer-rtsp/v1_16", "gstreamer-net/v1_16", "gstreamer-rtsp-server-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-sdp/v1_18", "gstreamer-rtsp/v1_18", "gstreamer-net/v1_18", "gstreamer-rtsp-server-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-sdp/v1_18", "gstreamer-rtsp/v1_18", "gstreamer-net/v1_18", "gstreamer-rtsp-server-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-rtsp-server-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-rtsp-server-sys/dox", "glib/dox", "gstreamer/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstRtspServer, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-rtsp-server/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -27,7 +27,7 @@ gstreamer = { path = "../gstreamer" }
gstreamer-sdp = { path = "../gstreamer-sdp" } gstreamer-sdp = { path = "../gstreamer-sdp" }
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
default = [] default = []
@ -36,8 +36,8 @@ v1_12 = ["gstreamer/v1_12", "gstreamer-sdp/v1_12", "gstreamer-rtsp-sys/v1_12", "
v1_14 = ["gstreamer/v1_14", "gstreamer-sdp/v1_14", "gstreamer-rtsp-sys/v1_14", "v1_12"] v1_14 = ["gstreamer/v1_14", "gstreamer-sdp/v1_14", "gstreamer-rtsp-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer/v1_16", "gstreamer-sdp/v1_16", "gstreamer-rtsp-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-sdp/v1_16", "gstreamer-rtsp-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-sdp/v1_18", "gstreamer-rtsp-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-sdp/v1_18", "gstreamer-rtsp-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-rtsp-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-rtsp-sys/dox", "glib/dox", "gstreamer/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstRtsp, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-rtsp/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -21,7 +21,7 @@ glib = { git = "https://github.com/gtk-rs/glib" }
gstreamer = { path = "../gstreamer" } gstreamer = { path = "../gstreamer" }
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
default = [] default = []
@ -31,8 +31,8 @@ v1_12 = ["gstreamer/v1_12", "gstreamer-sdp-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer/v1_14", "gstreamer-sdp-sys/v1_14", "v1_12"] v1_14 = ["gstreamer/v1_14", "gstreamer-sdp-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer/v1_16", "gstreamer-sdp-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-sdp-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-sdp-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-sdp-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-sdp-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-sdp-sys/dox", "glib/dox", "gstreamer/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstSdp, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-sdp/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -28,7 +28,7 @@ futures-channel = "0.3"
futures-util = "0.3" futures-util = "0.3"
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[dev-dependencies] [dev-dependencies]
itertools = "0.9" itertools = "0.9"
@ -40,8 +40,8 @@ v1_12 = ["gstreamer/v1_12", "gstreamer-base/v1_12", "gstreamer-video-sys/v1_12",
v1_14 = ["gstreamer/v1_14", "gstreamer-base/v1_14", "gstreamer-video-sys/v1_14", "v1_12"] v1_14 = ["gstreamer/v1_14", "gstreamer-base/v1_14", "gstreamer-video-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-video-sys/v1_16", "v1_14"] v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-video-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer/v1_18", "gstreamer-base/v1_18", "gstreamer-video-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-base/v1_18", "gstreamer-video-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-video-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-video-sys/dox", "glib/dox", "gstreamer/dox"]
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstVideo, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-video/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -23,12 +23,12 @@ gstreamer = { path = "../gstreamer", features = ["v1_14"] }
gstreamer-sdp = { path = "../gstreamer-sdp", features = ["v1_14"] } gstreamer-sdp = { path = "../gstreamer-sdp", features = ["v1_14"] }
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
default = [] default = []
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-webrtc-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["v1_18", "gstreamer-webrtc-sys/dox", "glib/dox", "gstreamer/dox"]
v1_16 = ["gstreamer/v1_16", "gstreamer-sdp/v1_16", "gstreamer-webrtc-sys/v1_16"] v1_16 = ["gstreamer/v1_16", "gstreamer-sdp/v1_16", "gstreamer-webrtc-sys/v1_16"]
v1_18 = ["gstreamer/v1_18", "gstreamer-sdp/v1_18", "gstreamer-webrtc-sys/v1_18", "v1_16"] v1_18 = ["gstreamer/v1_18", "gstreamer-sdp/v1_18", "gstreamer-webrtc-sys/v1_18", "v1_16"]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::GstWebRTC, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer-webrtc/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }

View file

@ -34,7 +34,7 @@ pretty-hex = "0.1"
thiserror = "1" thiserror = "1"
[build-dependencies] [build-dependencies]
rustdoc-stripper = { version = "0.1", optional = true } gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[dev-dependencies] [dev-dependencies]
ron = "0.6" ron = "0.6"
@ -48,8 +48,8 @@ v1_12 = ["gstreamer-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer-sys/v1_16", "v1_14"] v1_16 = ["gstreamer-sys/v1_16", "v1_14"]
v1_18 = ["gstreamer-sys/v1_18", "v1_16"] v1_18 = ["gstreamer-sys/v1_18", "v1_16"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
dox = ["v1_18", "gstreamer-sys/dox", "glib/dox", "ser_de"] dox = ["v1_18", "gstreamer-sys/dox", "glib/dox", "ser_de"]
ser_de = ["num-rational/serde", "serde", "serde_bytes", "serde_derive"] ser_de = ["num-rational/serde", "serde", "serde_bytes", "serde_derive"]

View file

@ -7,29 +7,12 @@ fn main() {
not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")) not(all(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))
))] ))]
fn manage_docs() { fn manage_docs() {
extern crate stripper_lib; extern crate lgpl_docs;
use std::io; const PATH: &str = "src";
const IGNORES: &[&str] = &[];
let path = "src"; lgpl_docs::purge(PATH, IGNORES);
let ignores: &[&str] = &[]; if cfg!(feature = "embed-lgpl-docs") {
lgpl_docs::embed(lgpl_docs::Library::Gst, PATH, IGNORES);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
&ignores,
false,
);
#[cfg(feature = "embed-lgpl-docs")]
{
let docs = include_str!("../docs/gstreamer/docs.md");
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
stripper_lib::loop_over_files(
path.as_ref(),
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
&ignores,
false,
);
} }
} }