summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-quill-delta.spec366
-rw-r--r--sources1
3 files changed, 368 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..aa9fb18 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/quill-delta-1.0.3.tar.gz
diff --git a/python-quill-delta.spec b/python-quill-delta.spec
new file mode 100644
index 0000000..2694f09
--- /dev/null
+++ b/python-quill-delta.spec
@@ -0,0 +1,366 @@
+%global _empty_manifest_terminate_build 0
+Name: python-quill-delta
+Version: 1.0.3
+Release: 1
+Summary: Python port of the quill.js delta library that enables operational transformation with aditional functionality for rendering html
+License: MIT
+URL: https://github.com/forgeworks/delta-py
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/48/d1/5e3baaef4b835c5fd435c2a78c120483e959d94d5a8bd51b5d9bbb0b9611/quill-delta-1.0.3.tar.gz
+BuildArch: noarch
+
+Requires: python3-diff-match-patch
+Requires: python3-lxml
+Requires: python3-cssutils
+
+%description
+
+# Delta (Python Port)
+
+Python port of the javascript Delta library for QuillJS: https://github.com/quilljs/delta
+
+Some basic pythonizing has been done, but mostly it works exactly like the above library.
+
+There is no other python specific documentation at this time, sorry. Please see the tests
+for reference examples.
+
+## Install with [Poetry](https://poetry.eustace.io/docs/#installation)
+
+With HTML rendering:
+
+ > poetry add -E html quill-delta
+
+Without HTML rendering:
+
+ > poetry add quill-delta
+
+## Install with pip
+
+Note: If you're using `zsh`, see below.
+
+With HTML rendering:
+
+ > pip install quill-delta[html]
+
+With HTML rendering (zsh):
+
+ > pip install quill-delta"[html]"
+
+Without HTML rendering:
+
+ > pip install quill-delta
+
+
+# Rendering HTML in Python
+
+This library includes a module `delta.html` that renders html from an operation list,
+allowing you to render Quill Delta operations in full from a Python server.
+
+For example:
+
+ from delta import html
+
+ ops = [
+ { "insert":"Quill\nEditor\n\n" },
+ { "insert": "bold",
+ "attributes": {"bold": True}},
+ { "insert":" and the " },
+ { "insert":"italic",
+ "attributes": { "italic": True }},
+ { "insert":"\n\nNormal\n" },
+ ]
+
+ html.render(ops)
+
+Result (line formatting added for readability):
+
+ <p>Quill</p>
+ <p>Editor</p>
+ <p><br></p>
+ <p><strong>bold</strong> and the <em>italic</em></p>
+ <p><br></p>
+ <p>Normal</p>
+
+[See test_html.py](tests/test_html.py) for more examples.
+
+
+# Developing
+
+## Setup
+If you'd to contribute to quill-delta-python, get started setting your development environment by running:
+
+Checkout the repository
+
+ > git clone https://github.com/forgeworks/quill-delta-python.git
+
+Make sure you have python 3 installed, e.g.,
+
+ > python --version
+
+From inside your new quill-delta-python directory:
+
+ > python3 -m venv env
+ > source env/bin/activate
+ > pip install poetry
+ > poetry install -E html
+
+## Tests
+To run tests do:
+
+ > py.test
+
+
+
+
+
+%package -n python3-quill-delta
+Summary: Python port of the quill.js delta library that enables operational transformation with aditional functionality for rendering html
+Provides: python-quill-delta
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-quill-delta
+
+# Delta (Python Port)
+
+Python port of the javascript Delta library for QuillJS: https://github.com/quilljs/delta
+
+Some basic pythonizing has been done, but mostly it works exactly like the above library.
+
+There is no other python specific documentation at this time, sorry. Please see the tests
+for reference examples.
+
+## Install with [Poetry](https://poetry.eustace.io/docs/#installation)
+
+With HTML rendering:
+
+ > poetry add -E html quill-delta
+
+Without HTML rendering:
+
+ > poetry add quill-delta
+
+## Install with pip
+
+Note: If you're using `zsh`, see below.
+
+With HTML rendering:
+
+ > pip install quill-delta[html]
+
+With HTML rendering (zsh):
+
+ > pip install quill-delta"[html]"
+
+Without HTML rendering:
+
+ > pip install quill-delta
+
+
+# Rendering HTML in Python
+
+This library includes a module `delta.html` that renders html from an operation list,
+allowing you to render Quill Delta operations in full from a Python server.
+
+For example:
+
+ from delta import html
+
+ ops = [
+ { "insert":"Quill\nEditor\n\n" },
+ { "insert": "bold",
+ "attributes": {"bold": True}},
+ { "insert":" and the " },
+ { "insert":"italic",
+ "attributes": { "italic": True }},
+ { "insert":"\n\nNormal\n" },
+ ]
+
+ html.render(ops)
+
+Result (line formatting added for readability):
+
+ <p>Quill</p>
+ <p>Editor</p>
+ <p><br></p>
+ <p><strong>bold</strong> and the <em>italic</em></p>
+ <p><br></p>
+ <p>Normal</p>
+
+[See test_html.py](tests/test_html.py) for more examples.
+
+
+# Developing
+
+## Setup
+If you'd to contribute to quill-delta-python, get started setting your development environment by running:
+
+Checkout the repository
+
+ > git clone https://github.com/forgeworks/quill-delta-python.git
+
+Make sure you have python 3 installed, e.g.,
+
+ > python --version
+
+From inside your new quill-delta-python directory:
+
+ > python3 -m venv env
+ > source env/bin/activate
+ > pip install poetry
+ > poetry install -E html
+
+## Tests
+To run tests do:
+
+ > py.test
+
+
+
+
+
+%package help
+Summary: Development documents and examples for quill-delta
+Provides: python3-quill-delta-doc
+%description help
+
+# Delta (Python Port)
+
+Python port of the javascript Delta library for QuillJS: https://github.com/quilljs/delta
+
+Some basic pythonizing has been done, but mostly it works exactly like the above library.
+
+There is no other python specific documentation at this time, sorry. Please see the tests
+for reference examples.
+
+## Install with [Poetry](https://poetry.eustace.io/docs/#installation)
+
+With HTML rendering:
+
+ > poetry add -E html quill-delta
+
+Without HTML rendering:
+
+ > poetry add quill-delta
+
+## Install with pip
+
+Note: If you're using `zsh`, see below.
+
+With HTML rendering:
+
+ > pip install quill-delta[html]
+
+With HTML rendering (zsh):
+
+ > pip install quill-delta"[html]"
+
+Without HTML rendering:
+
+ > pip install quill-delta
+
+
+# Rendering HTML in Python
+
+This library includes a module `delta.html` that renders html from an operation list,
+allowing you to render Quill Delta operations in full from a Python server.
+
+For example:
+
+ from delta import html
+
+ ops = [
+ { "insert":"Quill\nEditor\n\n" },
+ { "insert": "bold",
+ "attributes": {"bold": True}},
+ { "insert":" and the " },
+ { "insert":"italic",
+ "attributes": { "italic": True }},
+ { "insert":"\n\nNormal\n" },
+ ]
+
+ html.render(ops)
+
+Result (line formatting added for readability):
+
+ <p>Quill</p>
+ <p>Editor</p>
+ <p><br></p>
+ <p><strong>bold</strong> and the <em>italic</em></p>
+ <p><br></p>
+ <p>Normal</p>
+
+[See test_html.py](tests/test_html.py) for more examples.
+
+
+# Developing
+
+## Setup
+If you'd to contribute to quill-delta-python, get started setting your development environment by running:
+
+Checkout the repository
+
+ > git clone https://github.com/forgeworks/quill-delta-python.git
+
+Make sure you have python 3 installed, e.g.,
+
+ > python --version
+
+From inside your new quill-delta-python directory:
+
+ > python3 -m venv env
+ > source env/bin/activate
+ > pip install poetry
+ > poetry install -E html
+
+## Tests
+To run tests do:
+
+ > py.test
+
+
+
+
+
+%prep
+%autosetup -n quill-delta-1.0.3
+
+%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-quill-delta -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.3-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..f91baf9
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+518d02f0940c104470b8742e47ef71dd quill-delta-1.0.3.tar.gz