Skip to content

Commit 22ae559

Browse files
committed
Include demos in docs
1 parent 60dee34 commit 22ae559

File tree

5 files changed

+63
-10
lines changed

5 files changed

+63
-10
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "guides/membrane_tutorials"]
22
path = guides/membrane_tutorials
33
url = https://github.com/membraneframework/membrane_tutorials.git
4+
[submodule "guides/membrane_demo"]
5+
path = guides/membrane_demo
6+
url = https://github.com/membraneframework/membrane_demo.git

assets/logo.svg

Lines changed: 19 additions & 0 deletions
Loading

guides/membrane_demo

Submodule membrane_demo added at 0d42cb9

mix.exs

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ defmodule Membrane.Mixfile do
6161
main: "readme",
6262
extras: extras(),
6363
formatters: ["html"],
64+
logo: "assets/logo.svg",
6465
source_ref: @source_ref,
6566
assets: %{
6667
"guides/membrane_tutorials/get_started_with_membrane/assets" => "assets",
@@ -97,14 +98,42 @@ defmodule Membrane.Mixfile do
9798
"README.md",
9899
"CHANGELOG.md",
99100
"CONTRIBUTING.md",
100-
Path.wildcard("guides/**/*.md")
101+
Path.wildcard("guides/upgrading/*.md"),
102+
Path.wildcard("guides/useful_concepts/*.md"),
103+
Path.wildcard("guides/membrane_demo/*")
104+
|> Enum.filter(&File.dir?/1)
105+
|> Enum.reject(&(Path.basename(&1) == "livebooks"))
106+
|> Enum.map(&get_demo_external_extra/1),
107+
Path.wildcard("guides/membrane_demo/livebooks/*/*.livemd"),
108+
Path.wildcard("guides/membrane_tutorials/**/*.md")
101109
|> Enum.reject(&(Path.basename(&1) in ["README.md", "index.md", "1_preface.md"]))
102110
|> Enum.map(&{String.to_atom(&1), [title: reformat_tutorial_title(&1)]}),
111+
Path.wildcard("guides/packages/*.md")
112+
|> Enum.map(&{String.to_atom(&1), [title: reformat_tutorial_title(&1)]}),
103113
LICENSE: [title: "License"]
104114
]
105115
|> List.flatten()
106116
end
107117

118+
defp get_demo_external_extra(demo_path) do
119+
demos_url = "https://github.com/membraneframework/membrane_demo/tree/master"
120+
121+
demo_title =
122+
demo_path
123+
|> Path.join("README.md")
124+
|> File.read!()
125+
|> String.split("\n")
126+
|> List.first()
127+
|> String.trim_leading("#")
128+
|> String.trim_leading()
129+
|> String.to_atom()
130+
131+
demo_url =
132+
Path.join(demos_url, Path.basename(demo_path))
133+
134+
{demo_title, [url: demo_url]}
135+
end
136+
108137
defp reformat_tutorial_title(filename) do
109138
{first_letter, rest} =
110139
filename
@@ -163,15 +192,16 @@ defmodule Membrane.Mixfile do
163192

