Skip to content

Commit

Permalink
Merge branch 'master' into module
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman authored Jul 16, 2021
2 parents bdbfe73 + cae11da commit 423c128
Show file tree
Hide file tree
Showing 104 changed files with 1,504 additions and 791 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ assignees: ''

<!-- 描述问题时,请尽可能详细。提供的信息越多,就越容易追踪和解决。-->

## 系统信息

* 操作系统:
* GMT 版本(`gmt --version`):
10 changes: 4 additions & 6 deletions .github/workflows/cache-data.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow downloads GMT data used in the documentation and uploads as artifacts
# This workflow downloads data used in the documentation and uploads as an artifact
name: Cache data

on:
Expand All @@ -17,18 +17,15 @@ jobs:
shell: bash -l {0}

steps:
# Setup Miniconda
- name: Setup Miniconda
uses: conda-incubator/[email protected]
with:
channels: conda-forge
miniconda-version: "latest"

# Install GMT
- name: Install GMT
run: conda install -c conda-forge gmt=6.2.0

# Download remote files
- name: Download remote data
run: |
gmt which -Ga @earth_relief_30m \
Expand All @@ -45,6 +42,8 @@ jobs:
# cache
gmt which -Ga @age_chrons_GTS2012_2020.cpt \
@ternary.txt \
@mississippi.txt \
@NY_traffic.txt \
@sunglasses.eps
# Download the china-geospatial-data datasets
git clone --depth 1 https://github.com/gmt-china/china-geospatial-data china-geospatial-data
Expand All @@ -55,9 +54,8 @@ jobs:
rm -rf GMT_custom_symbols/.git
mv GMT_custom_symbols ~/.gmt/custom/
# Upload the downloaded files as artifacts to GitHub
- name: Upload artifacts to GitHub
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2.2.4
with:
name: gmt-cache
path: |
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ jobs:
--verbose
"repository/*.md"
"documentation/latest/**/*.html"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

- name: Create Issue From File
uses: peter-evans/create-issue-from-file@v3
uses: peter-evans/create-issue-from-file@v3.0.0
with:
title: Link Checker Report
title: Link Checker Report on ${{ steps.date.outputs.date }}
content-filepath: ./lychee/out.md
25 changes: 25 additions & 0 deletions .github/workflows/compress-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow compresses images in PRs
name: Compress Images

on:
pull_request:
paths:
- '**.jpg'
- '**.jpeg'
- '**.png'
- '**.webp'

jobs:
compress:
if: github.event.pull_request.head.repo.full_name == github.repository
name: Compress Images
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/[email protected]

- name: Compress Images
uses: calibreapp/[email protected]
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
11 changes: 8 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
run:
shell: bash -l {0}
steps:
# Cancel previous runs that are not completed
- name: Cancel Previous Runs
uses: styfle/[email protected]

Expand All @@ -38,7 +37,6 @@ jobs:
conda install gmt=${GMT_VERSION}
pip install -r requirements.txt
# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
uses: dawidd6/[email protected]
with:
Expand Down Expand Up @@ -83,8 +81,15 @@ jobs:
- name: Push the documentation to gh-pages
run: |
cd deploy
# generate the .nojekyll file in the root directory
touch .nojekyll
# Update the directory
# generate CNAME in the root directory
echo docs.gmt-china.org > CNAME
# Use the old PDF documentation if the new PDF documentation is not built
if [ ! -f ../build/dirhtml/GMT_docs.pdf ]; then
cp ${GMT_DOC_VERSION}/GMT_docs.pdf ../build/dirhtml/
fi
# Replace the old documentation with tht new one.
rm -rvf ${GMT_DOC_VERSION}
cp -rvf ../build/dirhtml/ ${GMT_DOC_VERSION}/
# let "latest" link to the latest version
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/preview-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ jobs:
run:
shell: bash -l {0}
steps:
# Cancel previous runs that are not completed
- name: Cancel Previous Runs
uses: styfle/[email protected]

- name: Checkout
uses: actions/[email protected]

# Setup Miniconda
- name: Setup Miniconda
uses: conda-incubator/[email protected]
with:
Expand All @@ -35,7 +33,6 @@ jobs:
conda install -c conda-forge gmt=${GMT_VERSION}
pip install -r requirements.txt
# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
uses: dawidd6/[email protected]
with:
Expand All @@ -44,7 +41,6 @@ jobs:
name: gmt-cache
path: .gmt

# Move downloaded files to ~/.gmt directory and list them
- name: Move and list downloaded remote files
run: |
mkdir -p ~/.gmt
Expand All @@ -54,8 +50,7 @@ jobs:
ls -lhR ~/.gmt
- name: Build HTML
run: |
make dirhtml
run: make build_html

- name: Deploy for preview
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305
Expand All @@ -74,7 +69,7 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository

