windows/Linux下的程序員文檔瀏覽工具

Dash + Alfred

https://www.jianshu.com/p/77d2bf8df81fnode

對於程序員來講,查看api文檔是很是頻繁,常常窗口之間切換很是麻煩,mac下就有一個查文檔的神器:Dash。linux

詳細使用能夠參考如上鍊接的說明。git

本文重點整理下windows和linux下使用相似的功能如何操做。程序員

IntelliJ插件

https://github.com/gdelmas/IntelliJDashPlugin/releasesgithub

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".web

zeal

dash只有mac版本,沒有windows版,以zeal爲例說明windows

zeal官網:https://zealdocs.org/centos

文檔地址:api

https://kapeli.com/cheatsheetsbash

https://github.com/Kapeli/feeds

https://github.com/zealdocs/zeal

  • 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.rpmharfbuzz-devel-1.3.2-1.el7.x86_64.rpmharfbuzz-icu-1.3.2-1.el7.x86_64.rpmlibcrypto.solibcrypto.so.10libcrypto.so.1.0.2klibpcre2-16.so.0libpcre2-16.so.0.5.0libQt5Concurrent.prllibQt5Concurrent.solibQt5Concurrent.so.5libQt5Concurrent.so.5.9libQt5Concurrent.so.5.9.2libQt5Core.prllibQt5Core.solibQt5Core.so.5libQt5Core.so.5.9libQt5Core.so.5.9.2libQt5DBus.prllibQt5DBus.solibQt5DBus.so.5libQt5DBus.so.5.9libQt5DBus.so.5.9.2libQt5EglFSDeviceIntegration.prllibQt5EglFSDeviceIntegration.solibQt5EglFSDeviceIntegration.so.5libQt5EglFSDeviceIntegration.so.5.9libQt5EglFSDeviceIntegration.so.5.9.2libQt5EglFsKmsSupport.prllibQt5EglFsKmsSupport.solibQt5EglFsKmsSupport.so.5libQt5EglFsKmsSupport.so.5.9libQt5EglFsKmsSupport.so.5.9.2libQt5Gui.prllibQt5Gui.solibQt5Gui.so.5libQt5Gui.so.5.9libQt5Gui.so.5.9.2libQt5Location.so.5libQt5Location.so.5.9libQt5Location.so.5.9.2libQt5Network.prllibQt5Network.solibQt5Network.so.5libQt5Network.so.5.9libQt5Network.so.5.9.2libQt5OpenGL.prllibQt5OpenGL.solibQt5OpenGL.so.5libQt5OpenGL.so.5.9libQt5OpenGL.so.5.9.2libQt5Positioning.so.5libQt5Positioning.so.5.9libQt5Positioning.so.5.9.2libQt5PrintSupport.prllibQt5PrintSupport.solibQt5PrintSupport.so.5libQt5PrintSupport.so.5.9libQt5PrintSupport.so.5.9.2libQt5Qml.prllibQt5Qml.solibQt5Qml.so.5libQt5Qml.so.5.9libQt5Qml.so.5.9.2libQt5QuickParticles.prllibQt5QuickParticles.solibQt5QuickParticles.so.5libQt5QuickParticles.so.5.9libQt5QuickParticles.so.5.9.2libQt5Quick.prllibQt5Quick.solibQt5Quick.so.5libQt5Quick.so.5.9libQt5Quick.so.5.9.2libQt5QuickTest.prllibQt5QuickTest.solibQt5QuickTest.so.5libQt5QuickTest.so.5.9libQt5QuickTest.so.5.9.2libQt5QuickWidgets.prllibQt5QuickWidgets.solibQt5QuickWidgets.so.5libQt5QuickWidgets.so.5.9libQt5QuickWidgets.so.5.9.2libQt5Sensors.so.5libQt5Sensors.so.5.9libQt5Sensors.so.5.9.2libQt5Sql.prllibQt5Sql.solibQt5Sql.so.5libQt5Sql.so.5.9libQt5Sql.so.5.9.2libQt5Test.prllibQt5Test.solibQt5Test.so.5libQt5Test.so.5.9libQt5Test.so.5.9.2libQt5WebChannel.so.5libQt5WebChannel.so.5.9libQt5WebChannel.so.5.9.2libQt5WebKit.prllibQt5WebKit.solibQt5WebKit.so.5libQt5WebKit.so.5.9libQt5WebKit.so.5.9.1libQt5WebKitWidgets.prllibQt5WebKitWidgets.solibQt5WebKitWidgets.so.5libQt5WebKitWidgets.so.5.9libQt5WebKitWidgets.so.5.9.1libQt5Widgets.prllibQt5Widgets.solibQt5Widgets.so.5libQt5Widgets.so.5.9libQt5Widgets.so.5.9.2libQt5X11Extras.prllibQt5X11Extras.solibQt5X11Extras.so.5libQt5X11Extras.so.5.9libQt5X11Extras.so.5.9.2libQt5XcbQpa.prllibQt5XcbQpa.solibQt5XcbQpa.so.5libQt5XcbQpa.so.5.9libQt5XcbQpa.so.5.9.2libQt5XmlPatterns.so.5libQt5XmlPatterns.so.5.9libQt5XmlPatterns.so.5.9.2libQt5Xml.prllibQt5Xml.solibQt5Xml.so.5libQt5Xml.so.5.9libQt5Xml.so.5.9.2libssl3.solibssl.solibssl.so.10libssl.so.1.0.2klibxcb-composite.solibxcb-composite.so.0libxcb-composite.so.0.0.0libxcb-damage.solibxcb-damage.so.0libxcb-damage.so.0.0.0libxcb-dpms.solibxcb-dpms.so.0libxcb-dpms.so.0.0.0libxcb-dri2.solibxcb-dri2.so.0libxcb-dri2.so.0.0.0libxcb-dri3.solibxcb-dri3.so.0libxcb-dri3.so.0.0.0libxcb-ewmh.so.2libxcb-ewmh.so.2.0.0libxcb-glx.solibxcb-glx.so.0libxcb-glx.so.0.0.0libxcb-icccm.so.4libxcb-icccm.so.4.0.0libxcb-image.so.0libxcb-image.so.0.0.0libxcb-keysyms.solibxcb-keysyms.so.1libxcb-keysyms.so.1.0.0libxcb-present.solibxcb-present.so.0libxcb-present.so.0.0.0libxcb-randr.solibxcb-randr.so.0libxcb-randr.so.0.1.0libxcb-record.solibxcb-record.so.0libxcb-record.so.0.0.0libxcb-render.solibxcb-render.so.0libxcb-render.so.0.0.0libxcb-render-util.so.0libxcb-render-util.so.0.0.0libxcb-res.solibxcb-res.so.0libxcb-res.so.0.0.0libxcb-screensaver.solibxcb-screensaver.so.0libxcb-screensaver.so.0.0.0libxcb-shape.solibxcb-shape.so.0libxcb-shape.so.0.0.0libxcb-shm.solibxcb-shm.so.0libxcb-shm.so.0.0.0libxcb-sync.solibxcb-sync.so.1libxcb-sync.so.1.0.0libxcb-util.so.1libxcb-util.so.1.0.0libxcb-xevie.solibxcb-xevie.so.0libxcb-xevie.so.0.0.0libxcb-xf86dri.solibxcb-xf86dri.so.0libxcb-xf86dri.so.0.0.0libxcb-xfixes.solibxcb-xfixes.so.0libxcb-xfixes.so.0.0.0libxcb-xinerama.solibxcb-xinerama.so.0libxcb-xinerama.so.0.0.0libxcb-xinput.solibxcb-xinput.so.0libxcb-xinput.so.0.1.0libxcb-xkb.solibxcb-xkb.so.1libxcb-xkb.so.1.0.0libxcb-xselinux.solibxcb-xselinux.so.0libxcb-xselinux.so.0.0.0libxcb-xtest.solibxcb-xtest.so.0libxcb-xtest.so.0.0.0libxcb-xvmc.solibxcb-xvmc.so.0libxcb-xvmc.so.0.0.0libxcb-xv.solibxcb-xv.so.0libxcb-xv.so.0.0.0platformszeal​dash/platforms:libqeglfs.solibqlinuxfb.solibqminimalegl.solibqminimal.solibqoffscreen.solibqvnc.solibqxcb.so​
相關文章
相關標籤/搜索