linux-command 0.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env python3
2
+ import argparse
3
+ import os
4
+
5
+ def main():
6
+ parser = argparse.ArgumentParser(description='')
7
+
8
+ parser.add_argument('command', type=str, help='Command to execute')
9
+ parser.add_argument('--key', type=str, default='', help='Keyword for the kill command')
10
+
11
+ args = parser.parse_args()
12
+
13
+ # `ls`
14
+ if args.command == 'ls-dir':
15
+ os.system('ls -lR | grep "^d" | wc -l')
16
+ if args.command == 'ls-file':
17
+ os.system('ls -l | grep "^-" | wc -l')
18
+ # `kill`
19
+ elif args.command == 'kill':
20
+ os.system('ps -ef | grep ' + args.key + ' | grep -v grep | cut -c 9-16 | xargs kill -9')
21
+
22
+ if __name__ == '__main__':
23
+ main()
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.1
2
+ Name: linux-command
3
+ Version: 0.0.0
4
+ Summary: A command line tool to perform custom tasks.
5
+ Home-page: https://github.com/yourusername/mycommand
6
+ Author: Mouxiao Huang
7
+ Author-email: huangmouxiao@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.6
12
+ Description-Content-Type: text/markdown
13
+
14
+ # linux-command: Linux Command
15
+
16
+ `linux-command` 是一个用于执行特定命令行任务的工具。
17
+
18
+ ## 安装
19
+
20
+ ```bash
21
+ pip install linux-command
22
+ ```
23
+
24
+ ## 使用
25
+
26
+ ```bash
27
+ cmd ls-dir
28
+ ```
@@ -0,0 +1,7 @@
1
+ linux_command/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ linux_command/linux_command.py,sha256=CF1dI0SoF4y7TYh7eDF-AUYoMcxPEBWjKmofwvfdXcU,668
3
+ linux_command-0.0.0.dist-info/METADATA,sha256=mH82EFZ_tfCZO2HE6d-GCuCijTa9rLALT7jcEh2Ofmk,621
4
+ linux_command-0.0.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
+ linux_command-0.0.0.dist-info/entry_points.txt,sha256=bTT1pRhPS1wbBoiE926XW4EO13Cv-LX2av4oT-Ii9MI,57
6
+ linux_command-0.0.0.dist-info/top_level.txt,sha256=JwKqjZl7zkbLtF-iXwStVQRA7actzXoAhkQ_0_b0aug,14
7
+ linux_command-0.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.38.4)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ cmd = linux_command.linux_command:main
@@ -0,0 +1 @@
1
+ linux_command