- name: Find Comment
uses: peter-evans/find-comment@v1
uses: peter-evans/find-comment@v1.2.0
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
Expand All @@ -83,7 +78,7 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository

- name: Create comment
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v1.4.5
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Expand All @@ -94,7 +89,7 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository && steps.fc.outputs.comment-id == 0

- name: Update comment
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v1.4.5
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Documentation
# Sphinx
build/
_build/
*.mo

# GMT
Expand All @@ -12,3 +11,7 @@ gmt.history

# macOS
.DS_Store

# vim
*~
.*.swp
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export GMT_END_SHOW=off
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile build build_html build_pdf optimize_pdf serve watch
.PHONY: help Makefile build build_html build_pdf optimize_pdf serve

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand All @@ -40,8 +40,3 @@ optimize_pdf: latexpdf

serve: $(HTML)
cd $(BUILDDIR)/$(HTML) && python -m http.server

# Watch a Sphinx directory and rebuild the documentation when a change is detected.
# See https://github.com/GaretJax/sphinx-autobuild for details
watch:
sphinx-autobuild --open-browser --delay 1 -b ${HTML} ${SPHINXOPTS} $(SOURCEDIR) $(BUILDDIR)/${HTML}
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
# GMT中文手册
# GMT 中文手册

[![Deploy](https://github.com/gmt-china/GMT_docs/actions/workflows/deploy.yml/badge.svg)](https://github.com/gmt-china/GMT_docs/actions/workflows/deploy.yml)
[![Documentation version](https://img.shields.io/badge/版本-v6.2-blue.svg)](https://docs.gmt-china.org/6.2/)
![Repository size](https://img.shields.io/github/repo-size/gmt-china/GMT_Docs)
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-blue.svg)](https://creativecommons.org/licenses/by-nc/4.0/deed.zh)

[在线阅读](https://docs.gmt-china.org/6.2/) |
[PDF下载](https://docs.gmt-china.org/6.2/GMT_docs.pdf) |
[PDF 下载](https://docs.gmt-china.org/6.2/GMT_docs.pdf) |
[文档源码](https://github.com/gmt-china/GMT_Docs) |
[GMT中文社区](https://gmt-china.org) |
[GMT官方网站](https://www.generic-mapping-tools.org) |
[GMT官方文档](https://docs.generic-mapping-tools.org) |
[GMT官方论坛](https://forum.generic-mapping-tools.org/)
[GMT 中文社区](https://gmt-china.org) |
[GMT 官方网站](https://www.generic-mapping-tools.org) |
[GMT 官方文档](https://docs.generic-mapping-tools.org) |
[GMT 官方论坛](https://forum.generic-mapping-tools.org/)

欢迎来到 [Generic Mapping Tools (GMT)](https://www.generic-mapping-tools.org) 的世界。
GMT 是地球科学使用最广泛的制图软件之一。

本文档是由 GMT 中文社区维护的 GMT 中文手册,既可以作为入门读物,也可以作为日常参考。
本文档是由 [GMT 中文社区](https://gmt-china.org) 维护整理的 GMT 中文手册。
手册详尽地介绍了 GMT 的用法并提供了大量的实用示例。
其既可以作为初学者的入门读物,也可以作为日常使用的参考书。

## 文档维护

本文档尚有很多不完善之处,欢迎GMT用户参与到GMT中文手册的维护与更新中
详情见[维护指南](https://docs.gmt-china.org/latest/contributing)
本文档尚有很多不完善之处,欢迎 GMT 用户参与到 GMT 中文手册的维护与更新之中
详情见[贡献指南](https://docs.gmt-china.org/latest/contributing)

> 一个人可以走的很快,但是一群人却可以走的更远。
## 许可协议

本作品采用[知识共享署名-非商业性使用 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc/4.0/)
本作品采用[知识共享署名-非商业性使用 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc/4.0/)
任何人都可以自由地分享、修改本作品,但必须遵循如下条件:

- 署名:必须提到原作者,提供指向此许可协议的链接,表明是否有做修改
Expand Down
23 changes: 0 additions & 23 deletions ci/image_optimize.sh

This file was deleted.

1 change: 0 additions & 1 deletion source/CNAME

This file was deleted.

Binary file modified source/api/matlab_path.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/basis/GMT_RGBchart_a4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/basis/GMT_RGBchart_letter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/basis/GMT_patterns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/basis/GMT_stand+_iso+.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/basis/GMT_symbol_dingbats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/chinese/GMT_Chinese.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/chinese/GMT_chinese.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/chinese/chinese-extension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/chinese/chinese-months.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/chinese/chinese-texts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/chinese/chinese-weeks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 18 additions & 3 deletions source/chinese/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Windows 下的 GMT 中文支持
ghostscript 的中文支持
----------------------

如果没有正确配置ghostscript的中文支持,GMT生成的PNG、PDF等格式的图片中的中文将会出现乱码
因此ghostscript的中文支持对于希望使用中文的用户来说是必须进行配置的
如果没有正确配置 Ghostscript 的中文支持,GMT 生成的 PNG、PDF 等格式的图片中的中文将会出现乱码
因此 Ghostscript 的中文支持对于希望使用中文的用户来说是必须进行配置的

.. warning::

Expand All @@ -15,8 +15,23 @@ ghostscript 的中文支持
新手常常没有意识到自己安装GMT时勾选了Ghostscript组件,导致中文乱码出现。
如果严格按照下列步骤配置,依然遇到了中文乱码问题,
建议卸载GMT,并按照《 :doc:`/install/windows` 》章节的步骤与要求重新安装GMT与Ghostscript。

安装包下载地址:

- `gs9540w64.exe(64 位) <https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9540/gs9540w64.exe>`__
- `gs9540w32.exe(32 位) <https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9540/gs9540w32.exe>`__

.. warning::

请注意 Ghostscript 的版本!
由于 Ghostscript 自身的 bug,请勿使用 9.27、9.51 和 9.52 版本的 Ghostscript。

.. note::

安装 Ghostscript 的过程中记得勾选 ``Generate cidfmap for Windows CJK TrueType fonts``
以生成中文字体配置文件。

在安装ghostscript 的过程中,会有一个生成 cidmap 的选项,选中该选项则表示会为当前系统自动
在安装 ghostscript 的过程中,会有一个生成 cidmap 的选项,选中该选项则表示会为当前系统自动
生成中文所需的 cidmap 文件。默认该选项是被选中的,一定 **不要** 将该选项取消。

为了能够在将PS文件转换为其他图片格式时也支持中文,需要设置环境变量 ``GS_FONTPATH``\
Expand Down
6 changes: 4 additions & 2 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
.. |刘珠妹| replace:: `刘珠妹 <https://github.com/liuzhumei>`__
.. |徐弥坚| replace:: `徐弥坚 <https://xumijian.me/>`__
.. |邓山泉| replace:: `邓山泉 <https://github.com/sqdeng/>`__
.. |周茂| replace:: `周茂 <https://github.com/ZMAlt>`__
"""

# -- General configuration ------------------------------------------------
Expand All @@ -43,6 +44,7 @@
show_authors = True

extensions = [
"sphinx_rtd_theme", # add the theme as an extension so that translation works
"sphinx.ext.duration",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
Expand Down Expand Up @@ -76,9 +78,9 @@
templates_path = ["_templates"]
html_title = project
html_logo = None
html_favicon = "_static/favicon.ico"
html_favicon = "favicon.ico"
html_static_path = ["_static"]
html_extra_path = ["CNAME"]
html_extra_path = []
html_last_updated_fmt = "%Y年%m月%d日"
html_search_language = "zh"
html_theme_options = {
Expand Down
12 changes: 9 additions & 3 deletions source/dataset-CN/CN-block/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ CN-block 数据提供了三个数据文件:
数据引用
--------

- 张培震,邓起东,张国民,等. 中国大陆的强震活动与活动地块[J]. 中国科学D辑, 2003, 33(z1):12-20.
- 张国民,马宏生,王辉,等. 中国大陆活动地块边界带与强震活动[J]. 地球物理学报,2005,(03):602-610.
- 王辉,张国民,吴云,等. 中国大陆活动地块变形与地震活动的关系[D]. 中国地震, 2003,(03):243-254.
- 张培震, 邓起东, 张国民, 等.
中国大陆的强震活动与活动地块.
中国科学D辑, 2003, 33(z1):12-20.
- 张国民, 马宏生, 王辉, 等.
中国大陆活动地块边界带与强震活动.
地球物理学报, 2005, (03):602-610.
- 王辉, 张国民, 吴云, 等.
中国大陆活动地块变形与地震活动的关系.
中国地震, 2003, (03):243-254.
10 changes: 9 additions & 1 deletion source/dataset-CN/CN-border.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ CN-border 数据提供了三个数据文件:
数据来源与处理
--------------

CN-border 原始数据来自于 `1:100万全国基础地理数据库 <https://www.webmap.cn/commres.do?method=result100W>`_\
CN-border 原始数据来自于 `1:100 万全国基础地理数据库 <https://www.webmap.cn/commres.do?method=result100W>`_\
并由\ `刘珠妹 <https://github.com/liuzhumei>`__ 处理得到 GMT 可使用的数据。
**具体数据处理方式待补充**。

数据引用
--------

CN-border 原始数据来自于\ `全国地理信息资源目录服务系统 <https://www.webmap.cn>`__\
\ `版权声明 <https://www.webmap.cn/main.do?method=otherService&clickFlag=copyright>`__\ 中要求:

转载或引用本网站所有之内容须注明“转自(或引自)全国地理信息资源目录服务系统”字样,并标明本网网址 www.webmap.cn。
Loading

0 comments on commit 423c128

Please sign in to comment.