Skip to content

Commit 02cc6e7

Browse files
committed
linux test passed
1 parent d86bfb3 commit 02cc6e7

File tree

6 files changed

+93
-30
lines changed

6 files changed

+93
-30
lines changed

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.formatting.provider": "yapf"
3+
}

README.md

+28-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,36 @@ RTPY
44

55
RTPY is an intuitive and effective CLI framework which is scalable and practical.
66

7-
The most common use case might be an alternative of Python's `argparser`,
8-
however it's so easy for RTPY user to extend shell commands.(**For example, I just implemented
7+
The most common use case might be an alternative of Python's `argparser`.
8+
9+
however it's natural for RTPY users to extend shell commands.(**For example, I just implemented
910
`autojump` in 2 hours and a half. I spent so long for I'm so sleepy in the mid-night :)**)
1011

12+
Install & Run Rush
13+
--------------------
14+
15+
```
16+
pip install -U Redy rbnf rtpy
17+
```
18+
19+
Additionally, **RUSH** is a terminal implemented by `rtpy` which currently supports some *NIX commands like `cd`, `ls`, `echo`,
20+
and some interesting plugins written in pure **rtpy** api like `autojump`. After installing `rtpy`, you can try **RUSH**
21+
by typing `rush`.
22+
23+
```shell
24+
25+
[ruiko@localhost rtpy]$ rush
26+
wd: /home/ruiko/rtpy
27+
rush> ls --help
28+
ls
29+
- suffix(positional or keyword arg) = None : a filename suffix to apply filtering. default to perform no filtering.
30+
- r(keyword only) = False : is recursive
31+
32+
wd: /home/ruiko/rtpy
33+
34+
```
35+
36+
1137
As New Argument Parser
1238
----------------------------------
1339

README.rst

+33-6
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,36 @@ RTPY is an intuitive and effective CLI framework which is scalable and
55
practical.
66

77
The most common use case might be an alternative of Python's
8-
``argparser``, however it's so easy for RTPY user to extend shell
9-
commands.(\ **For example, I just implemented ``autojump`` in 2 hours
10-
and a half. I spent so long for I'm so sleepy in the mid-night :)**)
8+
``argparser``.
9+
10+
however it's natural for RTPY users to extend shell commands.(\ **For
11+
example, I just implemented ``autojump`` in 2 hours and a half. I spent
12+
so long for I'm so sleepy in the mid-night :)**)
13+
14+
Install & Run Rush
15+
------------------
16+
17+
::
18+
19+
pip install -U Redy rbnf rtpy
20+
21+
Additionally, **RUSH** is a terminal implemented by ``rtpy`` which
22+
currently supports some \*NIX commands like ``cd``, ``ls``, ``echo``,
23+
and some interesting plugins written in pure **rtpy** api like
24+
``autojump``. After installing ``rtpy``, you can try **RUSH** by typing
25+
``rush``.
26+
27+
.. code:: shell
28+
29+
30+
[ruiko@localhost rtpy]$ rush
31+
wd: /home/ruiko/rtpy
32+
rush> ls --help
33+
ls
34+
- suffix(positional or keyword arg) = None : a filename suffix to apply filtering. default to perform no filtering.
35+
- r(keyword only) = False : is recursive
36+
37+
wd: /home/ruiko/rtpy
1138
1239
As New Argument Parser
1340
----------------------
@@ -105,7 +132,7 @@ expression.
105132

106133
The implementations are so trivial:
107134

108-
See ``rtpy.terminal.path``:
135+
See ``rtpy._terminal.path``:
109136

110137
.. code:: python
111138
@@ -145,6 +172,6 @@ Welcome to
145172
- Make interesting and powerful commands to ``rbnf/_terminal``.
146173

147174
.. |terminal_demo| image:: https://github.com/thautwarm/rtpy/blob/master/terminal_demo.jpg
148-
:target: https://github.com/thautwarm/rtpy/blob/master/terminal_demo.jpg
175+
:target: https://github.com/thautwarm/rtpy/blob/master/terminal_demo.jpg
149176
.. |autojump| image:: https://github.com/thautwarm/rtpy/blob/master/auto_jump.jpg
150-
:target: https://github.com/thautwarm/rtpy/blob/master/auto_jump.jpg
177+
:target: https://github.com/thautwarm/rtpy/blob/master/auto_jump.jpg

next_version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.5
1+
0.1.7

rtpy/terminal.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@
88
rtpy_config_dir.mkdir()
99
src_dir = Path(__file__).parent().into('_terminal')
1010
src_dir.move_to(rtpy_config_dir)
11-
os.rename(str(rtpy_config_dir.into('_terminal')), str(rtpy_config_dir.into('rtpy_terminal')))
11+
os.rename(
12+
str(rtpy_config_dir.into('_terminal')),
13+
str(rtpy_config_dir.into('rtpy_terminal')))
1214

1315
sys.path.append(str(rtpy_config_dir))
1416

1517
from rtpy_terminal.path import talking
18+
19+
20+
def main():
21+
talking.listen()

setup.py

+21-20
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,29 @@
99
version = Version(f.read().strip())
1010

1111
# @formatter:off
12-
setup(name='rtpy',
13-
version=str(version),
14-
keywords='CLI solution',
15-
description="effective and intuitive CLI framework",
16-
long_description=readme,
17-
license='MIT',
18-
url='https://github.com/thautwarm/rtpy',
19-
author='thautwarm',
20-
author_email='[email protected]',
21-
include_package_data=True,
22-
install_requires=['Redy', 'rbnf', 'readline', 'linq-t'],
23-
packages=['rtpy.cmd', 'rtpy.weapon', 'rtpy._terminal'],
24-
platforms='any',
25-
classifiers=[
26-
'Programming Language :: Python :: 3.6',
27-
'Programming Language :: Python :: 3.7',
28-
'Programming Language :: Python :: Implementation :: CPython'],
29-
zip_safe=False
30-
)
12+
setup(
13+
name='rtpy',
14+
version=str(version),
15+
keywords='CLI solution',
16+
description="effective and intuitive CLI framework",
17+
long_description=readme,
18+
license='MIT',
19+
url='https://github.com/thautwarm/rtpy',
20+
author='thautwarm',
21+
author_email='[email protected]',
22+
include_package_data=True,
23+
install_requires=['Redy', 'rbnf', 'readline', 'linq-t'],
24+
packages=['rtpy.cmd', 'rtpy.weapon', 'rtpy._terminal', 'rtpy'],
25+
entry_points={'console_scripts': ['rush=rtpy.terminal:main']},
26+
platforms='any',
27+
classifiers=[
28+
'Programming Language :: Python :: 3.6',
29+
'Programming Language :: Python :: 3.7',
30+
'Programming Language :: Python :: Implementation :: CPython'
31+
],
32+
zip_safe=False)
3133
# @formatter:on
3234

33-
3435
version.increment(version_number_idx=2, increment=1)
3536
if version[2] is 42:
3637
version.increment(version_number_idx=1, increment=1)

0 commit comments

Comments
 (0)