Skip to content

Commit

Permalink
[Passed] Auto update packages list (#795)
Browse files Browse the repository at this point in the history
* fix update packages list action

* update packages list

* auto update packages list in readme

---------

Co-authored-by: Mateusz Front <mateusz.front@swmansion.com>
Co-authored-by: Membrane Bot <bot@membrane.stream>
  • Loading branch information
3 people authored Apr 24, 2024
1 parent fb10564 commit eae44ae
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/update-packages-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@ jobs:
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
elixir scripts/elixir/update_packages_list.exs
echo "Run script"
elixir scripts/elixir/update_packages_list.exs > output.txt 2> output.txt || ERROR=$? || true
cat output.txt
echo "Set status"
STATUS=$(if [ -n "$ERROR" ]; then echo "[Failed]"; else echo "[Passed]"; fi)
echo "Status: ${STATUS}"
echo "Configure git"
git config user.name 'Membrane Bot'
git config user.email 'bot@membrane.stream'
echo "Checkout"
git checkout -B auto-update-packages-list
echo "Commit"
git add README.md
git commit -m "auto update packages list in readme" --allow-empty
echo "Push"
git push -f -u origin auto-update-packages-list
gh pr create -B master -H auto-update-packages-list --title 'Auto update packages list' --body ''
echo "Create PR"
gh pr create -B master -H auto-update-packages-list --label no-changelog --title "${STATUS} Auto update packages list" --body-file output.txt \
|| gh pr edit auto-update-packages-list --title "${STATUS} Auto update packages list" --body-file output.txt
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ If you have any questions regarding Membrane Framework or need consulting, feel
#### Video codecs
| Package | Description | Links |
| --- | --- | --- |
| [membrane_h264_plugin](https://github.com/membraneframework/membrane_h264_plugin) | Membrane h264 parser | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_h264_plugin.svg)](https://hex.pm/api/packages/membrane_h264_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_h264_plugin/) |
| [membrane_h26x_plugin](https://github.com/membraneframework/membrane_h26x_plugin) | Membrane h264 and h265 parsers | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_h26x_plugin.svg)](https://hex.pm/api/packages/membrane_h26x_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_h26x_plugin/) |
| [membrane_h264_ffmpeg_plugin](https://github.com/membraneframework/membrane_h264_ffmpeg_plugin) | Membrane H264 decoder and encoder based on FFmpeg and x264 | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_h264_ffmpeg_plugin.svg)](https://hex.pm/api/packages/membrane_h264_ffmpeg_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_h264_ffmpeg_plugin/) |
| [membrane_abr_transcoder_plugin](https://github.com/membraneframework/membrane_abr_transcoder_plugin) | | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_abr_transcoder_plugin.svg)](https://hex.pm/api/packages/membrane_abr_transcoder_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_abr_transcoder_plugin/) |
| [membrane_h265_ffmpeg_plugin](https://github.com/gBillal/membrane_h265_ffmpeg_plugin) | [Maintainer: [gBillal](https://github.com/gBillal)] Membrane H265 decoder and encoder based on FFmpeg and x265 | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_h265_ffmpeg_plugin.svg)](https://hex.pm/api/packages/membrane_h265_ffmpeg_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_h265_ffmpeg_plugin/) |
| [elixir-turbojpeg](https://github.com/BinaryNoggin/elixir-turbojpeg) | [Maintainer: [BinaryNoggin](https://github.com/BinaryNoggin)] libjpeg-turbo bindings for Elixir | |
| [membrane_subtitle_mixer_plugin](https://github.com/kim-company/membrane_subtitle_mixer_plugin) | [Maintainer: [kim-company](https://github.com/kim-company)] Membrane.Filter that uses CEA708 to merge subtitles directly in H264 packets. | |

Expand All @@ -226,18 +228,20 @@ If you have any questions regarding Membrane Framework or need consulting, feel
| --- | --- | --- |
| [membrane_raw_video_parser_plugin](https://github.com/membraneframework/membrane_raw_video_parser_plugin) | Membrane plugin for parsing raw video streams | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_raw_video_parser_plugin.svg)](https://hex.pm/api/packages/membrane_raw_video_parser_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_raw_video_parser_plugin/) |
| [membrane_video_merger_plugin](https://github.com/membraneframework/membrane_video_merger_plugin) | Membrane raw video cutter, merger and cut & merge bin | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_video_merger_plugin.svg)](https://hex.pm/api/packages/membrane_video_merger_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_video_merger_plugin/) |
| [membrane_video_compositor_plugin](https://github.com/membraneframework/membrane_video_compositor_plugin) | Membrane plugin that accepts multiple video inputs, transforms them according to provided transformations and composes them into a single output video. | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_video_compositor_plugin.svg)](https://hex.pm/api/packages/membrane_video_compositor_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_video_compositor_plugin/) |
| [membrane_video_compositor_plugin](https://github.com/membraneframework/membrane_video_compositor_plugin) | Membrane plugin for video and audio mixing/composing | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_video_compositor_plugin.svg)](https://hex.pm/api/packages/membrane_video_compositor_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_video_compositor_plugin/) |
| [membrane_camera_capture_plugin](https://github.com/membraneframework/membrane_camera_capture_plugin) | A set of elements allowing for capturing local media such as camera or microphone | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_camera_capture_plugin.svg)](https://hex.pm/api/packages/membrane_camera_capture_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_camera_capture_plugin/) |
| [membrane_rpicam_plugin](https://github.com/membraneframework/membrane_rpicam_plugin) | Membrane rpicam plugin | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_rpicam_plugin.svg)](https://hex.pm/api/packages/membrane_rpicam_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_rpicam_plugin/) |
| [membrane_framerate_converter_plugin](https://github.com/membraneframework/membrane_framerate_converter_plugin) | Element for converting frame rate of raw video stream | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_framerate_converter_plugin.svg)](https://hex.pm/api/packages/membrane_framerate_converter_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_framerate_converter_plugin/) |
| [membrane_sdl_plugin](https://github.com/membraneframework/membrane_sdl_plugin) | Membrane video player based on SDL | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_sdl_plugin.svg)](https://hex.pm/api/packages/membrane_sdl_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_sdl_plugin/) |
| [membrane_overlay_plugin](https://github.com/membraneframework/membrane_overlay_plugin) | Filter for applying overlay image or text on top of video | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_overlay_plugin.svg)](https://hex.pm/api/packages/membrane_overlay_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_overlay_plugin/) |
| [membrane_ffmpeg_swscale_plugin](https://github.com/membraneframework/membrane_ffmpeg_swscale_plugin) | Plugin providing an element scaling raw video frames, using SWScale module of FFmpeg library. | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_ffmpeg_swscale_plugin.svg)](https://hex.pm/api/packages/membrane_ffmpeg_swscale_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_ffmpeg_swscale_plugin/) |
| [membrane_ffmpeg_video_filter_plugin](https://github.com/membraneframework/membrane_ffmpeg_video_filter_plugin) | FFmpeg-based video filters | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_ffmpeg_video_filter_plugin.svg)](https://hex.pm/api/packages/membrane_ffmpeg_video_filter_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_ffmpeg_video_filter_plugin/) |
| [membrane_video_mixer_plugin](https://github.com/kim-company/membrane_video_mixer_plugin) | [Maintainer: [kim-company](https://github.com/kim-company)] Membrane.Filter that mixes a variable number of input videos into one output using ffmpeg filters | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_video_mixer_plugin.svg)](https://hex.pm/api/packages/membrane_video_mixer_plugin) |

#### External APIs
| Package | Description | Links |
| --- | --- | --- |
| [membrane_aws_plugin](https://github.com/jellyfish-dev/membrane_aws_plugin) | [Maintainer: [jellyfish-dev](https://github.com/jellyfish-dev)] | |
| [membrane_agora_plugin](https://github.com/membraneframework/membrane_agora_plugin) | Membrane Sink for Agora Server Gateway | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_agora_plugin.svg)](https://hex.pm/api/packages/membrane_agora_plugin) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_agora_plugin/) |
| [membrane_element_gcloud_speech_to_text](https://github.com/membraneframework/membrane_element_gcloud_speech_to_text) | Membrane plugin providing speech recognition via Google Cloud Speech-to-Text API | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_element_gcloud_speech_to_text.svg)](https://hex.pm/api/packages/membrane_element_gcloud_speech_to_text) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_element_gcloud_speech_to_text/) |
| [membrane_element_ibm_speech_to_text](https://github.com/membraneframework/membrane_element_ibm_speech_to_text) | Membrane plugin providing speech recognition via IBM Cloud Speech-to-Text service | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_element_ibm_speech_to_text.svg)](https://hex.pm/api/packages/membrane_element_ibm_speech_to_text) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_element_ibm_speech_to_text/) |
Expand Down Expand Up @@ -265,7 +269,7 @@ If you have any questions regarding Membrane Framework or need consulting, feel
### Standalone media libs
| Package | Description | Links |
| --- | --- | --- |
| [video_compositor](https://github.com/membraneframework/video_compositor) | Tool for real-time video processing / transforming / composing | |
| [video_compositor](https://github.com/membraneframework/video_compositor) | Media server for low-latency live video and audio mixing/composing | |
| [ex_sdp](https://github.com/membraneframework/ex_sdp) | Parser and serializer for Session Description Protocol | [![Hex.pm](https://img.shields.io/hexpm/v/ex_sdp.svg)](https://hex.pm/api/packages/ex_sdp) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/ex_sdp/) |
| [ex_libnice](https://github.com/membraneframework/ex_libnice) | Libnice-based Interactive Connectivity Establishment (ICE) protocol support for Elixir | [![Hex.pm](https://img.shields.io/hexpm/v/ex_libnice.svg)](https://hex.pm/api/packages/ex_libnice) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/ex_libnice/) |
| [ex_libsrtp](https://github.com/membraneframework/ex_libsrtp) | Elixir bindings for libsrtp | [![Hex.pm](https://img.shields.io/hexpm/v/ex_libsrtp.svg)](https://hex.pm/api/packages/ex_libsrtp) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/ex_libsrtp/) |
Expand All @@ -282,6 +286,7 @@ If you have any questions regarding Membrane Framework or need consulting, feel
| [bunch](https://github.com/membraneframework/bunch) | A bunch of helper functions, intended to make life easier | [![Hex.pm](https://img.shields.io/hexpm/v/bunch.svg)](https://hex.pm/api/packages/bunch) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/bunch/) |
| [bunch_native](https://github.com/membraneframework/bunch_native) | Native part of the Bunch package | [![Hex.pm](https://img.shields.io/hexpm/v/bunch_native.svg)](https://hex.pm/api/packages/bunch_native) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/bunch_native/) |
| [shmex](https://github.com/membraneframework/shmex) | Elixir bindings for shared memory | [![Hex.pm](https://img.shields.io/hexpm/v/shmex.svg)](https://hex.pm/api/packages/shmex) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/shmex/) |
| [membrane_timestamp_queue](https://github.com/membraneframework/membrane_timestamp_queue) | | |
| [membrane_common_c](https://github.com/membraneframework/membrane_common_c) | Membrane Multimedia Framework: Common C Routines | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_common_c.svg)](https://hex.pm/api/packages/membrane_common_c) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_common_c/) |
| [membrane_telemetry_metrics](https://github.com/membraneframework/membrane_telemetry_metrics) | Membrane tool for generating metrics | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_telemetry_metrics.svg)](https://hex.pm/api/packages/membrane_telemetry_metrics) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_telemetry_metrics/) |
| [membrane_opentelemetry](https://github.com/membraneframework-labs/membrane_opentelemetry) | [Labs] Utilities for using OpenTelemetry with Membrane | [![Hex.pm](https://img.shields.io/hexpm/v/membrane_opentelemetry.svg)](https://hex.pm/api/packages/membrane_opentelemetry) [![Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/membrane_opentelemetry/) |
Expand Down
17 changes: 12 additions & 5 deletions scripts/elixir/update_packages_list.exs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ packages =
"membrane_wav_plugin",
"membrane_g711_plugin",
{:md, "#### Video codecs"},
"membrane_h264_plugin",
"membrane_h26x_plugin",
"membrane_h264_ffmpeg_plugin",
"membrane_abr_transcoder_plugin",
"gBillal/membrane_h265_ffmpeg_plugin",
"binarynoggin/elixir-turbojpeg",
"kim-company/membrane_subtitle_mixer_plugin",
{:md, "#### Raw audio & video"},
Expand All @@ -79,10 +81,12 @@ packages =
"membrane_rpicam_plugin",
"membrane_framerate_converter_plugin",
"membrane_sdl_plugin",
"membrane_overlay_plugin",
"membrane_ffmpeg_swscale_plugin",
"membrane_ffmpeg_video_filter_plugin",
"kim-company/membrane_video_mixer_plugin",
{:md, "#### External APIs"},
"membrane_aws_plugin",
"membrane_agora_plugin",
"membrane_element_gcloud_speech_to_text",
"membrane_element_ibm_speech_to_text",
Expand Down Expand Up @@ -118,6 +122,7 @@ packages =
"bunch",
"bunch_native",
"shmex",
"membrane_timestamp_queue",
"membrane_common_c",
"membrane_telemetry_metrics",
"membrane_opentelemetry",
Expand Down Expand Up @@ -148,7 +153,7 @@ repos =
|> Stream.map(fn page ->
Process.sleep(gh_req_timeout)
url = "https://api.github.com/orgs/#{org}/repos?per_page=100&page=#{page}"
IO.puts("Fetching #{url}")
Logger.debug("Fetching #{url}")
Req.get!(url, decode_json: [keys: :atoms]).body
end)
|> Enum.take_while(&(&1 != []))
Expand Down Expand Up @@ -185,10 +190,10 @@ lacking_repos =
end)

unless Enum.empty?(lacking_repos) do
Logger.warning("""
raise """
The following repositories aren't mentioned in the package list:
#{Enum.map_join(lacking_repos, ",\n", & &1.name)}
""")
"""
end

# equip packages with the data from GH and Hex
Expand All @@ -203,7 +208,7 @@ packages =
owner != nil ->
Process.sleep(gh_req_timeout)
url = "https://api.github.com/repos/#{owner}/#{name}"
IO.puts("Fetching #{url}")
Logger.debug("Fetching #{url}")
Req.get!(url, decode_json: [keys: :atoms]).body

Map.has_key?(repos, name) ->
Expand Down Expand Up @@ -291,3 +296,5 @@ File.read!(readme_path)
packages_md
)
|> then(&File.write!(readme_path, &1))

IO.puts("Packages updated successfully.")

0 comments on commit eae44ae

Please sign in to comment.