%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
|[](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
|[](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
|[](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