Typora
Typora是一个非常好用的支持Markdown的编辑器,安装过程中官网下载速度实在是太慢,因此(翻墙大法好)四月上传了一个安装包到百度云,链接如下:
1
https://pan.baidu.com/s/1SMH-JLgP1pemDWnlejj_nA #提取码:qeg5 ;如果失效请联系作者 ->
下载后解压即可使用,另外附上安装脚本,根据需求自行修改
installTypora.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# Typora Installer by dragonman225
# Variables
USER=$(/usr/bin/id -run)
INSTALL_DIR="${HOME}/applications"
APP_SHORTCUT="/usr/share/applications/typora.desktop"
TYPORA_ARCHIVE="/tmp/Typora-linux-x64.tar.gz"
# Greeting
echo "Typora Installer by April"
echo "Start installing Typora to ${INSTALL_DIR}"
read -p "Continue? (yY/nN)" -r
if [[ ${REPLY} =~ ^[Yy]$ ]]
then
# Make sure install directory exists
if [ ! -d ${INSTALL_DIR} ]; then
mkdir -p ${INSTALL_DIR}
fi
# Download Typora
echo -e "Downloading Typora..."
curl https://typora.io/linux/Typora-linux-x64.tar.gz -o ${TYPORA_ARCHIVE}
# Extract Typora
echo -e "Extracting Typora to ${INSTALL_DIR} ..."
if [ -d ${INSTALL_DIR}/typora ]; then
echo "Typora exists. Remove for fresh install ..."
rm -rf ${INSTALL_DIR}/typora
fi
tar -xzf ${TYPORA_ARCHIVE} --strip-components=1 -C ${INSTALL_DIR}
mv ${INSTALL_DIR}/Typora-linux-x64 ${INSTALL_DIR}/typora
chown -R ${USER}:${USER} ${INSTALL_DIR}/typora
rm ${TYPORA_ARCHIVE}
# Create Desktop Entry
if [ ! -d ${APP_SHORTCUT_DIR} ]; then
mkdir -p ${APP_SHORTCUT_DIR}
fi
echo "Creating Desktop Entry at ${APP_SHORTCUT} ..."
sudo bash -c "cat <<- EOF > ${APP_SHORTCUT}
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Typora
Comment=Markdown Editor
Exec=${INSTALL_DIR}/typora/Typora %F
Icon=${INSTALL_DIR}/typora/resources/app/asserts/icon/icon_256x256.png
Terminal=false
EOF"
fi脚本比较简单,如果已经下载了上面的压缩包,复制压缩包到指定目录
tmp
,并且注释脚本中的下载部分,然后执行脚本即可。以上便是Ubuntu安装Typora的全部过程