From ce392aadf70a4fd1104180c4e8fcba4e281e20f9 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 10 May 2023 08:40:35 +0000 Subject: automatic import of python-texsoup --- .gitignore | 1 + python-texsoup.spec | 369 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 371 insertions(+) create mode 100644 python-texsoup.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..a73978e 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/TexSoup-0.3.1.tar.gz diff --git a/python-texsoup.spec b/python-texsoup.spec new file mode 100644 index 0000000..3aae01e --- /dev/null +++ b/python-texsoup.spec @@ -0,0 +1,369 @@ +%global _empty_manifest_terminate_build 0 +Name: python-TexSoup +Version: 0.3.1 +Release: 1 +Summary: parses valid LaTeX and provides variety of Beautiful-Soup-esque methods and Pythonic idioms for iterating over and searching the parse tree +License: BSD +URL: https://github.com/alvinwan/TexSoup +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/84/58/1c503390ed1a81cdcbff811dbf7a54132994acef8dd2194d55cf657a9e97/TexSoup-0.3.1.tar.gz +BuildArch: noarch + + +%description + + +# [TexSoup](https://texsoup.alvinwan.com) + +[![PyPi Downloads per Day](https://img.shields.io/pypi/dm/texsoup.svg)](https://pypi.python.org/pypi/TexSoup/) +[![Build Status](https://travis-ci.org/alvinwan/TexSoup.svg?branch=master)](https://travis-ci.org/alvinwan/TexSoup) +[![Coverage Status](https://coveralls.io/repos/github/alvinwan/TexSoup/badge.svg?branch=master)](https://coveralls.io/github/alvinwan/TexSoup?branch=master) + +TexSoup is a fault-tolerant, Python3 package for searching, navigating, and modifying LaTeX documents. + +- [Getting Started](https://github.com/alvinwan/TexSoup#Getting-Started) +- [Installation](https://github.com/alvinwan/TexSoup#Installation) +- [API Reference](http://texsoup.alvinwan.com/docs/data.html) + +Created by [Alvin Wan](http://alvinwan.com) + [contributors](https://github.com/alvinwan/TexSoup/graphs/contributors). + +# Getting Started + +To parse a $LaTeX$ document, pass an open filehandle or a string into the +`TexSoup` constructor. + +``` python +from TexSoup import TexSoup +soup = TexSoup(""" +\begin{document} + +\section{Hello \textit{world}.} + +\subsection{Watermelon} + +(n.) A sacred fruit. Also known as: + +\begin{itemize} +\item red lemon +\item life +\end{itemize} + +Here is the prevalence of each synonym. + +\begin{tabular}{c c} +red lemon & uncommon \\ +life & common +\end{tabular} + +\end{document} +""") +``` + +With the soupified $\LaTeX$, you can now search and traverse the document tree. +The code below demonstrates the basic functions that TexSoup provides. + +```python +>>> soup.section # grabs the first `section` +\section{Hello \textit{world}.} +>>> soup.section.name +'section' +>>> soup.section.string +'Hello \\textit{world}.' +>>> soup.section.parent.name +'document' +>>> soup.tabular +\begin{tabular}{c c} +red lemon & uncommon \\ +life & common +\end{tabular} +>>> soup.tabular.args[0] +'c c' +>>> soup.item +\item red lemon +>>> list(soup.find_all('item')) +[\item red lemon, \item life] +``` + +For more use cases, see [the Quickstart Guide](https://texsoup.alvinwan.com/docs/quickstart.html). Or, try TexSoup [online, via repl.it →](https://repl.it/@ALVINWAN1/texsoup) + +Links: + +- [Quickstart Guide: how and when to use TexSoup](http://texsoup.alvinwan.com/docs/quickstart.html) +- [Example Use Cases: counting references, resolving imports, and more](https://github.com/alvinwan/TexSoup/tree/master/examples) + +# Installation + +## Pip + +TexSoup is published via PyPi, so you can install it via `pip`. The package +name is `TexSoup`: + +```bash +$ pip install texsoup +``` + +## From source + +Alternatively, you can install the package from source: + +```bash +$ git clone https://github.com/alvinwan/TexSoup.git +$ cd TexSoup +$ pip install . +``` + +%package -n python3-TexSoup +Summary: parses valid LaTeX and provides variety of Beautiful-Soup-esque methods and Pythonic idioms for iterating over and searching the parse tree +Provides: python-TexSoup +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-TexSoup + + +# [TexSoup](https://texsoup.alvinwan.com) + +[![PyPi Downloads per Day](https://img.shields.io/pypi/dm/texsoup.svg)](https://pypi.python.org/pypi/TexSoup/) +[![Build Status](https://travis-ci.org/alvinwan/TexSoup.svg?branch=master)](https://travis-ci.org/alvinwan/TexSoup) +[![Coverage Status](https://coveralls.io/repos/github/alvinwan/TexSoup/badge.svg?branch=master)](https://coveralls.io/github/alvinwan/TexSoup?branch=master) + +TexSoup is a fault-tolerant, Python3 package for searching, navigating, and modifying LaTeX documents. + +- [Getting Started](https://github.com/alvinwan/TexSoup#Getting-Started) +- [Installation](https://github.com/alvinwan/TexSoup#Installation) +- [API Reference](http://texsoup.alvinwan.com/docs/data.html) + +Created by [Alvin Wan](http://alvinwan.com) + [contributors](https://github.com/alvinwan/TexSoup/graphs/contributors). + +# Getting Started + +To parse a $LaTeX$ document, pass an open filehandle or a string into the +`TexSoup` constructor. + +``` python +from TexSoup import TexSoup +soup = TexSoup(""" +\begin{document} + +\section{Hello \textit{world}.} + +\subsection{Watermelon} + +(n.) A sacred fruit. Also known as: + +\begin{itemize} +\item red lemon +\item life +\end{itemize} + +Here is the prevalence of each synonym. + +\begin{tabular}{c c} +red lemon & uncommon \\ +life & common +\end{tabular} + +\end{document} +""") +``` + +With the soupified $\LaTeX$, you can now search and traverse the document tree. +The code below demonstrates the basic functions that TexSoup provides. + +```python +>>> soup.section # grabs the first `section` +\section{Hello \textit{world}.} +>>> soup.section.name +'section' +>>> soup.section.string +'Hello \\textit{world}.' +>>> soup.section.parent.name +'document' +>>> soup.tabular +\begin{tabular}{c c} +red lemon & uncommon \\ +life & common +\end{tabular} +>>> soup.tabular.args[0] +'c c' +>>> soup.item +\item red lemon +>>> list(soup.find_all('item')) +[\item red lemon, \item life] +``` + +For more use cases, see [the Quickstart Guide](https://texsoup.alvinwan.com/docs/quickstart.html). Or, try TexSoup [online, via repl.it →](https://repl.it/@ALVINWAN1/texsoup) + +Links: + +- [Quickstart Guide: how and when to use TexSoup](http://texsoup.alvinwan.com/docs/quickstart.html) +- [Example Use Cases: counting references, resolving imports, and more](https://github.com/alvinwan/TexSoup/tree/master/examples) + +# Installation + +## Pip + +TexSoup is published via PyPi, so you can install it via `pip`. The package +name is `TexSoup`: + +```bash +$ pip install texsoup +``` + +## From source + +Alternatively, you can install the package from source: + +```bash +$ git clone https://github.com/alvinwan/TexSoup.git +$ cd TexSoup +$ pip install . +``` + +%package help +Summary: Development documents and examples for TexSoup +Provides: python3-TexSoup-doc +%description help + + +# [TexSoup](https://texsoup.alvinwan.com) + +[![PyPi Downloads per Day](https://img.shields.io/pypi/dm/texsoup.svg)](https://pypi.python.org/pypi/TexSoup/) +[![Build Status](https://travis-ci.org/alvinwan/TexSoup.svg?branch=master)](https://travis-ci.org/alvinwan/TexSoup) +[![Coverage Status](https://coveralls.io/repos/github/alvinwan/TexSoup/badge.svg?branch=master)](https://coveralls.io/github/alvinwan/TexSoup?branch=master) + +TexSoup is a fault-tolerant, Python3 package for searching, navigating, and modifying LaTeX documents. + +- [Getting Started](https://github.com/alvinwan/TexSoup#Getting-Started) +- [Installation](https://github.com/alvinwan/TexSoup#Installation) +- [API Reference](http://texsoup.alvinwan.com/docs/data.html) + +Created by [Alvin Wan](http://alvinwan.com) + [contributors](https://github.com/alvinwan/TexSoup/graphs/contributors). + +# Getting Started + +To parse a $LaTeX$ document, pass an open filehandle or a string into the +`TexSoup` constructor. + +``` python +from TexSoup import TexSoup +soup = TexSoup(""" +\begin{document} + +\section{Hello \textit{world}.} + +\subsection{Watermelon} + +(n.) A sacred fruit. Also known as: + +\begin{itemize} +\item red lemon +\item life +\end{itemize} + +Here is the prevalence of each synonym. + +\begin{tabular}{c c} +red lemon & uncommon \\ +life & common +\end{tabular} + +\end{document} +""") +``` + +With the soupified $\LaTeX$, you can now search and traverse the document tree. +The code below demonstrates the basic functions that TexSoup provides. + +```python +>>> soup.section # grabs the first `section` +\section{Hello \textit{world}.} +>>> soup.section.name +'section' +>>> soup.section.string +'Hello \\textit{world}.' +>>> soup.section.parent.name +'document' +>>> soup.tabular +\begin{tabular}{c c} +red lemon & uncommon \\ +life & common +\end{tabular} +>>> soup.tabular.args[0] +'c c' +>>> soup.item +\item red lemon +>>> list(soup.find_all('item')) +[\item red lemon, \item life] +``` + +For more use cases, see [the Quickstart Guide](https://texsoup.alvinwan.com/docs/quickstart.html). Or, try TexSoup [online, via repl.it →](https://repl.it/@ALVINWAN1/texsoup) + +Links: + +- [Quickstart Guide: how and when to use TexSoup](http://texsoup.alvinwan.com/docs/quickstart.html) +- [Example Use Cases: counting references, resolving imports, and more](https://github.com/alvinwan/TexSoup/tree/master/examples) + +# Installation + +## Pip + +TexSoup is published via PyPi, so you can install it via `pip`. The package +name is `TexSoup`: + +```bash +$ pip install texsoup +``` + +## From source + +Alternatively, you can install the package from source: + +```bash +$ git clone https://github.com/alvinwan/TexSoup.git +$ cd TexSoup +$ pip install . +``` + +%prep +%autosetup -n TexSoup-0.3.1 + +%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-TexSoup -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 10 2023 Python_Bot - 0.3.1-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..e8d66c7 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +2130d0ed9648cbe0da1d6d15c6a2ce65 TexSoup-0.3.1.tar.gz -- cgit v1.2.3