%global _empty_manifest_terminate_build 0 Name: python-wikipedia Version: 1.4.0 Release: 1 Summary: Wikipedia API for Python License: MIT URL: https://github.com/goldsmith/Wikipedia Source0: https://mirrors.nju.edu.cn/pypi/web/packages/67/35/25e68fbc99e672127cc6fbb14b8ec1ba3dfef035bf1e4c90f78f24a80b7d/wikipedia-1.4.0.tar.gz BuildArch: noarch %description **Wikipedia** is a Python library that makes it easy to access and parse data from Wikipedia. Search Wikipedia, get article summaries, get data like links and images from a page, and more. Wikipedia wraps the `MediaWiki API `__ so you can focus on using Wikipedia data, not getting it. >>> import wikipedia >>> print wikipedia.summary("Wikipedia") # Wikipedia (/ˌwɪkɨˈpiːdiə/ or /ˌwɪkiˈpiːdiə/ WIK-i-PEE-dee-ə) is a collaboratively edited, multilingual, free Internet encyclopedia supported by the non-profit Wikimedia Foundation... >>> wikipedia.search("Barack") # [u'Barak (given name)', u'Barack Obama', u'Barack (brandy)', u'Presidency of Barack Obama', u'Family of Barack Obama', u'First inauguration of Barack Obama', u'Barack Obama presidential campaign, 2008', u'Barack Obama, Sr.', u'Barack Obama citizenship conspiracy theories', u'Presidential transition of Barack Obama'] >>> ny = wikipedia.page("New York") >>> ny.title # u'New York' >>> ny.url # u'http://en.wikipedia.org/wiki/New_York' >>> ny.content # u'New York is a state in the Northeastern region of the United States. New York is the 27th-most exten'... >>> ny.links[0] # u'1790 United States Census' >>> wikipedia.set_lang("fr") >>> wikipedia.summary("Facebook", sentences=1) # Facebook est un service de réseautage social en ligne sur Internet permettant d'y publier des informations (photographies, liens, textes, etc.) en contrôlant leur visibilité par différentes catégories de personnes. Note: this library was designed for ease of use and simplicity, not for advanced use. If you plan on doing serious scraping or automated requests, please use `Pywikipediabot `__ (or one of the other more advanced `Python MediaWiki API wrappers `__), which has a larger API, rate limiting, and other features so we can be considerate of the MediaWiki infrastructure. %package -n python3-wikipedia Summary: Wikipedia API for Python Provides: python-wikipedia BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-wikipedia **Wikipedia** is a Python library that makes it easy to access and parse data from Wikipedia. Search Wikipedia, get article summaries, get data like links and images from a page, and more. Wikipedia wraps the `MediaWiki API `__ so you can focus on using Wikipedia data, not getting it. >>> import wikipedia >>> print wikipedia.summary("Wikipedia") # Wikipedia (/ˌwɪkɨˈpiːdiə/ or /ˌwɪkiˈpiːdiə/ WIK-i-PEE-dee-ə) is a collaboratively edited, multilingual, free Internet encyclopedia supported by the non-profit Wikimedia Foundation... >>> wikipedia.search("Barack") # [u'Barak (given name)', u'Barack Obama', u'Barack (brandy)', u'Presidency of Barack Obama', u'Family of Barack Obama', u'First inauguration of Barack Obama', u'Barack Obama presidential campaign, 2008', u'Barack Obama, Sr.', u'Barack Obama citizenship conspiracy theories', u'Presidential transition of Barack Obama'] >>> ny = wikipedia.page("New York") >>> ny.title # u'New York' >>> ny.url # u'http://en.wikipedia.org/wiki/New_York' >>> ny.content # u'New York is a state in the Northeastern region of the United States. New York is the 27th-most exten'... >>> ny.links[0] # u'1790 United States Census' >>> wikipedia.set_lang("fr") >>> wikipedia.summary("Facebook", sentences=1) # Facebook est un service de réseautage social en ligne sur Internet permettant d'y publier des informations (photographies, liens, textes, etc.) en contrôlant leur visibilité par différentes catégories de personnes. Note: this library was designed for ease of use and simplicity, not for advanced use. If you plan on doing serious scraping or automated requests, please use `Pywikipediabot `__ (or one of the other more advanced `Python MediaWiki API wrappers `__), which has a larger API, rate limiting, and other features so we can be considerate of the MediaWiki infrastructure. %package help Summary: Development documents and examples for wikipedia Provides: python3-wikipedia-doc %description help **Wikipedia** is a Python library that makes it easy to access and parse data from Wikipedia. Search Wikipedia, get article summaries, get data like links and images from a page, and more. Wikipedia wraps the `MediaWiki API `__ so you can focus on using Wikipedia data, not getting it. >>> import wikipedia >>> print wikipedia.summary("Wikipedia") # Wikipedia (/ˌwɪkɨˈpiːdiə/ or /ˌwɪkiˈpiːdiə/ WIK-i-PEE-dee-ə) is a collaboratively edited, multilingual, free Internet encyclopedia supported by the non-profit Wikimedia Foundation... >>> wikipedia.search("Barack") # [u'Barak (given name)', u'Barack Obama', u'Barack (brandy)', u'Presidency of Barack Obama', u'Family of Barack Obama', u'First inauguration of Barack Obama', u'Barack Obama presidential campaign, 2008', u'Barack Obama, Sr.', u'Barack Obama citizenship conspiracy theories', u'Presidential transition of Barack Obama'] >>> ny = wikipedia.page("New York") >>> ny.title # u'New York' >>> ny.url # u'http://en.wikipedia.org/wiki/New_York' >>> ny.content # u'New York is a state in the Northeastern region of the United States. New York is the 27th-most exten'... >>> ny.links[0] # u'1790 United States Census' >>> wikipedia.set_lang("fr") >>> wikipedia.summary("Facebook", sentences=1) # Facebook est un service de réseautage social en ligne sur Internet permettant d'y publier des informations (photographies, liens, textes, etc.) en contrôlant leur visibilité par différentes catégories de personnes. Note: this library was designed for ease of use and simplicity, not for advanced use. If you plan on doing serious scraping or automated requests, please use `Pywikipediabot `__ (or one of the other more advanced `Python MediaWiki API wrappers `__), which has a larger API, rate limiting, and other features so we can be considerate of the MediaWiki infrastructure. %prep %autosetup -n wikipedia-1.4.0 %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-wikipedia -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Thu Mar 09 2023 Python_Bot - 1.4.0-1 - Package Spec generated