From 635bd52e81d84819fcf35bc8d1eb5c797f088006 Mon Sep 17 00:00:00 2001 From: LogCreative Date: Thu, 11 Jul 2024 23:53:16 +0800 Subject: [PATCH] docs: add short comments for usage --- deploy/gunicorn-deploy.py | 6 ++++++ docs/build.lua | 2 +- docs/pgfplotsedt.tex | 2 ++ ppedt_server.py | 7 +++++++ ppedt_server_llm.py | 7 +++++++ 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/deploy/gunicorn-deploy.py b/deploy/gunicorn-deploy.py index b2cc395..55fe37b 100644 --- a/deploy/gunicorn-deploy.py +++ b/deploy/gunicorn-deploy.py @@ -9,6 +9,12 @@ # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. +# Method: Deployment compilation +# Usage: +# 1. Meet system requirements: macOS or Linux Operating Systems, TeX Distribution (TeX Live/MiKTeX/MacTeX) and Python 3.6+ with flask and gunicorn packages. +# 2. Run this script by `python gunicorn-deploy.py`. +# See the documentation https://github.com/LogCreative/PGFPlotsEdt/blob/master/docs/README.md#deployment-compilation for details. + import multiprocessing from pathlib import Path import os diff --git a/docs/build.lua b/docs/build.lua index d39c756..8c9f2ba 100644 --- a/docs/build.lua +++ b/docs/build.lua @@ -1,6 +1,6 @@ #!/usr/bin/env texlua -- typeset the documentation for a certain language: --- PPEDT_LANG=chs l3build doc +-- `PPEDT_LANG=chs l3build doc` -- You need to rename the file manually. -- Please typeset the English documentation in the last run. diff --git a/docs/pgfplotsedt.tex b/docs/pgfplotsedt.tex index 4f7b62e..8ac4460 100644 --- a/docs/pgfplotsedt.tex +++ b/docs/pgfplotsedt.tex @@ -1,4 +1,6 @@ % ! TeX program = lualatex +% Use `l3build doc` to compile the documentation. +% Set the environment variable PPEDT_LANG to choose the language to compile. \documentclass{l3doc} diff --git a/ppedt_server.py b/ppedt_server.py index 0bcd4fb..f6e026c 100644 --- a/ppedt_server.py +++ b/ppedt_server.py @@ -9,6 +9,13 @@ # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. +# Method: Open locally +# Usage: +# 1. Meet system requirements: TeX Distribution (TeX Live/MiKTeX/MacTeX) and Python 3.6+ with flask package. +# 2. Run this script by `python ppedt_server.py` +# 3. Open your browser and visit `http://127.0.0.1:5678/`. Terminate the server by `Ctrl+C`. +# See the documentation https://github.com/LogCreative/PGFPlotsEdt/blob/master/docs/README.md#open-locally for details. + import os import shutil import subprocess diff --git a/ppedt_server_llm.py b/ppedt_server_llm.py index 093470e..abe1a15 100644 --- a/ppedt_server_llm.py +++ b/ppedt_server_llm.py @@ -9,6 +9,13 @@ # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. +# Method: PGFPlotsEdt with LLM +# Usage: +# 1. Meet system requirements: GPU with 6GB VRAM, TeX Distribution (TeX Live/MiKTeX/MacTeX) and Anaconda. +# 2. Create the conda environment by `conda env update -n ppedt -f ppedt_server_llm.yml`. +# 3. Activate the conda environment: `conda activate ppedt`. +# 4. Run: `python ppedt_server_llm.py`. +# See the documentation https://github.com/LogCreative/PGFPlotsEdt/blob/master/docs/README.md#pgfplots-with-llm for details. import os import shutil