From d8c1a269416c5ffc610062db930f1d7be82ede5c Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 18 May 2023 06:55:25 +0000 Subject: automatic import of python-markdown-captions --- .gitignore | 1 + python-markdown-captions.spec | 327 ++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 329 insertions(+) create mode 100644 python-markdown-captions.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..f7e6767 100644 --- a/.gitignore +++ b/.gitignore @@ -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
+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 `
` with `
`. + +## Usage + +``` +pip install markdown-captions +``` + +``` python +md = markdown.Markdown( + extensions=[ + 'markdown_captions', + 'attr_list' # optional + ] +) +``` + +## Examples + +simple example +``` md +![caption](img.jpg) +![caption2](img2.jpg) +``` +``` html +

+

caption
+
caption2
+

+``` + +image title and class (with attr_list extension) +``` md +![caption](img.jpg "title"){: .class1 } +``` +``` html +
caption
+``` + +inline captioned images +``` md + +![caption](img.jpg){: .inline } +![caption2](img2.jpg){: .inline } +``` +``` html +

+

caption
+
caption2
+

+``` + +images with no alt text are not captioned +``` md +![](img.jpg) +``` +``` html + +``` + +referenced images, and shorthand references are also supported + +``` md +![caption][ref] +![caption2] + +[ref]: img.jpg +[caption2]: img2.jpg +``` + +``` html +

+

caption
+
caption2
+

+``` + + + + + +%package -n python3-markdown-captions +Summary: Turn markdown images into captioned images using
+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 `
` with `
`. + +## Usage + +``` +pip install markdown-captions +``` + +``` python +md = markdown.Markdown( + extensions=[ + 'markdown_captions', + 'attr_list' # optional + ] +) +``` + +## Examples + +simple example +``` md +![caption](img.jpg) +![caption2](img2.jpg) +``` +``` html +

+

caption
+
caption2
+

+``` + +image title and class (with attr_list extension) +``` md +![caption](img.jpg "title"){: .class1 } +``` +``` html +
caption
+``` + +inline captioned images +``` md + +![caption](img.jpg){: .inline } +![caption2](img2.jpg){: .inline } +``` +``` html +

+

caption
+
caption2
+

+``` + +images with no alt text are not captioned +``` md +![](img.jpg) +``` +``` html + +``` + +referenced images, and shorthand references are also supported + +``` md +![caption][ref] +![caption2] + +[ref]: img.jpg +[caption2]: img2.jpg +``` + +``` html +

+

caption
+
caption2
+

+``` + + + + + +%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 `
` with `
`. + +## Usage + +``` +pip install markdown-captions +``` + +``` python +md = markdown.Markdown( + extensions=[ + 'markdown_captions', + 'attr_list' # optional + ] +) +``` + +## Examples + +simple example +``` md +![caption](img.jpg) +![caption2](img2.jpg) +``` +``` html +

+

caption
+
caption2
+

+``` + +image title and class (with attr_list extension) +``` md +![caption](img.jpg "title"){: .class1 } +``` +``` html +
caption
+``` + +inline captioned images +``` md + +![caption](img.jpg){: .inline } +![caption2](img2.jpg){: .inline } +``` +``` html +

+

caption
+
caption2
+

+``` + +images with no alt text are not captioned +``` md +![](img.jpg) +``` +``` html + +``` + +referenced images, and shorthand references are also supported + +``` md +![caption][ref] +![caption2] + +[ref]: img.jpg +[caption2]: img2.jpg +``` + +``` html +

+

caption
+
caption2
+

+``` + + + + + +%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 - 2.1.2-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..91e57ec --- /dev/null +++ b/sources @@ -0,0 +1 @@ +d0d46de638e820fdd5d0522b68257960 markdown-captions-2.1.2.tar.gz -- cgit v1.2.3