Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "guides/membrane_tutorials"]
path = guides/membrane_tutorials
url = https://github.com/membraneframework/membrane_tutorials.git
1 change: 1 addition & 0 deletions guides/membrane_tutorials
Submodule membrane_tutorials added at 1ecc2a
File renamed without changes.
152 changes: 98 additions & 54 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,19 @@ defmodule Membrane.Mixfile do
defp docs do
[
main: "readme",
extras: [
"README.md",
"CHANGELOG.md",
"CONTRIBUTING.md",
"guides/upgrading/v0.11.md",
"guides/upgrading/v0.12.md",
"guides/upgrading/v1.0.0-rc0.md",
"guides/upgrading/v1.0.0-rc1.md",
"guides/upgrading/v1.0.0.md",
"guides/components_lifecycle.md",
"guides/timer.md",
LICENSE: [title: "License"]
],
extras: extras(),
formatters: ["html"],
source_ref: @source_ref,
assets: %{
"guides/membrane_tutorials/get_started_with_membrane/assets" => "assets",
"guides/membrane_tutorials/basic_pipeline/assets" => "assets",
"guides/membrane_tutorials/basic_pipeline_extension/assets" => "assets",
"guides/membrane_tutorials/create_new_plugin/assets" => "assets",
"guides/membrane_tutorials/digital_video_introduction/assets" => "assets",
"guides/membrane_tutorials/h264/assets" => "assets",
"guides/membrane_tutorials/broadcasting/assets" => "assets",
"guides/membrane_tutorials/glossary/assets" => "assets"
},
nest_modules_by_prefix: [
Membrane.Bin,
Membrane.Element,
Expand All @@ -89,47 +87,93 @@ defmodule Membrane.Mixfile do
Membrane.RCPipeline,
Membrane.RCMessage
],
groups_for_modules: [
Pipeline: [~r/^Membrane\.Pipeline($|\.)/],
"RC Pipeline": [
~r/^Membrane\.(RCPipeline)($|\.)/,
~r/^Membrane\.(RCMessage)($|\.)/
],
Bin: [~r/^Membrane\.Bin($|\.)/],
Element: [
~r/^Membrane\.Filter($|\.)/,
~r/^Membrane\.Endpoint($|\.)/,
~r/^Membrane\.Sink($|\.)/,
~r/^Membrane\.Source($|\.)/,
~r/^Membrane\.Element($|\.)/
],
"Helper Elements": [
~r/^Membrane\.Connector($|\.)/,
~r/^Membrane\.Fake($|\.)/,
~r/^Membrane\.Debug($|\.)/,
~r/^Membrane\.Tee($|\.)/,
~r/^Membrane\.Funnel($|\.)/,
~r/^Membrane\.FilterAggregator($|\.)/
],
Parent: [~r/^Membrane\.(Parent|ChildrenSpec)($|\.)/],
Child: [~r/^Membrane\.(Child|ChildEntry)($|\.)/],
Communication: [
~r/^Membrane\.(Buffer|Payload|StreamFormat|Event|EventProtocol|ChildNotification|ParentNotification|Pad|KeyframeRequestEvent|RemoteStream)($|\.)/
],
Logging: [~r/^Membrane\.Logger($|\.)/],
Telemetry: [~r/^Membrane\.Telemetry($|\.)/],
Testing: [~r/^Membrane\.Testing($|\.)/],
Utils: [
~r/^Membrane\.Clock($|\.)/,
~r/^Membrane\.Sync($|\.)/,
~r/^Membrane\.Time($|\.)/,
~r/^Membrane\.Playback($|\.)/,
~r/^Membrane\.ComponentPath($|\.)/,
~r/^Membrane\.ResourceGuard($|\.)/,
~r/^Membrane\.UtilitySupervisor($|\.)/
],
Errors: [~r/Error$/]
]
groups_for_modules: groups_for_modules(),
groups_for_extras: groups_for_extras()
]
end

