irman2lirc

来自「很少见的linux下的红外口的工具」· 代码 · 共 73 行

TXT
73
字号
#! /bin/shprogname=irman2lircif [ "$1" = "--help" ]; then  echo "${progname}: converts irman.conf to lirc config file"  echo  echo "usage: ${progname} [file]"  echo "       where \`file' is the full file name of your irman.conf"  echo "       (default /usr/local/etc/irman.conf)"  exit 0fiirmanconf=${1:-/usr/local/etc/irman.conf}if [ ! -f ${irmanconf} ]; then  echo "cannot find ${irmanconf}.  try ${progname} --help"  exit 1;fiecho "# lircd.conf automatically generated by ${progname}" cat <<EOF## brand:             Irman# model:             All modelsEOFecho "# devices:           remotes from ${irmanconf}"grep bind ${irmanconf} | sed 's/^[ \t]*bind[ \t]\+\([^- \t]\+-[^-]\+\)-.*$/\1/' |  sort | uniq | sed 's/^/#                        /' cat <<EOF#begin remote  name            irman  bits            48  flags           SPACE_ENC  eps             30  aeps            100  one             1024  3072  zero            1024  2048  ptrail          1024  pre_data_bits   16  pre_data        0xffff  post_data_bits  0  post_data       0x0  gap             65536  repeat_bit      0     begin codesEOFIFS="	 "grep '^[ 	]*bind' ${irmanconf} |while  read bind name codedo  if [ "x$bind" = "xbind" -a -n "$code" -a -n "$name" ]; then    code=`echo "${code}000000000000" | cut -c1-12`    echo "          ${name}	0x0000${code}"  fidonecat <<EOF      end codesend remoteEOF

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?