Convert emoji images to png format
This commit is contained in:
parent
666fd17e25
commit
304d6ad150
|
@ -443,6 +443,17 @@ function pleroma_add_emoji {
|
|||
return
|
||||
fi
|
||||
|
||||
if [[ "$image_url" == *'.jpg' || "$image_url" == *'.jpeg' || "$image_url" == *'.gif' ]]; then
|
||||
convert $image_filename $PLEROMA_DIR/custom_emoji/${shortcode}.png
|
||||
if [ ! -f $PLEROMA_DIR/custom_emoji/${shortcode}.png ]; then
|
||||
dialog --title $"Add Custom Emoji" \
|
||||
--msgbox $"Unable to convert empji image to png format" 6 60
|
||||
return
|
||||
fi
|
||||
image_extension='png'
|
||||
image_filename=$PLEROMA_DIR/custom_emoji/${shortcode}.${image_extension}
|
||||
fi
|
||||
|
||||
if ! grep -q "${shortcode}," $image_filename; then
|
||||
echo "${shortcode}, ${image_filename}" >> $PLEROMA_DIR/config/emoji.txt
|
||||
else
|
||||
|
@ -682,6 +693,8 @@ function install_pleroma {
|
|||
ONION_ONLY='no'
|
||||
fi
|
||||
|
||||
apt-get -yq install wget imagemagick
|
||||
|
||||
# We need elixir 1.4+ here, so the debian repo package won't do
|
||||
install_elixir
|
||||
|
||||
|
|
Loading…
Reference in New Issue