164193
defp groups_for_extras do
165194
[
166-
"Packages in our ecosystem": Path.wildcard("guides/packages/*.md"),
167195
"Get started with Membrane":
168196
Path.wildcard("guides/membrane_tutorials/get_started_with_membrane/*.md"),
169-
"Intro to pipelines": Path.wildcard("guides/membrane_tutorials/basic_pipeline/*.md"),
170-
"Creating plugins": Path.wildcard("guides/membrane_tutorials/create_new_plugin/*.md"),
171197
"Useful concepts": Path.wildcard("guides/useful_concepts/*.md"),
172-
H264: Path.wildcard("guides/membrane_tutorials/h264/*.md"),
198+
"Pipelines 101": Path.wildcard("guides/membrane_tutorials/basic_pipeline/*.md"),
199+
"Our demos": ~r"(https://github.com/membraneframework/membrane_demo|.*\.livemd)",
200+
"Packages in our ecosystem": Path.wildcard("guides/packages/*.md"),
201+
"Creating plugins": Path.wildcard("guides/membrane_tutorials/create_new_plugin/*.md"),
173202
Broadcasting: Path.wildcard("guides/membrane_tutorials/broadcasting/*.md"),
174203
Glossary: Path.wildcard("guides/membrane_tutorials/glossary/*.md"),
204+
H264: Path.wildcard("guides/membrane_tutorials/h264/*.md"),
175205
Upgrading: Path.wildcard("guides/upgrading/*.md")
176206
]
177207
end
@@ -198,7 +228,7 @@ defmodule Membrane.Mixfile do
198228
{:bunch, "~> 1.6"},
199229
{:ratio, "~> 3.0 or ~> 4.0"},
200230
# Development
201-
{:ex_doc, "~> 0.28", only: :dev, runtime: false},
231+
{:ex_doc, "~> 0.39", only: :dev, runtime: false},
202232
{:makeup_diff, "~> 0.1", only: :dev, runtime: false},
203233
{:dialyxir, "~> 1.1", only: :dev, runtime: false},
204234
{:credo, "~> 1.7", only: :dev, runtime: false},

