Commit fd6d05dc authored by rinpatch's avatar rinpatch

Merge branch 'mix-emoji-task-pack-json' into 'develop'

For pleroma.emoji downloaded packs, generate pack.json instead

See merge request pleroma/pleroma!1748
parents 5c6c3026 fbe5a004
Pipeline #18847 failed with stages
in 5 minutes and 39 seconds
......@@ -111,19 +111,21 @@ def run(["get-packs" | args]) do
file_list: files_to_unzip
IO.puts(IO.ANSI.format(["Writing emoji.txt for ", :bright, pack_name]))
emoji_txt_str =
fn {shortcode, path} ->
emojo_path = Path.join("/emoji/#{pack_name}", path)
"#{shortcode}, #{emojo_path}"
|> Enum.join("\n")
File.write!(Path.join(pack_path, "emoji.txt"), emoji_txt_str)
IO.puts(IO.ANSI.format(["Writing pack.json for ", :bright, pack_name]))
pack_json = %{
pack: %{
"license" => pack["license"],
"homepage" => pack["homepage"],
"description" => pack["description"],
"fallback-src" => pack["src"],
"fallback-src-sha256" => pack["src_sha256"],
"share-files" => true
files: files
File.write!(Path.join(pack_path, "pack.json"), Jason.encode!(pack_json, pretty: true))
IO.puts(IO.ANSI.format([:bright, :red, "No pack named \"#{pack_name}\" found"]))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment