Skip to content

Commit 47bbb53

Browse files
committed
Prepare to build doc
Prepare to build doc
1 parent 9cdfcfb commit 47bbb53

11 files changed

Lines changed: 171 additions & 13 deletions

File tree

dev.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66

77
[project]
88
name = "automation_file_dev"
9-
version = "0.0.12"
9+
version = "0.0.13"
1010
authors = [
1111
{ name = "JE-Chen", email = "zenmailman@gmail.com" },
1212
]
@@ -34,4 +34,4 @@ classifiers = [
3434
"Homepage" = "https://github.com/JE-Chen/Integration-testing-environment"
3535

3636
[tool.setuptools.packages]
37-
find = { namespaces = false }
37+
find = { namespaces = false }

docs/.readthedocs.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Required
2+
version: 2
3+
4+
# Build documentation in the docs/ directory with Sphinx
5+
sphinx:
6+
configuration: docs/conf.py
7+
8+
# Optionally build your docs in additional formats such as PDF
9+
formats:
10+
- pdf
11+
12+
# Optionally set the version of Python and requirements required to build your docs
13+
python:
14+
version: "3.8"
15+
install:
16+
- requirements: docs/requirements.txt

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/API/api_index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FileAutomation API Documentation
2+
----
3+
4+
.. toctree::
5+
:maxdepth: 4

docs/source/Eng/eng_index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
====================================
2+
FileAutomation English Documentation
3+
====================================
4+
5+
.. toctree::
6+
:maxdepth: 4

docs/source/Zh/zh_index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
====================================
2+
FileAutomation 繁體中文 文件
3+
====================================
4+
5+
.. toctree::
6+
:maxdepth: 4

docs/source/conf.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
import os
14+
import sys
15+
16+
sys.path.insert(0, os.path.abspath('.'))
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'FileAutomation'
21+
copyright = '2020 ~ 2023, JE-Chen'
22+
author = 'JE-Chen'
23+
24+
# -- General configuration ---------------------------------------------------
25+
26+
# Add any Sphinx extension module names here, as strings. They can be
27+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
28+
# ones.
29+
extensions = [
30+
"sphinx.ext.autosectionlabel"
31+
]
32+
33+
# Add any paths that contain templates here, relative to this directory.
34+
templates_path = ['_templates']
35+
36+
# List of patterns, relative to source directory, that match files and
37+
# directories to ignore when looking for source files.
38+
# This pattern also affects html_static_path and html_extra_path.
39+
exclude_patterns = []
40+
41+
# -- Options for HTML output -------------------------------------------------
42+
43+
# The theme to use for HTML and HTML Help pages. See the documentation for
44+
# a list of builtin themes.
45+
#
46+
html_theme = 'sphinx_rtd_theme'
47+
48+
# Add any paths that contain custom static files (such as style sheets) here,
49+
# relative to this directory. They are copied after the builtin static files,
50+
# so a file named "default.css" will overwrite the builtin "default.css".
51+
html_static_path = ['_static']

docs/source/index.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FileAutomation
2+
----
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
8+
----
9+
10+
RoadMap
11+
12+
----
13+
14+
* Project Kanban
15+
* https://github.com/orgs/Integration-Automation/projects/2/views/1
16+
17+
----

file_automation/__init__.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1+
from file_automation.local.dir.dir_process import copy_dir, rename_dir, create_dir, remove_dir_tree
12
from file_automation.local.file.file_process import copy_file, remove_file, rename_file, copy_specify_extension_file, \
23
copy_all_file_to_dir
3-
from file_automation.local.dir.dir_process import copy_dir, rename_dir, create_dir, remove_dir_tree
44
from file_automation.local.zip.zip_process import zip_dir, zip_file, zip_info, zip_file_info, set_zip_password, \
55
read_zip_file, unzip_file, unzip_all
6-
6+
from file_automation.remote.google_drive.delete.delete_manager import drive_delete_file
7+
from file_automation.remote.google_drive.dir.folder_manager import drive_add_folder
8+
from file_automation.remote.google_drive.download.download_file import drive_download_file, \
9+
drive_download_file_from_folder
710
from file_automation.remote.google_drive.driver_instance import driver_instance
811
from file_automation.remote.google_drive.search.search_drive import \
912
drive_search_all_file, drive_search_field, drive_search_file_mimetype
10-
from file_automation.remote.google_drive.upload.upload_to_driver import \
11-
drive_upload_dir_to_folder, drive_upload_to_folder, drive_upload_dir_to_drive, drive_upload_to_drive
12-
from file_automation.remote.google_drive.dir.folder_manager import drive_add_folder
1313
from file_automation.remote.google_drive.share.share_file import \
1414
drive_share_file_to_anyone, drive_share_file_to_domain, drive_share_file_to_user
15-
from file_automation.remote.google_drive.delete.delete_manager import drive_delete_file
16-
from file_automation.remote.google_drive.download.download_file import drive_download_file, drive_download_file_from_folder
15+
from file_automation.remote.google_drive.upload.upload_to_driver import \
16+
drive_upload_dir_to_folder, drive_upload_to_folder, drive_upload_dir_to_drive, drive_upload_to_drive
1717
from file_automation.utils.executor.action_executor import execute_action, execute_files, add_command_to_executor
18-
from file_automation.utils.json.json_file import read_action_json
1918
from file_automation.utils.file_process.get_dir_file_list import get_dir_files_as_list
19+
from file_automation.utils.json.json_file import read_action_json
20+
from file_automation.utils.project.create_project_structure import create_project_dir
21+
2022
__all__ = [
2123
"copy_file", "rename_file", "remove_file", "copy_all_file_to_dir", "copy_specify_extension_file",
2224
"copy_dir", "create_dir", "remove_dir_tree", "zip_dir", "zip_file", "zip_info",
@@ -25,5 +27,5 @@
2527
"drive_upload_dir_to_folder", "drive_upload_to_folder", "drive_upload_dir_to_drive", "drive_upload_to_drive",
2628
"drive_add_folder", "drive_share_file_to_anyone", "drive_share_file_to_domain", "drive_share_file_to_user",
2729
"drive_delete_file", "drive_download_file", "drive_download_file_from_folder", "execute_action", "execute_files",
28-
"add_command_to_executor", "read_action_json", "get_dir_files_as_list"
30+
"add_command_to_executor", "read_action_json", "get_dir_files_as_list", "create_project_dir"
2931
]

0 commit comments

Comments
 (0)