diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-18 06:55:25 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-18 06:55:25 +0000 |
commit | d8c1a269416c5ffc610062db930f1d7be82ede5c (patch) | |
tree | 4bf079b01c1acab45cf093df0bb024d5b295740b | |
parent | e79df055236bb31fe2bc7ea524aa42351878e3b8 (diff) |
automatic import of python-markdown-captions
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-markdown-captions.spec | 327 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 329 insertions, 0 deletions
@@ -0,0 +1 @@ +/markdown-captions-2.1.2.tar.gz diff --git a/python-markdown-captions.spec b/python-markdown-captions.spec new file mode 100644 index 0000000..6632193 --- /dev/null +++ b/python-markdown-captions.spec @@ -0,0 +1,327 @@ +%global _empty_manifest_terminate_build 0 +Name: python-markdown-captions +Version: 2.1.2 +Release: 1 +Summary: Turn markdown images into captioned images using <figure> +License: GPL3 +URL: https://github.com/Evidlo/markdown_captions +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/81/1d/15ef64ed904c85d0520d632ec6844b7da886a45b0cb7970644be493181d0/markdown-captions-2.1.2.tar.gz +BuildArch: noarch + + +%description +# markdown-captions + +Converts images with alt text to `<figure>` with `<figcaption>`. + +## Usage + +``` +pip install markdown-captions +``` + +``` python +md = markdown.Markdown( + extensions=[ + 'markdown_captions', + 'attr_list' # optional + ] +) +``` + +## Examples + +simple example +``` md + + +``` +``` html +<p> + <figure><img src="img.jpg" /><figcaption>caption</figcaption></figure> + <figure><img src="img2.jpg" /><figcaption>caption2</figcaption></figure> +</p> +``` + +image title and class (with attr_list extension) +``` md +{: .class1 } +``` +``` html +<figure class="class1"><img src="img.jpg" title="title" /><figcaption>caption</figcaption></figure> +``` + +inline captioned images +``` md +<style> + .inline { + display: inline-block; + } +</style> +{: .inline } +{: .inline } +``` +``` html +<p> + <figure class="inline"><img src="img.jpg" /><figcaption>caption</figcaption></figure> + <figure class="inline"><img src="img2.jpg" /><figcaption>caption2</figcaption></figure> +</p> +``` + +images with no alt text are not captioned +``` md + +``` +``` html +<img src="img.jpg" /> +``` + +referenced images, and shorthand references are also supported + +``` md +![caption][ref] +![caption2] + +[ref]: img.jpg +[caption2]: img2.jpg +``` + +``` html +<p> + <figure><img src="img.jpg" /><figcaption>caption</figcaption></figure> + <figure><img src="img2.jpg" /><figcaption>caption2</figcaption></figure> +</p> +``` + + + + + +%package -n python3-markdown-captions +Summary: Turn markdown images into captioned images using <figure> +Provides: python-markdown-captions +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-markdown-captions +# markdown-captions + +Converts images with alt text to `<figure>` with `<figcaption>`. + +## Usage + +``` +pip install markdown-captions +``` + +``` python +md = markdown.Markdown( + extensions=[ + 'markdown_captions', + 'attr_list' # optional + ] +) +``` + +## Examples + +simple example +``` md + + +``` +``` html +<p> + <figure><img src="img.jpg" /><figcaption>caption</figcaption></figure> + <figure><img src="img2.jpg" /><figcaption>caption2</figcaption></figure> +</p> +``` + +image title and class (with attr_list extension) +``` md +{: .class1 } +``` +``` html +<figure class="class1"><img src="img.jpg" title="title" /><figcaption>caption</figcaption></figure> +``` + +inline captioned images +``` md +<style> + .inline { + display: inline-block; + } +</style> +{: .inline } +{: .inline } +``` +``` html +<p> + <figure class="inline"><img src="img.jpg" /><figcaption>caption</figcaption></figure> + <figure class="inline"><img src="img2.jpg" /><figcaption>caption2</figcaption></figure> +</p> +``` + +images with no alt text are not captioned +``` md + +``` +``` html +<img src="img.jpg" /> +``` + +referenced images, and shorthand references are also supported + +``` md +![caption][ref] +![caption2] + +[ref]: img.jpg +[caption2]: img2.jpg +``` + +``` html +<p> + <figure><img src="img.jpg" /><figcaption>caption</figcaption></figure> + <figure><img src="img2.jpg" /><figcaption>caption2</figcaption></figure> +</p> +``` + + + + + +%package help +Summary: Development documents and examples for markdown-captions +Provides: python3-markdown-captions-doc +%description help +# markdown-captions + +Converts images with alt text to `<figure>` with `<figcaption>`. + +## Usage + +``` +pip install markdown-captions +``` + +``` python +md = markdown.Markdown( + extensions=[ + 'markdown_captions', + 'attr_list' # optional + ] +) +``` + +## Examples + +simple example +``` md + + +``` +``` html +<p> + <figure><img src="img.jpg" /><figcaption>caption</figcaption></figure> + <figure><img src="img2.jpg" /><figcaption>caption2</figcaption></figure> +</p> +``` + +image title and class (with attr_list extension) +``` md +{: .class1 } +``` +``` html +<figure class="class1"><img src="img.jpg" title="title" /><figcaption>caption</figcaption></figure> +``` + +inline captioned images +``` md +<style> + .inline { + display: inline-block; + } +</style> +{: .inline } +{: .inline } +``` +``` html +<p> + <figure class="inline"><img src="img.jpg" /><figcaption>caption</figcaption></figure> + <figure class="inline"><img src="img2.jpg" /><figcaption>caption2</figcaption></figure> +</p> +``` + +images with no alt text are not captioned +``` md + +``` +``` html +<img src="img.jpg" /> +``` + +referenced images, and shorthand references are also supported + +``` md +![caption][ref] +![caption2] + +[ref]: img.jpg +[caption2]: img2.jpg +``` + +``` html +<p> + <figure><img src="img.jpg" /><figcaption>caption</figcaption></figure> + <figure><img src="img2.jpg" /><figcaption>caption2</figcaption></figure> +</p> +``` + + + + + +%prep +%autosetup -n markdown-captions-2.1.2 + +%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-markdown-captions -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 2.1.2-1 +- Package Spec generated @@ -0,0 +1 @@ +d0d46de638e820fdd5d0522b68257960 markdown-captions-2.1.2.tar.gz |