未提供项目描述
项目描述
Pressoir CLI
安装
前置条件:Python3.8+
安装并激活虚拟环境
$ python3 -m venv venv
$ source venv/bin/activate
安装依赖项
$ make install
初始化书籍
例如
$ pressoir-cli init --repository-path=../fia --collection sp
或
$ pressoir-cli init --repository-path=../12-editionscritiques --collection pum
注意:如果目标不存在或没有textes
目录,将创建一个完整的书籍壳。
例如
$ mkdir livre-test
$ cd livre-test
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install pressoir-cli
$ pressoir-cli init --collection=sp
构建书籍
$ pressoir-cli build --repository-path=../fia-en
使用../fia-en
,这是书籍存储库的路径。
额外功能:可以传递特定的章节来仅重新构建它
$ pressoir-cli build --repository-path=../fia-en --chapter=chapter1
如果您是在本地/开发环境中,需要传递--local
选项,以便书籍的路径链接可以正常工作。
提供书籍
$ pressoir-cli serve --repository-path=../fia-en
使用../fia-en
,这是已构建书籍存储库的路径。
帮助
命令
usage: pressoir-cli [-h] ...
options:
-h, --help Show this help message and exit
Available commands:
version Return the current version of pressoir-cli.
init Initialize a new book to `repository_path` or current directory.
docs Generate documentation with pressoir-cli itself. #SoMeta
build Build a book from `repository_path` or current directory.
serve Serve an HTML book from `repository_path`/public or current
directory/public.
命令: init
usage: pressoir-cli init [-h] [--repository-path REPOSITORY_PATH]
[--collection {pum,sp}]
options:
-h, --help show this help message and exit
--repository-path REPOSITORY_PATH
Absolute or relative path to book’s sources (default:
current).
--collection {pum,sp}, -c {pum,sp}
Name of the collection (Presses Universitaires or
Sens-Public).
命令: docs
usage: pressoir-cli docs [-h] [--target-path TARGET_PATH]
options:
-h, --help show this help message and exit
--target-path TARGET_PATH
命令: build
usage: pressoir-cli build [-h] [--repository-path REPOSITORY_PATH]
[--target-path TARGET_PATH] [--chapter CHAPTER]
[--verbose]
options:
-h, --help show this help message and exit
--repository-path REPOSITORY_PATH
Absolute or relative path to book’s sources (default:
current).
--target-path TARGET_PATH
Where the book will be built (default:
`repository_path`/public).
--chapter CHAPTER, -c CHAPTER
Specify a given chapter id (e.g. `chapter1`).
--verbose, -v Display more informations during the build.
命令: serve
usage: pressoir-cli serve [-h] [--repository-path REPOSITORY_PATH]
[--port PORT]
options:
-h, --help show this help message and exit
--repository-path REPOSITORY_PATH
Absolute or relative path to book’s sources (default:
current).
--port PORT, -p PORT Port to serve the book from (default=8000)
项目详情
下载文件
下载适合您的平台的文件。如果您不确定选择哪个,请了解有关安装软件包的更多信息。
源分布
pressoir_cli-2.2.3.tar.gz (8.4 MB 查看散列)
构建分布
pressoir_cli-2.2.3-py3-none-any.whl (8.4 MB 查看散列)