LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 997|回复: 7

现在gentoo下还有什么好用的chm软件吗

[复制链接]
发表于 2010-3-21 11:27:54 | 显示全部楼层 |阅读模式
chmsee好像不能用了,gnochm也是Segmentation fault,firefox下的插件不支持我的系统,都不知道该咋看电子书了
发表于 2010-3-21 12:20:08 | 显示全部楼层
xchm, 我与你 的情况相同,现在用xchm
回复 支持 反对

使用道具 举报

发表于 2010-3-21 12:57:35 | 显示全部楼层
Post by qiaomuf;2076799
chmsee好像不能用了,gnochm也是Segmentation fault,firefox下的插件不支持我的系统,都不知道该咋看电子书了


会segfault或者打开缓慢的 7z x xxx.chm,然后用任意喜欢的浏览器看。不segfault的用kchmview看。
回复 支持 反对

使用道具 举报

发表于 2010-3-21 14:54:34 | 显示全部楼层
我用的KDE,软件是kchmviewer,非常好用
回复 支持 反对

使用道具 举报

发表于 2010-3-21 18:08:21 | 显示全部楼层
Post by leisudong;2076810
会segfault或者打开缓慢的 7z x xxx.chm,然后用任意喜欢的浏览器看。不segfault的用kchmview看。


我还真好事拿7zip解压了下试试,结果花了3分钟时间才把释放出来的垃圾文件清理掉
回复 支持 反对

使用道具 举报

发表于 2010-3-21 18:35:33 | 显示全部楼层
安装chmlib然后执行以下命令

chm_http --port=8080 xxx.chm &
firefox localhost:8080

懒人用脚本:
#see if a right filename was given.
if [ -z "$1" ]
then
    echo "Usage: chm.sh chm_filename."
    exit 0
else
    file="$1"
fi

if [ ! -e "$file" ]
then
    echo "Can't find $file."
    exit 0
#elif [ ! -f "$file" ]
#then
#    echo "$file is not a regular file, can't open."
#    exit 0
fi

if [ -z `file "$file" | grep 'MS Windows HtmlHelp Data'`]
then
    echo "$file is not a chm file, can't open."
    exit
fi

#see if there is a running chm_http, if true,
#find which ports it used and use a new port to open chm
#else specify port 8080
pids=`pidof chm_http`
if [ -z "$pids" ]
then
    port=8080
else
    chmlib_ports=`netstat -tlnp | grep 'chm_http' | awk '{print $4}' | awk -F ':' '{print $2}'`
    for eachport in $chmlib_ports
    do
        last_used_port=$eachport
    done
    port=`expr $last_used_port + 1`
fi

chm_http --port=$port "$file" &
firefox localhostport
回复 支持 反对

使用道具 举报

发表于 2010-3-22 02:32:30 | 显示全部楼层
Post by zcg0696;2076845
安装chmlib然后执行以下命令

chm_http --port=8080 xxx.chm &
firefox localhost:8080

懒人用脚本:
#see if a right filename was given.
if [ -z "$1" ]
then
    echo "Usage: chm.sh chm_filename."
    exit 0
else
    file="$1"
fi

if [ ! -e "$file" ]
then
    echo "Can't find $file."
    exit 0
#elif [ ! -f "$file" ]
#then
#    echo "$file is not a regular file, can't open."
#    exit 0
fi

if [ -z `file "$file" | grep 'MS Windows HtmlHelp Data'`]
then
    echo "$file is not a chm file, can't open."
    exit
fi

#see if there is a running chm_http, if true,
#find which ports it used and use a new port to open chm
#else specify port 8080
pids=`pidof chm_http`
if [ -z "$pids" ]
then
    port=8080
else
    chmlib_ports=`netstat -tlnp | grep 'chm_http' | awk '{print $4}' | awk -F ':' '{print $2}'`
    for eachport in $chmlib_ports
    do
        last_used_port=$eachport
    done
    port=`expr $last_used_port + 1`
fi

chm_http --port=$port "$file" &
firefox localhostport



chm_http确实不错,以下是我的做法。


  1. #!/bin/bash

  2. for i in `seq 8000 8080`; do
  3.         netstat -ntl | grep -q $i
  4.         if [ $? -eq 1 ]; then
  5.                 port=$i
  6.                 break
  7.         fi
  8. done

  9. echo "Listening port $port .."

  10. xdg-open http://localhost:$port &
  11. chm_http --port=$port --bind=127.0.0.1 "$1"
复制代码



先打开网址,趁浏览器还未起来马上运行chm_http,这样看了chm之后可以Ctrl-C中断掉。
回复 支持 反对

使用道具 举报

发表于 2010-3-22 06:11:00 | 显示全部楼层
chmsee-9999 可用。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表