defp extras do
[
"README.md",
"CHANGELOG.md",
"CONTRIBUTING.md",
Path.wildcard("guides/**/*.md")
|> Enum.reject(&(Path.basename(&1) in ["README.md", "index.md", "1_preface.md"]))
|> Enum.map(&{String.to_atom(&1), [title: reformat_tutorial_title(&1)]}),
LICENSE: [title: "License"]
]
|> List.flatten()
end

defp reformat_tutorial_title(filename) do
{first_letter, rest} =
filename
|> Path.basename()
|> String.replace(~r/^\d+_/, "")
|> String.replace("_", " ")
|> String.trim_trailing(".md")
|> String.next_grapheme()

String.upcase(first_letter) <> rest
end

defp groups_for_modules do
[
Pipeline: [~r/^Membrane\.Pipeline($|\.)/],
"RC Pipeline": [
~r/^Membrane\.(RCPipeline)($|\.)/,
~r/^Membrane\.(RCMessage)($|\.)/
],
Bin: [~r/^Membrane\.Bin($|\.)/],
Element: [
~r/^Membrane\.Filter($|\.)/,
~r/^Membrane\.Endpoint($|\.)/,
~r/^Membrane\.Sink($|\.)/,
~r/^Membrane\.Source($|\.)/,
~r/^Membrane\.Element($|\.)/
],
"Helper Elements": [
~r/^Membrane\.Connector($|\.)/,
~r/^Membrane\.Fake($|\.)/,
~r/^Membrane\.Debug($|\.)/,
~r/^Membrane\.Tee($|\.)/,
~r/^Membrane\.Funnel($|\.)/,
~r/^Membrane\.FilterAggregator($|\.)/
],
Parent: [~r/^Membrane\.(Parent|ChildrenSpec)($|\.)/],
Child: [~r/^Membrane\.(Child|ChildEntry)($|\.)/],
Communication: [
~r/^Membrane\.(Buffer|Payload|StreamFormat|Event|EventProtocol|ChildNotification|ParentNotification|Pad|KeyframeRequestEvent|RemoteStream)($|\.)/
],
Logging: [~r/^Membrane\.Logger($|\.)/],
Telemetry: [~r/^Membrane\.Telemetry($|\.)/],
Testing: [~r/^Membrane\.Testing($|\.)/],
Utils: [
~r/^Membrane\.Clock($|\.)/,
~r/^Membrane\.Sync($|\.)/,
~r/^Membrane\.Time($|\.)/,
~r/^Membrane\.Playback($|\.)/,
~r/^Membrane\.ComponentPath($|\.)/,
~r/^Membrane\.ResourceGuard($|\.)/,
~r/^Membrane\.UtilitySupervisor($|\.)/
],
Errors: [~r/Error$/]
]
end

defp groups_for_extras do
[
"Get started with Membrane":
Path.wildcard("guides/membrane_tutorials/get_started_with_membrane/*.md"),
"Intro to pipelines": Path.wildcard("guides/membrane_tutorials/basic_pipeline/*.md"),
"Intro to pipelines - advanced concepts":
Path.wildcard("guides/membrane_tutorials/basic_pipeline_extension/*.md"),
"Creating plugins": Path.wildcard("guides/membrane_tutorials/create_new_plugin/*.md"),
"Useful concepts": Path.wildcard("guides/useful_concepts/*.md"),
H264: Path.wildcard("guides/membrane_tutorials/h264/*.md"),
Broadcasting: Path.wildcard("guides/membrane_tutorials/broadcasting/*.md"),
Glossary: Path.wildcard("guides/membrane_tutorials/glossary/*.md"),
Upgrading: Path.wildcard("guides/upgrading/*.md")
Comment on lines +166 to +176
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Can we generate this automatically?
  • I thought you merged the pipelines tutorials into one?

Copy link
Contributor Author

@Noarkhh Noarkhh Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • We can but I'm not sure if we should, this way it's easier to modify the titles and you have more fine grained control
  • I did, I removed this group in the next PR, but if a group has no contets it's not being displayed, so dont worry, it's not visible. About the warnings, they are thrown because membrane_tutorial fixing them isn't merged yet, and the submodule in guides points to the master branch.

]
end

Expand Down