/usr/share/eiskaltdcpp/examples/amr.en_US.sh is in eiskaltdcpp-scripts 2.2.9-4.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #!/bin/sh
# This script tells about song played in amarok2
## Author: WiseLord
## License: Public Domain
## Version: 0.2
## Depends: sh, amarok2
## Examples:
# output in console:
# /me is listening now: Therion - Midgård
# output in eiskaltdcpp chat:
# [17:45:03] * WiseLord is listening now: Therion - Midgård
message="/me is listening silence now"
nowPlaying="$(qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.GetMetadata 2>/dev/null)"
if [ -n "${nowPlaying}" ]
then
title="$(echo "${nowPlaying}" | sed -ne 's/^title: \(.*\)$/\1/p')"
artist="$(echo "${nowPlaying}" | sed -ne 's/^artist: \(.*\)$/\1/p')"
message="/me is listening now: ${artist} - ${title}"
## Also you can send song magnet to chat:
# [17:45:03] * WiseLord is listening now: Therion - Midgård (02. Midgård.mp3) (7.0 МиБ)
# You can use <magnet show=NAME_TO_SHOW>PATH_TO_FILE</magnet> or just <magnet>PATH_TO_FILE</magnet>
# If you want to do this, uncomment 2 lines below:
# location="$(echo "${nowPlaying}" | sed -ne 's/^location: file:\/\/\(.*\)$/\1/p' | sed -e s/\'/\\\\\'/g -e 's/%\([0-9A-Fa-f][0-9A-Fa-f]\)/\\\\\x\1/g' | xargs echo -e )"
# message="/me is listening now: ${artist} - ${title} ( <magnet>${location}</magnet> )"
fi
echo "${message}"
|