%global _empty_manifest_terminate_build 0 Name: python-html Version: 1.16 Release: 1 Summary: simple, elegant HTML, XHTML and XML generation License: UNKNOWN URL: http://pypi.python.org/pypi/html Source0: https://mirrors.nju.edu.cn/pypi/web/packages/4a/df/0e3d22d50ee43274eb5116f49972a164d853bb3ab305a69a0540b6292252/html-1.16.tar.gz BuildArch: noarch %description To construct HTML start with an instance of ``html.HTML()``. Add tags by accessing the tag's attribute on that object. For example: >>> from html import HTML >>> h = HTML() >>> h.p('Hello, world!') >>> print h # or print(h) in python 3+
Hello, world!
You may supply a tag name and some text contents when creating a HTML instance: >>> h = HTML('html', 'text') >>> print h text You may also append text content later using the tag's ``.text()`` method or using augmented addition ``+=``. Any HTML-specific characters (``<>&"``) in the text will be escaped for HTML safety as appropriate unless ``escape=False`` is passed. Each of the following examples uses a new ``HTML`` instance: >>> p = h.p('hello world!\n') >>> p.br >>> p.text('more → text', escape=False) >>> p += ' ... augmented' >>> h.p >>> print hhello, world!
more → text ... augmented
Note also that the top-level ``HTML`` object adds newlines between tags by default. Finally in the above you'll see an empty paragraph tag - tags with no contents get no closing tag. If the tag should have sub-tags you have two options. You may either add the sub-tags directly on the tag: >>> l = h.ol >>> l.li('item 1') >>> l.li.b('item 2 > 1') >>> print h
column 1 | column 2 |
column 1 | column 2 |
content
%package -n python3-html Summary: simple, elegant HTML, XHTML and XML generation Provides: python-html BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-html To construct HTML start with an instance of ``html.HTML()``. Add tags by accessing the tag's attribute on that object. For example: >>> from html import HTML >>> h = HTML() >>> h.p('Hello, world!') >>> print h # or print(h) in python 3+Hello, world!
You may supply a tag name and some text contents when creating a HTML instance: >>> h = HTML('html', 'text') >>> print h text You may also append text content later using the tag's ``.text()`` method or using augmented addition ``+=``. Any HTML-specific characters (``<>&"``) in the text will be escaped for HTML safety as appropriate unless ``escape=False`` is passed. Each of the following examples uses a new ``HTML`` instance: >>> p = h.p('hello world!\n') >>> p.br >>> p.text('more → text', escape=False) >>> p += ' ... augmented' >>> h.p >>> print hhello, world!
more → text ... augmented
Note also that the top-level ``HTML`` object adds newlines between tags by default. Finally in the above you'll see an empty paragraph tag - tags with no contents get no closing tag. If the tag should have sub-tags you have two options. You may either add the sub-tags directly on the tag: >>> l = h.ol >>> l.li('item 1') >>> l.li.b('item 2 > 1') >>> print h
column 1 | column 2 |
column 1 | column 2 |
content
%package help Summary: Development documents and examples for html Provides: python3-html-doc %description help To construct HTML start with an instance of ``html.HTML()``. Add tags by accessing the tag's attribute on that object. For example: >>> from html import HTML >>> h = HTML() >>> h.p('Hello, world!') >>> print h # or print(h) in python 3+Hello, world!
You may supply a tag name and some text contents when creating a HTML instance: >>> h = HTML('html', 'text') >>> print h text You may also append text content later using the tag's ``.text()`` method or using augmented addition ``+=``. Any HTML-specific characters (``<>&"``) in the text will be escaped for HTML safety as appropriate unless ``escape=False`` is passed. Each of the following examples uses a new ``HTML`` instance: >>> p = h.p('hello world!\n') >>> p.br >>> p.text('more → text', escape=False) >>> p += ' ... augmented' >>> h.p >>> print hhello, world!
more → text ... augmented
Note also that the top-level ``HTML`` object adds newlines between tags by default. Finally in the above you'll see an empty paragraph tag - tags with no contents get no closing tag. If the tag should have sub-tags you have two options. You may either add the sub-tags directly on the tag: >>> l = h.ol >>> l.li('item 1') >>> l.li.b('item 2 > 1') >>> print h
column 1 | column 2 |
column 1 | column 2 |
content
%prep %autosetup -n html-1.16 %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-html -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Apr 11 2023 Python_Bot