From 10bd50536aa40de7dbe235eac8cab7fae797048c Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 18 May 2023 03:44:28 +0000 Subject: automatic import of python-arg --- .gitignore | 1 + python-arg.spec | 435 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 437 insertions(+) create mode 100644 python-arg.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..5fda702 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/arg-0.0.1.tar.gz diff --git a/python-arg.spec b/python-arg.spec new file mode 100644 index 0000000..67133ec --- /dev/null +++ b/python-arg.spec @@ -0,0 +1,435 @@ +%global _empty_manifest_terminate_build 0 +Name: python-arg +Version: 0.0.1 +Release: 1 +Summary: Parse command line arguments made easier... +License: MIT License +URL: https://projects.abranhe.com/arg +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/09/1c/17c9b364125562788c4072d579be26848047f9f25b817e4f095e28fc4e49/arg-0.0.1.tar.gz +BuildArch: noarch + + +%description +

+ +
+
+
+ π˜Όπ™π™‚ + : Parse command line arguments made easier... +

+ +

+ + + + + + + + + + + + +

+ + +# Install + +``` +pip install arg +``` + +# Usage + +``` +$ python test.py ford -m mustang --year 2017 red +``` + +> *test.py* + +```py +import arg + +# argv without file name +print(arg()) +# => ['ford', '-m', 'mustang', '--year', '2017', 'red'] + +# argv +print(arg.v()) +# => ['test.py', 'ford', '-m', 'mustang', '--year', '2017', 'red'] + +# argc +print(arg.c()) +# => 7 + +# args as string +print(arg.s()) +# => test.py ford -m mustang --year 2017 red + +# file name +print(arg.fileName()) +# => test.py + +# argument at n +print(arg.at(2)) +# => -m + +``` + +# API + +### `arg()` + +> Return an array with the arguments without the file name + +**Return Type**: `list` + +### `.v()` + +> Return an array with all the arguments. (**arg.v** ~> argv *Argumet Vector*) + +**Return Type**: `list` + +### `.c()` + +> Return an array with all the arguments. (**arg.c** ~> argc *Argument Count*) + +**Return Type**: `int` + +### `.s()` + +> Return an string with all the arguments. (arg.s ~> Arguments to String) + +**Return Type**: `str` + +### `.fileName()` + +> Return an string with the name of the file + +**Return Type**: `str` + +### `.at(n)` + +> Return the value of the argument at value at **n** + +**Return Type**: `str` + +# Related + +- [**lupe**](https://github.com/abranhe/lupe): A better CLI Helper. + +# Team + +|[![Carlos Abraham Logo](https://avatars3.githubusercontent.com/u/21347264?s=50&v=4)](https://abranhe.com)| +| :-: | +| [Carlos Abraham](https://github.com/abranhe) | + +# License + +[MIT](https://github.com/abranhe/arg/blob/master/LICENSE) License Β© [Carlos Abraham](https://github.com/abranhe/) + + + + +%package -n python3-arg +Summary: Parse command line arguments made easier... +Provides: python-arg +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-arg +

+ +
+
+
+ π˜Όπ™π™‚ + : Parse command line arguments made easier... +

+ +

+ + + + + + + + + + + + +

+ + +# Install + +``` +pip install arg +``` + +# Usage + +``` +$ python test.py ford -m mustang --year 2017 red +``` + +> *test.py* + +```py +import arg + +# argv without file name +print(arg()) +# => ['ford', '-m', 'mustang', '--year', '2017', 'red'] + +# argv +print(arg.v()) +# => ['test.py', 'ford', '-m', 'mustang', '--year', '2017', 'red'] + +# argc +print(arg.c()) +# => 7 + +# args as string +print(arg.s()) +# => test.py ford -m mustang --year 2017 red + +# file name +print(arg.fileName()) +# => test.py + +# argument at n +print(arg.at(2)) +# => -m + +``` + +# API + +### `arg()` + +> Return an array with the arguments without the file name + +**Return Type**: `list` + +### `.v()` + +> Return an array with all the arguments. (**arg.v** ~> argv *Argumet Vector*) + +**Return Type**: `list` + +### `.c()` + +> Return an array with all the arguments. (**arg.c** ~> argc *Argument Count*) + +**Return Type**: `int` + +### `.s()` + +> Return an string with all the arguments. (arg.s ~> Arguments to String) + +**Return Type**: `str` + +### `.fileName()` + +> Return an string with the name of the file + +**Return Type**: `str` + +### `.at(n)` + +> Return the value of the argument at value at **n** + +**Return Type**: `str` + +# Related + +- [**lupe**](https://github.com/abranhe/lupe): A better CLI Helper. + +# Team + +|[![Carlos Abraham Logo](https://avatars3.githubusercontent.com/u/21347264?s=50&v=4)](https://abranhe.com)| +| :-: | +| [Carlos Abraham](https://github.com/abranhe) | + +# License + +[MIT](https://github.com/abranhe/arg/blob/master/LICENSE) License Β© [Carlos Abraham](https://github.com/abranhe/) + + + + +%package help +Summary: Development documents and examples for arg +Provides: python3-arg-doc +%description help +

+ +
+
+
+ π˜Όπ™π™‚ + : Parse command line arguments made easier... +

+ +

+ + + + + + + + + + + + +

+ + +# Install + +``` +pip install arg +``` + +# Usage + +``` +$ python test.py ford -m mustang --year 2017 red +``` + +> *test.py* + +```py +import arg + +# argv without file name +print(arg()) +# => ['ford', '-m', 'mustang', '--year', '2017', 'red'] + +# argv +print(arg.v()) +# => ['test.py', 'ford', '-m', 'mustang', '--year', '2017', 'red'] + +# argc +print(arg.c()) +# => 7 + +# args as string +print(arg.s()) +# => test.py ford -m mustang --year 2017 red + +# file name +print(arg.fileName()) +# => test.py + +# argument at n +print(arg.at(2)) +# => -m + +``` + +# API + +### `arg()` + +> Return an array with the arguments without the file name + +**Return Type**: `list` + +### `.v()` + +> Return an array with all the arguments. (**arg.v** ~> argv *Argumet Vector*) + +**Return Type**: `list` + +### `.c()` + +> Return an array with all the arguments. (**arg.c** ~> argc *Argument Count*) + +**Return Type**: `int` + +### `.s()` + +> Return an string with all the arguments. (arg.s ~> Arguments to String) + +**Return Type**: `str` + +### `.fileName()` + +> Return an string with the name of the file + +**Return Type**: `str` + +### `.at(n)` + +> Return the value of the argument at value at **n** + +**Return Type**: `str` + +# Related + +- [**lupe**](https://github.com/abranhe/lupe): A better CLI Helper. + +# Team + +|[![Carlos Abraham Logo](https://avatars3.githubusercontent.com/u/21347264?s=50&v=4)](https://abranhe.com)| +| :-: | +| [Carlos Abraham](https://github.com/abranhe) | + +# License + +[MIT](https://github.com/abranhe/arg/blob/master/LICENSE) License Β© [Carlos Abraham](https://github.com/abranhe/) + + + + +%prep +%autosetup -n arg-0.0.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-arg -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot - 0.0.1-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..1f132a1 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +c884314e163e2795a117cb81e150c6f8 arg-0.0.1.tar.gz -- cgit v1.2.3