Dash + Alfred
https://www.jianshu.com/p/77d2bf8df81f
对于程序员来说,查看api文档是非常频繁,经常窗口之间切换非常麻烦,mac下就有一个查文档的神器:Dash。
详细使用可以参考如上连接的说明。
本文重点整理下windows和linux下使用类似的功能如何操作。
IntelliJ插件
https://github.com/gdelmas/IntelliJDashPlugin/releases
ShortcutYou can change the shortcut at Preferences -> Keymap -> Plug-ins -> Dash.Toolbar IconYou can add a button to the toolbar. Right-click the menubar -> Customize […]. You will find the button under "Plug-ins -> Dash".
zeal
dash只有mac版本,没有windows版,以zeal为例说明
zeal官网:https://zealdocs.org/
文档地址:
windows下的安装和使用很简单:只要下载安装包,解压安装即可
linux下需要安装依赖包和自己代码编译
由于api的内容需要连接国外的站点下载,速度特别慢,建议采用如下的docsets节的内容手动下载和加压即可
docsets
https://kapeli.com/docsets 这里有docsets的一些相关资料
可以下载的内容有:https://github.com/Kapeli/feeds 这里有完整列表,选择某个xml文件中,找到下载的地址下载对应的tgz文件,下载完成后解压到zeal对应的目录下,然后重新启动zeal即可
如下是一个参考的下载来源:
C++17: csdn
http://tokyo.kapeli.com/feeds/jQuery.tgz
http://tokyo.kapeli.com/feeds/Bash.tgz
http://tokyo.kapeli.com/feeds/C++.tgz
http://tokyo.kapeli.com/feeds/Boost.tgzhttp://tokyo.kapeli.com/feeds/Vagrant.tgzhttp://tokyo.kapeli.com/feeds/Gradle_DSL.tgzhttp://tokyo.kapeli.com/feeds/AWS_JavaScript.tgzhttp://tokyo.kapeli.com/feeds/Go.tgzhttp://tokyo.kapeli.com/feeds/Font_Awesome.tgzhttp://tokyo.kapeli.com/feeds/SQLAlchemy.tgzhttp://tokyo.kapeli.com/feeds/jQuery_UI.tgzhttp://tokyo.kapeli.com/feeds/JavaScript.tgzhttp://tokyo.kapeli.com/feeds/Spring_Framework.tgzhttp://tokyo.kapeli.com/feeds/RequireJS.tgzhttp://tokyo.kapeli.com/feeds/Docker.tgzhttp://tokyo.kapeli.com/feeds/Python_3.tgzhttp://tokyo.kapeli.com/feeds/Vim.tgzhttp://tokyo.kapeli.com/feeds/C.tgzhttp://tokyo.kapeli.com/feeds/Grails.tgzhttp://tokyo.kapeli.com/feeds/NodeJS.tgzhttp://tokyo.kapeli.com/feeds/CMake.tgzhttp://tokyo.kapeli.com/feeds/Groovy.tgzhttp://tokyo.kapeli.com/feeds/Bootstrap_3.tgzhttp://tokyo.kapeli.com/feeds/Java_SE9.tgzhttp://tokyo.kapeli.com/feeds/ElasticSearch.tgzhttp://singapore.kapeli.com/feeds/TypeScript.tgz
Linux编译zeal
centos 7.1版本上没有zeal的二进制安装包,从源码编译有点麻烦。
由于zeal使用的是qt5版本,默认centos7没有这个内容,需要进行一定的配置
依赖包
第一步,参考README安装基础的依赖包
yum install qt5-qtwebkit-devel.x86_64yum install xcb-util-keysyms-devel.x86_64yum install -y libarchive-devel.x86_64
ECM 【cmake modules】
此时执行cmake编译时提示如下的错误:
CMake Error at assets/CMakeLists.txt:2 (find_package): Could not find a package configuration file provided by "ECM" with any of the following names:
ECMConfig.cmake
ecm-config.cmake
Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR" to a directory containing one of the above files. If "ECM" provides a
这个错误是和cmake有关的,缺少的内容安装
yum install -y extra-cmake-modules.noarch
再次编译,出现如下的问题,安装qt5的包
Qt5 COMPONENTS X11Extras REQUIRED
yum install -y qt5-qtx11extras-devel.x86_64
此时如果编译成功,即可运行,运行时出现如下问题:
libQt5Gui.so undefined reference hb_font_funcs_set_nominal_glyph_func
这个是harfbuzz的版本问题,只要安装新的1.0.3.2版本即可【默认是0.#的版本】
yum install -y harfbuzz-devel.x86_64 [HarfBuzz is an OpenType text shaping engine]
此时即可运行
将编译的包拷贝到其他的机器上运行
由于整个包依赖于qt,为了避免系统没有安装qt的问题,此处把相关的依赖放入独立的目录中,使用独立的环境变量进行设置引导zeal
运行脚本
具体的脚本文件类似如下
#!/bin/bash
:<<EOF
~/.local/share/Zeal/Zeal/docsets
想看哪个解哪个!!!
tar -xzvf Java_SE9.tgz -C ~/.local/share/Zeal/Zeal/docsets/.
EOF
# 自动从FTP下载docsets,然后装入zeal
num=`ls ~/.local/share/Zeal/Zeal/docsets | wc -l`
if [ "$num" = "0" ]; then
mkdir pkg
ftp -v -n <<END
open 172.16.1.201 21
user anonymous anonymous
binary
lcd pkg
cd /常用软件/dash/docsets/
prompt
mget *.tgz
mget *.zip
close
bye
END for file in ./pkg/*
do
echo $file
tar xzf $file -C ~/.local/share/Zeal/Zeal/docsets/.
done rm -rf pkg
fi
# 运行zeal的相关设置和准备
BASE_DIR=$(cd "$(dirname "$0")"; pwd)
cd $BASE_DIR
export LD_LIBRARY_PATH=$BASE_DIR/dash
export FONTCONFIG_FILE=/etc/fonts/fonts.conf
export FONTCONFIG_PATH=/etc/fonts/
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
export QT_DEBUG_PLUGINS=1
cd dash
if [ -f /lib64/libharfbuzz.so.0.10302.0 ]; then
echo 'true type font installed'
else
rpm -i --force --nodeps *.rpm
fi
chmod +x zeal
./zeal
cd ..
依赖的文件列表
dash:
harfbuzz-1.3.2-1.el7.x86_64.rpm
harfbuzz-devel-1.3.2-1.el7.x86_64.rpm
harfbuzz-icu-1.3.2-1.el7.x86_64.rpm
libcrypto.so
libcrypto.so.10
libcrypto.so.1.0.2k
libpcre2-16.so.0
libpcre2-16.so.0.5.0
libQt5Concurrent.prl
libQt5Concurrent.so
libQt5Concurrent.so.5
libQt5Concurrent.so.5.9
libQt5Concurrent.so.5.9.2
libQt5Core.prl
libQt5Core.so
libQt5Core.so.5
libQt5Core.so.5.9
libQt5Core.so.5.9.2
libQt5DBus.prl
libQt5DBus.so
libQt5DBus.so.5
libQt5DBus.so.5.9
libQt5DBus.so.5.9.2
libQt5EglFSDeviceIntegration.prl
libQt5EglFSDeviceIntegration.so
libQt5EglFSDeviceIntegration.so.5
libQt5EglFSDeviceIntegration.so.5.9
libQt5EglFSDeviceIntegration.so.5.9.2
libQt5EglFsKmsSupport.prl
libQt5EglFsKmsSupport.so
libQt5EglFsKmsSupport.so.5
libQt5EglFsKmsSupport.so.5.9
libQt5EglFsKmsSupport.so.5.9.2
libQt5Gui.prl
libQt5Gui.so
libQt5Gui.so.5
libQt5Gui.so.5.9
libQt5Gui.so.5.9.2
libQt5Location.so.5
libQt5Location.so.5.9
libQt5Location.so.5.9.2
libQt5Network.prl
libQt5Network.so
libQt5Network.so.5
libQt5Network.so.5.9
libQt5Network.so.5.9.2
libQt5OpenGL.prl
libQt5OpenGL.so
libQt5OpenGL.so.5
libQt5OpenGL.so.5.9
libQt5OpenGL.so.5.9.2
libQt5Positioning.so.5
libQt5Positioning.so.5.9
libQt5Positioning.so.5.9.2
libQt5PrintSupport.prl
libQt5PrintSupport.so
libQt5PrintSupport.so.5
libQt5PrintSupport.so.5.9
libQt5PrintSupport.so.5.9.2
libQt5Qml.prl
libQt5Qml.so
libQt5Qml.so.5
libQt5Qml.so.5.9
libQt5Qml.so.5.9.2
libQt5QuickParticles.prl
libQt5QuickParticles.so
libQt5QuickParticles.so.5
libQt5QuickParticles.so.5.9
libQt5QuickParticles.so.5.9.2
libQt5Quick.prl
libQt5Quick.so
libQt5Quick.so.5
libQt5Quick.so.5.9
libQt5Quick.so.5.9.2
libQt5QuickTest.prl
libQt5QuickTest.so
libQt5QuickTest.so.5
libQt5QuickTest.so.5.9
libQt5QuickTest.so.5.9.2
libQt5QuickWidgets.prl
libQt5QuickWidgets.so
libQt5QuickWidgets.so.5
libQt5QuickWidgets.so.5.9
libQt5QuickWidgets.so.5.9.2
libQt5Sensors.so.5
libQt5Sensors.so.5.9
libQt5Sensors.so.5.9.2
libQt5Sql.prl
libQt5Sql.so
libQt5Sql.so.5
libQt5Sql.so.5.9
libQt5Sql.so.5.9.2
libQt5Test.prl
libQt5Test.so
libQt5Test.so.5
libQt5Test.so.5.9
libQt5Test.so.5.9.2
libQt5WebChannel.so.5
libQt5WebChannel.so.5.9
libQt5WebChannel.so.5.9.2
libQt5WebKit.prl
libQt5WebKit.so
libQt5WebKit.so.5
libQt5WebKit.so.5.9
libQt5WebKit.so.5.9.1
libQt5WebKitWidgets.prl
libQt5WebKitWidgets.so
libQt5WebKitWidgets.so.5
libQt5WebKitWidgets.so.5.9
libQt5WebKitWidgets.so.5.9.1
libQt5Widgets.prl
libQt5Widgets.so
libQt5Widgets.so.5
libQt5Widgets.so.5.9
libQt5Widgets.so.5.9.2
libQt5X11Extras.prl
libQt5X11Extras.so
libQt5X11Extras.so.5
libQt5X11Extras.so.5.9
libQt5X11Extras.so.5.9.2
libQt5XcbQpa.prl
libQt5XcbQpa.so
libQt5XcbQpa.so.5
libQt5XcbQpa.so.5.9
libQt5XcbQpa.so.5.9.2
libQt5XmlPatterns.so.5
libQt5XmlPatterns.so.5.9
libQt5XmlPatterns.so.5.9.2
libQt5Xml.prl
libQt5Xml.so
libQt5Xml.so.5
libQt5Xml.so.5.9
libQt5Xml.so.5.9.2
libssl3.so
libssl.so
libssl.so.10
libssl.so.1.0.2k
libxcb-composite.so
libxcb-composite.so.0
libxcb-composite.so.0.0.0
libxcb-damage.so
libxcb-damage.so.0
libxcb-damage.so.0.0.0
libxcb-dpms.so
libxcb-dpms.so.0
libxcb-dpms.so.0.0.0
libxcb-dri2.so
libxcb-dri2.so.0
libxcb-dri2.so.0.0.0
libxcb-dri3.so
libxcb-dri3.so.0
libxcb-dri3.so.0.0.0
libxcb-ewmh.so.2
libxcb-ewmh.so.2.0.0
libxcb-glx.so
libxcb-glx.so.0
libxcb-glx.so.0.0.0
libxcb-icccm.so.4
libxcb-icccm.so.4.0.0
libxcb-image.so.0
libxcb-image.so.0.0.0
libxcb-keysyms.so
libxcb-keysyms.so.1
libxcb-keysyms.so.1.0.0
libxcb-present.so
libxcb-present.so.0
libxcb-present.so.0.0.0
libxcb-randr.so
libxcb-randr.so.0
libxcb-randr.so.0.1.0
libxcb-record.so
libxcb-record.so.0
libxcb-record.so.0.0.0
libxcb-render.so
libxcb-render.so.0
libxcb-render.so.0.0.0
libxcb-render-util.so.0
libxcb-render-util.so.0.0.0
libxcb-res.so
libxcb-res.so.0
libxcb-res.so.0.0.0
libxcb-screensaver.so
libxcb-screensaver.so.0
libxcb-screensaver.so.0.0.0
libxcb-shape.so
libxcb-shape.so.0
libxcb-shape.so.0.0.0
libxcb-shm.so
libxcb-shm.so.0
libxcb-shm.so.0.0.0
libxcb-sync.so
libxcb-sync.so.1
libxcb-sync.so.1.0.0
libxcb-util.so.1
libxcb-util.so.1.0.0
libxcb-xevie.so
libxcb-xevie.so.0
libxcb-xevie.so.0.0.0
libxcb-xf86dri.so
libxcb-xf86dri.so.0
libxcb-xf86dri.so.0.0.0
libxcb-xfixes.so
libxcb-xfixes.so.0
libxcb-xfixes.so.0.0.0
libxcb-xinerama.so
libxcb-xinerama.so.0
libxcb-xinerama.so.0.0.0
libxcb-xinput.so
libxcb-xinput.so.0
libxcb-xinput.so.0.1.0
libxcb-xkb.so
libxcb-xkb.so.1
libxcb-xkb.so.1.0.0
libxcb-xselinux.so
libxcb-xselinux.so.0
libxcb-xselinux.so.0.0.0
libxcb-xtest.so
libxcb-xtest.so.0
libxcb-xtest.so.0.0.0
libxcb-xvmc.so
libxcb-xvmc.so.0
libxcb-xvmc.so.0.0.0
libxcb-xv.so
libxcb-xv.so.0
libxcb-xv.so.0.0.0
platforms
zeal
dash/platforms:
libqeglfs.so
libqlinuxfb.so
libqminimalegl.so
libqminimal.so
libqoffscreen.so
libqvnc.so
libqxcb.so