diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-29 09:43:01 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-29 09:43:01 +0000 |
commit | d4f2f8105c3a210584e235d929f7dd8fdc5af158 (patch) | |
tree | 83b0db11ba0a30ea443c579efc8721dd69df2a11 | |
parent | 4c84a176099fcd1a823698b74a954673a7581b3a (diff) |
automatic import of python-foliant
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-foliant.spec | 384 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 386 insertions, 0 deletions
@@ -0,0 +1 @@ +/foliant-1.0.13.tar.gz diff --git a/python-foliant.spec b/python-foliant.spec new file mode 100644 index 0000000..a47a1e3 --- /dev/null +++ b/python-foliant.spec @@ -0,0 +1,384 @@ +%global _empty_manifest_terminate_build 0 +Name: python-foliant +Version: 1.0.13 +Release: 1 +Summary: Modular, Markdown-based documentation generator that makes pdf, docx, html, and more. +License: MIT +URL: https://foliant-docs.github.io/docs/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/74/0c/1969f5a038b7932da04417dc844180322d4aa2f396466d7f2492a85364c9/foliant-1.0.13.tar.gz +BuildArch: noarch + +Requires: python3-pyyaml +Requires: python3-cliar +Requires: python3-prompt_toolkit + +%description +[](https://pypi.org/project/foliant/) +[](https://travis-ci.org/foliant-docs/foliant) +[](https://codecov.io/gh/foliant-docs/foliant) + + + +# Foliant + +Foliant is an all-in-one single-source documentation authoring tool. It lets you produce standalone documents in **pdf** and **docx**, build **static websites** and upload pages to **Confluence**, all from single Markdown source. + +Foliant is a higher order tool, which means it uses other programs to do its job. For building pdf and docx, it can use [Pandoc](https://pandoc.org/) or [md-to-pdf](https://github.com/simonhaenisch/md-to-pdf), for websites [MkDocs](https://www.mkdocs.org/), [Aglio](https://github.com/danielgtaylor/aglio) or [Slate](https://github.com/slatedocs/slate). + +Foliant preprocessors let you reuse parts of your documents, show and hide content with flags, render diagrams from text, and much more. + +Foliant is highly extensible, so if it lacks some functions or output formats you can always make a plugin for it or request one from our team. + +[Foliant Documentation](https://foliant-docs.github.io/docs/) website. + +## Installation + +Foliant is written in Python and requires Python 3.6. + +To install Foliant, use pip: + +```shell +$ pip install foliant +``` + +Backends, extensions, and preprocessors are installed with pip as well. For the Quickstart, you'll need the [MkDocs backend](https://github.com/foliant-docs/foliantcontrib.mkdocs) and [init CLI extension](https://github.com/foliant-docs/foliantcontrib.init): + +```shell +$ pip install foliantcontrib.mkdocs foliantcontrib.init +``` + +To build pdf and docx, install the [Pandoc backend](https://github.com/foliant-docs/foliantcontrib.pandoc): + +```shell +$ pip install foliantcontrib.pandoc +``` + + +## Quickstart + +1. Create a new project: + +```shell +$ foliant init +Enter the project name: Hello Foliant +✓ Generating Foliant project +───────────────────── +Project "Hello Foliant" created in /path/to/hello-foliant +``` + +This command creates a basic Foliant project: + +``` +hello-foliant/ +├── foliant.yml +└── src + └── index.md + +1 directory, 2 files +``` + +`foliant.yml` is the project config file, `src` is the directory that contains the project source files (initially, just one file `index.md`). + +2. Build a website from the newly created project: + +```shell +$ foliant make site -p hello-foliant/ +✓ Parsing config +✓ Applying preprocessor mkdocs +✓ Making site with MkDocs +───────────────────── +Result: Hello_Foliant-0.1.0-2017-11-24.mkdocs +``` + +3. Run a local webserver in the site directory and see the site in your browser: + +```shell +$ cd Hello_Foliant-0.1.0-2017-11-24.mkdocs +$ python -m http.server +Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... +``` + +4. Build a standalone pdf document from the project: + +```shell +$ foliant make pdf -p hello-foliant/ +✓ Parsing config +✓ Applying preprocessor mkdocs +✓ Making pdf with Pandoc +───────────────────── +Result: Hello_Foliant-0.1.0-2017-11-24.pdf +``` + +> **Important** +> +> To produce pdf, Pandoc first converts Markdown to tex and then coverts it to pdf. To convert pdf > from tex, you need to have a LaTeX distribution installed: +> +> - [MacTeX](http://tug.org/mactex/) for macOS +> - [MikTeX](https://miktex.org/) for Windows +> - [TeXLive](https://tug.org/texlive/) for Linux + + +%package -n python3-foliant +Summary: Modular, Markdown-based documentation generator that makes pdf, docx, html, and more. +Provides: python-foliant +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-foliant +[](https://pypi.org/project/foliant/) +[](https://travis-ci.org/foliant-docs/foliant) +[](https://codecov.io/gh/foliant-docs/foliant) + + + +# Foliant + +Foliant is an all-in-one single-source documentation authoring tool. It lets you produce standalone documents in **pdf** and **docx**, build **static websites** and upload pages to **Confluence**, all from single Markdown source. + +Foliant is a higher order tool, which means it uses other programs to do its job. For building pdf and docx, it can use [Pandoc](https://pandoc.org/) or [md-to-pdf](https://github.com/simonhaenisch/md-to-pdf), for websites [MkDocs](https://www.mkdocs.org/), [Aglio](https://github.com/danielgtaylor/aglio) or [Slate](https://github.com/slatedocs/slate). + +Foliant preprocessors let you reuse parts of your documents, show and hide content with flags, render diagrams from text, and much more. + +Foliant is highly extensible, so if it lacks some functions or output formats you can always make a plugin for it or request one from our team. + +[Foliant Documentation](https://foliant-docs.github.io/docs/) website. + +## Installation + +Foliant is written in Python and requires Python 3.6. + +To install Foliant, use pip: + +```shell +$ pip install foliant +``` + +Backends, extensions, and preprocessors are installed with pip as well. For the Quickstart, you'll need the [MkDocs backend](https://github.com/foliant-docs/foliantcontrib.mkdocs) and [init CLI extension](https://github.com/foliant-docs/foliantcontrib.init): + +```shell +$ pip install foliantcontrib.mkdocs foliantcontrib.init +``` + +To build pdf and docx, install the [Pandoc backend](https://github.com/foliant-docs/foliantcontrib.pandoc): + +```shell +$ pip install foliantcontrib.pandoc +``` + + +## Quickstart + +1. Create a new project: + +```shell +$ foliant init +Enter the project name: Hello Foliant +✓ Generating Foliant project +───────────────────── +Project "Hello Foliant" created in /path/to/hello-foliant +``` + +This command creates a basic Foliant project: + +``` +hello-foliant/ +├── foliant.yml +└── src + └── index.md + +1 directory, 2 files +``` + +`foliant.yml` is the project config file, `src` is the directory that contains the project source files (initially, just one file `index.md`). + +2. Build a website from the newly created project: + +```shell +$ foliant make site -p hello-foliant/ +✓ Parsing config +✓ Applying preprocessor mkdocs +✓ Making site with MkDocs +───────────────────── +Result: Hello_Foliant-0.1.0-2017-11-24.mkdocs +``` + +3. Run a local webserver in the site directory and see the site in your browser: + +```shell +$ cd Hello_Foliant-0.1.0-2017-11-24.mkdocs +$ python -m http.server +Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... +``` + +4. Build a standalone pdf document from the project: + +```shell +$ foliant make pdf -p hello-foliant/ +✓ Parsing config +✓ Applying preprocessor mkdocs +✓ Making pdf with Pandoc +───────────────────── +Result: Hello_Foliant-0.1.0-2017-11-24.pdf +``` + +> **Important** +> +> To produce pdf, Pandoc first converts Markdown to tex and then coverts it to pdf. To convert pdf > from tex, you need to have a LaTeX distribution installed: +> +> - [MacTeX](http://tug.org/mactex/) for macOS +> - [MikTeX](https://miktex.org/) for Windows +> - [TeXLive](https://tug.org/texlive/) for Linux + + +%package help +Summary: Development documents and examples for foliant +Provides: python3-foliant-doc +%description help +[](https://pypi.org/project/foliant/) +[](https://travis-ci.org/foliant-docs/foliant) +[](https://codecov.io/gh/foliant-docs/foliant) + + + +# Foliant + +Foliant is an all-in-one single-source documentation authoring tool. It lets you produce standalone documents in **pdf** and **docx**, build **static websites** and upload pages to **Confluence**, all from single Markdown source. + +Foliant is a higher order tool, which means it uses other programs to do its job. For building pdf and docx, it can use [Pandoc](https://pandoc.org/) or [md-to-pdf](https://github.com/simonhaenisch/md-to-pdf), for websites [MkDocs](https://www.mkdocs.org/), [Aglio](https://github.com/danielgtaylor/aglio) or [Slate](https://github.com/slatedocs/slate). + +Foliant preprocessors let you reuse parts of your documents, show and hide content with flags, render diagrams from text, and much more. + +Foliant is highly extensible, so if it lacks some functions or output formats you can always make a plugin for it or request one from our team. + +[Foliant Documentation](https://foliant-docs.github.io/docs/) website. + +## Installation + +Foliant is written in Python and requires Python 3.6. + +To install Foliant, use pip: + +```shell +$ pip install foliant +``` + +Backends, extensions, and preprocessors are installed with pip as well. For the Quickstart, you'll need the [MkDocs backend](https://github.com/foliant-docs/foliantcontrib.mkdocs) and [init CLI extension](https://github.com/foliant-docs/foliantcontrib.init): + +```shell +$ pip install foliantcontrib.mkdocs foliantcontrib.init +``` + +To build pdf and docx, install the [Pandoc backend](https://github.com/foliant-docs/foliantcontrib.pandoc): + +```shell +$ pip install foliantcontrib.pandoc +``` + + +## Quickstart + +1. Create a new project: + +```shell +$ foliant init +Enter the project name: Hello Foliant +✓ Generating Foliant project +───────────────────── +Project "Hello Foliant" created in /path/to/hello-foliant +``` + +This command creates a basic Foliant project: + +``` +hello-foliant/ +├── foliant.yml +└── src + └── index.md + +1 directory, 2 files +``` + +`foliant.yml` is the project config file, `src` is the directory that contains the project source files (initially, just one file `index.md`). + +2. Build a website from the newly created project: + +```shell +$ foliant make site -p hello-foliant/ +✓ Parsing config +✓ Applying preprocessor mkdocs +✓ Making site with MkDocs +───────────────────── +Result: Hello_Foliant-0.1.0-2017-11-24.mkdocs +``` + +3. Run a local webserver in the site directory and see the site in your browser: + +```shell +$ cd Hello_Foliant-0.1.0-2017-11-24.mkdocs +$ python -m http.server +Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... +``` + +4. Build a standalone pdf document from the project: + +```shell +$ foliant make pdf -p hello-foliant/ +✓ Parsing config +✓ Applying preprocessor mkdocs +✓ Making pdf with Pandoc +───────────────────── +Result: Hello_Foliant-0.1.0-2017-11-24.pdf +``` + +> **Important** +> +> To produce pdf, Pandoc first converts Markdown to tex and then coverts it to pdf. To convert pdf > from tex, you need to have a LaTeX distribution installed: +> +> - [MacTeX](http://tug.org/mactex/) for macOS +> - [MikTeX](https://miktex.org/) for Windows +> - [TeXLive](https://tug.org/texlive/) for Linux + + +%prep +%autosetup -n foliant-1.0.13 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-foliant -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.13-1 +- Package Spec generated @@ -0,0 +1 @@ +3bc421b7b1c1b18a1024276406d5a5e2 foliant-1.0.13.tar.gz |