mix.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"coerce": {:hex, :coerce, "1.0.1", "211c27386315dc2894ac11bc1f413a0e38505d808153367bd5c6e75a4003d096", [:mix], [], "hexpm", "b44a691700f7a1a15b4b7e2ff1fa30bebd669929ac8aa43cffe9e2f8bf051cf1"},
55
"credo": {:hex, :credo, "1.7.10", "6e64fe59be8da5e30a1b96273b247b5cf1cc9e336b5fd66302a64b25749ad44d", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "71fbc9a6b8be21d993deca85bf151df023a3097b01e09a2809d460348561d8cd"},
66
"dialyxir": {:hex, :dialyxir, "1.4.5", "ca1571ac18e0f88d4ab245f0b60fa31ff1b12cbae2b11bd25d207f865e8ae78a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b0fb08bb8107c750db5c0b324fa2df5ceaa0f9307690ee3c1f6ba5b9eb5d35c3"},
7-
"earmark_parser": {:hex, :earmark_parser, "1.4.42", "f23d856f41919f17cd06a493923a722d87a2d684f143a1e663c04a2b93100682", [:mix], [], "hexpm", "6915b6ca369b5f7346636a2f41c6a6d78b5af419d61a611079189233358b8b8b"},
7+
"earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"},
88
"erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"},
9-
"ex_doc": {:hex, :ex_doc, "0.36.1", "4197d034f93e0b89ec79fac56e226107824adcce8d2dd0a26f5ed3a95efc36b1", [:mix], [{:earmark_parser, "~> 1.4.42", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d7d26a7cf965dacadcd48f9fa7b5953d7d0cfa3b44fa7a65514427da44eafd89"},
9+
"ex_doc": {:hex, :ex_doc, "0.39.1", "e19d356a1ba1e8f8cfc79ce1c3f83884b6abfcb79329d435d4bbb3e97ccc286e", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "8abf0ed3e3ca87c0847dfc4168ceab5bedfe881692f1b7c45f4a11b232806865"},
1010
"excoveralls": {:hex, :excoveralls, "0.18.3", "bca47a24d69a3179951f51f1db6d3ed63bca9017f476fe520eb78602d45f7756", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "746f404fcd09d5029f1b211739afb8fb8575d775b21f6a3908e7ce3e640724c6"},
1111
"file_system": {:hex, :file_system, "1.0.1", "79e8ceaddb0416f8b8cd02a0127bdbababe7bf4a23d2a395b983c1f8b3f73edd", [:mix], [], "hexpm", "4414d1f38863ddf9120720cd976fce5bdde8e91d8283353f0e31850fa89feb9e"},
1212
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
1313
"junit_formatter": {:hex, :junit_formatter, "3.4.0", "d0e8db6c34dab6d3c4154c3b46b21540db1109ae709d6cf99ba7e7a2ce4b1ac2", [:mix], [], "hexpm", "bb36e2ae83f1ced6ab931c4ce51dd3dbef1ef61bb4932412e173b0cfa259dacd"},
1414
"makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"},
1515
"makeup_diff": {:hex, :makeup_diff, "0.1.1", "01498f8c95970081297837eaf4686b6f3813e535795b8421f15ace17a59aea37", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "fadb0bf014bd328badb7be986eadbce1a29955dd51c27a9e401c3045cf24184e"},
1616
"makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"},
17-
"makeup_erlang": {:hex, :makeup_erlang, "1.0.1", "c7f58c120b2b5aa5fd80d540a89fdf866ed42f1f3994e4fe189abebeab610839", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "8a89a1eeccc2d798d6ea15496a6e4870b75e014d1af514b1b71fa33134f57814"},
17+
"makeup_erlang": {:hex, :makeup_erlang, "1.0.2", "03e1804074b3aa64d5fad7aa64601ed0fb395337b982d9bcf04029d68d51b6a7", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "af33ff7ef368d5893e4a267933e7744e46ce3cf1f61e2dccf53a111ed3aa3727"},
1818
"meck": {:hex, :meck, "0.9.2", "85ccbab053f1db86c7ca240e9fc718170ee5bda03810a6292b5306bf31bae5f5", [:rebar3], [], "hexpm", "81344f561357dc40a8344afa53767c32669153355b626ea9fcbc8da6b3045826"},
1919
"mock": {:hex, :mock, "0.3.8", "7046a306b71db2488ef54395eeb74df0a7f335a7caca4a3d3875d1fc81c884dd", [:mix], [{:meck, "~> 0.9.2", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "7fa82364c97617d79bb7d15571193fc0c4fe5afd0c932cef09426b3ee6fe2022"},
2020
"mox": {:hex, :mox, "1.2.0", "a2cd96b4b80a3883e3100a221e8adc1b98e4c3a332a8fc434c39526babafd5b3", [:mix], [{:nimble_ownership, "~> 1.0", [hex: :nimble_ownership, repo: "hexpm", optional: false]}], "hexpm", "c7b92b3cc69ee24a7eeeaf944cd7be22013c52fcb580c1f33f50845ec821089a"},
2121
"nimble_ownership": {:hex, :nimble_ownership, "1.0.1", "f69fae0cdd451b1614364013544e66e4f5d25f36a2056a9698b793305c5aa3a6", [:mix], [], "hexpm", "3825e461025464f519f3f3e4a1f9b68c47dc151369611629ad08b636b73bb22d"},
22-
"nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"},
22+
"nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"},
2323
"numbers": {:hex, :numbers, "5.2.4", "f123d5bb7f6acc366f8f445e10a32bd403c8469bdbce8ce049e1f0972b607080", [:mix], [{:coerce, "~> 1.0", [hex: :coerce, repo: "hexpm", optional: false]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "eeccf5c61d5f4922198395bf87a465b6f980b8b862dd22d28198c5e6fab38582"},
2424
"qex": {:hex, :qex, "0.5.1", "0d82c0f008551d24fffb99d97f8299afcb8ea9cf99582b770bd004ed5af63fd6", [:mix], [], "hexpm", "935a39fdaf2445834b95951456559e9dc2063d0a055742c558a99987b38d6bab"},
2525
"ratio": {:hex, :ratio, "4.0.1", "3044166f2fc6890aa53d3aef0c336f84b2bebb889dc57d5f95cc540daa1912f8", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:numbers, "~> 5.2.0", [hex: :numbers, repo: "hexpm", optional: false]}], "hexpm", "c60cbb3ccdff9ffa56e7d6d1654b5c70d9f90f4d753ab3a43a6bf40855b881ce"},

0 commit comments

Comments
 (0)