You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/08/08 02:18:48 UTC

[shardingsphere] branch revert-6696-caystemp created (now 5c6accd)

This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a change to branch revert-6696-caystemp
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git.


      at 5c6accd  Revert "Download PDF by Cayman (#6696)"

This branch includes the following new commits:

     new 5c6accd  Revert "Download PDF by Cayman (#6696)"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[shardingsphere] 01/01: Revert "Download PDF by Cayman (#6696)"

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch revert-6696-caystemp
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git

commit 5c6accde513da64f3578489c640b10da287a35f3
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sat Aug 8 10:18:26 2020 +0800

    Revert "Download PDF by Cayman (#6696)"
    
    This reverts commit b68e04753dcb5f03c531a1c8a8b88c989a1f623e.
---
 .github/workflows/buildPDF.yml                     |  57 ------------
 .github/workflows/maven.yml                        |   3 +-
 docs/document/Makefile                             |  20 ----
 docs/document/conf.py                              | 102 ---------------------
 docs/document/generatePDF.sh                       |  74 ---------------
 docs/document/requirements.txt                     |   1 -
 docs/document/static/pdf/shadingsphere_docs_cn.pdf | Bin 6696795 -> 0 bytes
 docs/document/static/pdf/shadingsphere_docs_en.pdf | Bin 6230441 -> 0 bytes
 .../hugo-theme-learn/layouts/partials/menu.html    |  13 +--
 9 files changed, 5 insertions(+), 265 deletions(-)

diff --git a/.github/workflows/buildPDF.yml b/.github/workflows/buildPDF.yml
deleted file mode 100644
index 783efd9..0000000
--- a/.github/workflows/buildPDF.yml
+++ /dev/null
@@ -1,57 +0,0 @@
-name: build docs PDF
-on:
-  push:
-    branches:
-    - master
-    paths:
-    - 'docs/document/content/**'
-jobs:
-  build:
-    # instal dependencies
-    name: publish PDF
-    # This job runs on Linux
-    runs-on: ubuntu-latest
-    steps:
-    - name: Checkout
-      uses: actions/checkout@v2
-    - name: Set up Python
-      uses: actions/setup-python@v2
-      with:
-        python-version: '3.7'
-    - name: Install dependencies
-      run: |
-        python -m pip install --upgrade pip
-        pip install sphinx
-        sudo apt-get update -y 
-        sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
-        sudo apt-get install texlive-xetex latex-cjk-all
-        sudo apt-get install pandoc
-        wget https://github.com/adobe-fonts/source-han-sans/raw/release/OTF/SourceHanSansSC.zip
-        wget https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SourceHanSerifSC_SB-H.zip
-        wget https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SourceHanSerifSC_EL-M.zip
-        unzip SourceHanSansSC.zip
-        unzip SourceHanSerifSC_EL-M.zip
-        unzip SourceHanSerifSC_SB-H.zip
-        sudo mv SourceHanSansSC SourceHanSerifSC_EL-M SourceHanSerifSC_SB-H /usr/share/fonts/opentype/
-        wget -O source-serif-pro.zip https://www.fontsquirrel.com/fonts/download/source-serif-pro
-        unzip source-serif-pro -d source-serif-pro
-        sudo mv source-serif-pro /usr/share/fonts/opentype/
-        wget -O source-sans-pro.zip https://www.fontsquirrel.com/fonts/download/source-sans-pro
-        unzip source-sans-pro -d source-sans-pro
-        sudo mv source-sans-pro /usr/share/fonts/opentype/
-        wget -O source-code-pro.zip https://www.fontsquirrel.com/fonts/download/source-code-pro
-        unzip source-code-pro -d source-code-pro
-        sudo mv source-code-pro /usr/share/fonts/opentype/
-        sudo fc-cache -f -v
-    - name: generate PDF
-      run: |
-        cd docs/document
-        bash generatePDF.sh cn
-        bash generatePDF.sh en
-    - name: commit PDF
-      run: |
-        git config user.name github-actions
-        git config user.email github-actions@github.com
-        git add *.pdf -f
-        git commit -m "Update PDF files"
-        git push -u origin master
\ No newline at end of file
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index c65f6fe..70250f6 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -32,8 +32,7 @@ jobs:
     runs-on: macos-latest
 
     steps:
-    - name: Checkout
-      uses: actions/checkout@v2
+    - uses: actions/checkout@v2
     - name: Set up JDK 1.8
       uses: actions/setup-java@v1
       with:
diff --git a/docs/document/Makefile b/docs/document/Makefile
deleted file mode 100644
index 92dd33a..0000000
--- a/docs/document/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# Minimal makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line, and also
-# from the environment for the first two.
-SPHINXOPTS    ?=
-SPHINXBUILD   ?= sphinx-build
-SOURCEDIR     = source
-BUILDDIR      = _build
-
-# Put it first so that "make" without argument is like "make help".
-help:
-	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-
-.PHONY: help Makefile
-
-# Catch-all target: route all unknown targets to Sphinx using the new
-# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: Makefile
-	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/docs/document/conf.py b/docs/document/conf.py
deleted file mode 100644
index 7343d65..0000000
--- a/docs/document/conf.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# Configuration file for the Sphinx documentation builder.
-#
-# This file only contains a selection of the most common options. For a full
-# list see the documentation:
-# https://www.sphinx-doc.org/en/master/usage/configuration.html
-
-# -- Path setup --------------------------------------------------------------
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#
-# import os
-# import sys
-# sys.path.insert(0, os.path.abspath('.'))
-# -- Project information -----------------------------------------------------
-
-project = 'Apache ShardingSphere document'
-copyright = '2020, Apache ShardingSphere'
-author = 'Apache ShardingSphere'
-
-
-# -- General configuration ---------------------------------------------------
-# The master toctree document.
-master_doc = 'index'
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-extensions = [
-  'sphinx.ext.autodoc',
-  'sphinx.ext.autosectionlabel',
-]
-
-pygments_style = 'sphinx'
-# The suffix(es) of source filenames.
-# You can specify multiple suffix as a list of string:
-source_suffix = ['.rst']
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#
-# This is also used if you do content translation via gettext catalogs.
-# Usually you set "language" from the command line for these cases.
-language = 'en_US'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-# This pattern also affects html_static_path and html_extra_path.
-exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
-
-
-# -- Options for HTML output -------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages.  See the documentation for
-# a list of builtin themes.
-#
-html_theme = 'sphinx_rtd_theme'
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-latex_engine = 'xelatex'
-
-latex_elements = {
-    'papersize': 'a4paper',
-    'pointsize': '10pt',
-    'figure_align': 'htbp',
-    'classoptions': ',oneside',
-    'passoptionstopackages': r'\PassOptionsToPackage{svgnames}{xcolor}',
-    'fontpkg': r'''
-    \setmainfont{Source Serif Pro}
-    \setsansfont{Source Sans Pro}
-    \setmonofont{Source Code Pro}
-    ''',
-    'preamble': r'''
-    \usepackage{ctex}
-    \setCJKmainfont[BoldFont=Source Han Serif SC SemiBold]{Source Han Serif SC}
-    \setCJKsansfont[BoldFont=Source Han Sans SC Medium]{Source Han Sans SC Normal}
-    \setCJKmonofont{Source Han Sans SC Normal}
-    \usepackage[draft]{minted}
-    \fvset{breaklines=true}
-    \setcounter{tocdepth}{3}
-    \usepackage[breaklinks]{hyperref}
-    ''',
-    'fncychap': r'\usepackage[Bjornstrup]{fncychap}',
-    'babel' : r'''
-    \usepackage{polyglossia}
-    \setmainlanguage{english}
-    ''',
-    'printindex': r'\footnotesize\raggedright\printindex',
-    'sphinxsetup':r'''
-    verbatimwithframe=false,
-    VerbatimColor={rgb}{0.95,0.95,0.92},
-    verbatimvisiblespace=\null,
-    verbatimcontinued=\null
-    '''
-}
diff --git a/docs/document/generatePDF.sh b/docs/document/generatePDF.sh
deleted file mode 100644
index 95cd1b7..0000000
--- a/docs/document/generatePDF.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-targetDir="content"
-localDir="source"
-mkdir $localDir
-# 默认的语言
-lang="$1"
-if [[ "$lang" == "en" ]] ;then
-    sed -i "s/language = 'zh_CN'/language = 'en_US'/" conf.py 
-    echo "printing English version PDF"
-else
-    sed -i "s/language = 'en_US'/language = 'zh_CN'/" conf.py 
-    echo "printing Chinese version PDF"
-fi
-
-cp conf.py ${localDir}/
-# 复制所有源文件的内容
-cp -r ${targetDir}/* ${localDir}/
-cd $localDir
-# faq去除编号
-sed -i 's/##[ ][0-9]*./##/g' faq/*
-
-# 建立主目录的index.rst
-echo -e ".. toctree::\n   :maxdepth: 1\n   :titlesonly:\n" >> index.rst
-
-# 遍历所有的md
-for f in `find . -type f -name "*${lang}.md"`; do
-    title=`grep -oP '^title = "\K[^"]*' $f` # 文件的标题
-    weight=`grep -oP '^weight = \K.*' $f` # 文件的权重(代表文件排版的顺序)
-    sed -i -n '/+++/,/+++/!p' $f # 删除front matter
-    fileName=${f##*/} # 文件名
-    path=${f%/*} # 文件路径
-    lastpath=${path%/*} # 上一级路径
-    foldername=${path##*/} # 当前文件夹名
-    # 如果是index文件则
-    if [[ "${fileName}" == "_index.${lang}.md" ]]
-    then
-    # 将文件的权重写到上一级别的filelist文件中
-    echo -e "${weight}\t${foldername}/index" >> "${lastpath}/filelist.txt"
-    # 当前目录下新建一个index.rst
-    echo "============================" >> "${path}/index.rst"
-    echo $title >> "${path}/index.rst"
-    echo "============================" >> "${path}/index.rst"
-    echo -e ".. toctree::\n   :maxdepth: 1\n   :titlesonly:\n\n   _index.${lang}.md" >> "${path}/index.rst"
-    else
-    # 不是的话添加标题行
-    sed -i "1i # ${title}" $f
-    # 将序号和文件名保存到filelist文件
-    echo -e "${weight}\t${fileName}" >> "${path}/filelist.txt"
-    fi
-done
-
-
-# 所有的filelist进行排序后输出到index.rst中
-for f in `find . -type f -name "*list.txt"`; do
-    path=${f%/*}
-    sort -nk 1  $f | awk '{print $2}' | sed 's/^/   /g' >> "${path}/index.rst"
-    rm $f
-done
-
-# 转换成rst
-for f in `find . -type f -name "*${lang}.md"`; do
-    sed -i -n '/+++/,/+++/!p' $f
-    # 删除所有的图标行因为不能排版
-    sed -i /http.*svg/d $f
-    sed -i /http.*codacy/d $f
-    pandoc $f -o "${f}.rst"
-    rm $f
-done
-
-cd ..
-make latexpdf
-cp _build/latex/*.pdf static/pdf/shadingsphere_docs_${lang}.pdf
-echo "shadingsphere_docs_${lang}.pdf"
-make clean
-rm -rf {_build,source}
\ No newline at end of file
diff --git a/docs/document/requirements.txt b/docs/document/requirements.txt
deleted file mode 100644
index 1b3a6e8..0000000
--- a/docs/document/requirements.txt
+++ /dev/null
@@ -1 +0,0 @@
-sphinx
\ No newline at end of file
diff --git a/docs/document/static/pdf/shadingsphere_docs_cn.pdf b/docs/document/static/pdf/shadingsphere_docs_cn.pdf
deleted file mode 100644
index 5639eed..0000000
Binary files a/docs/document/static/pdf/shadingsphere_docs_cn.pdf and /dev/null differ
diff --git a/docs/document/static/pdf/shadingsphere_docs_en.pdf b/docs/document/static/pdf/shadingsphere_docs_en.pdf
deleted file mode 100644
index 4be4177..0000000
Binary files a/docs/document/static/pdf/shadingsphere_docs_en.pdf and /dev/null differ
diff --git a/docs/document/themes/hugo-theme-learn/layouts/partials/menu.html b/docs/document/themes/hugo-theme-learn/layouts/partials/menu.html
index e8cd7f2..2eb7745 100644
--- a/docs/document/themes/hugo-theme-learn/layouts/partials/menu.html
+++ b/docs/document/themes/hugo-theme-learn/layouts/partials/menu.html
@@ -86,15 +86,10 @@
     {{ end }}
 
     <!-- download button -->
-    <hr />
-    {{ if eq .Lang "en"}}
-      <a class="padding" href="{{"pdf/shadingsphere_docs_en.pdf" | relURL}}">
-        <i class="fa fa-fw fa-file-pdf-o" ></i>&nbsp;Download PDF&nbsp;&nbsp;<!-- &nbsp; is a placeholder -->
-    {{ else }}  
-      <a class="padding" href="{{"pdf/shadingsphere_docs_cn.pdf" | relURL}}">
-        <i class="fa fa-fw fa-file-pdf-o" ></i>&nbsp;下载PDF文档&nbsp;&nbsp;<!-- &nbsp; is a placeholder -->
-    {{end}}
-    </a>
+    <!-- <hr /> -->
+    <!-- <a class="padding" href=""> no link yet -->
+      <!-- <i class="fa fa-fw fa-file-pdf-o" ></i>&nbsp;Download PDF&nbsp;&nbsp;👈&nbsp; is a placeholder -->
+    <!-- </a> -->
     
     <section id="footer">
       {{ partial "menu-footer.html" . }}