tipset是一个关于linux下各种技巧的小型工具的集合。
tipset的Python项目详细描述
酒糟
简介
tipset是一个关于linux下各种技巧的小型工具的集合。在
安装
从pip安装
# pip install tipset
从源代码安装
# git clone https://github.com/liangxiao1/tipset.git# cd tipset# python3 setup.py install
从源代码构建wheel并安装它
^{pr2}$公共新车pypi(仅供维修人员使用)
# python3 -m twine upload dist/*
好好享受吧
目前包括4个实用程序(默认为/usr/local/bin下)。
tipsearch:linux下的一系列提示,通过示例了解命令的用法,而不是手动查找。
json_解析器:将json转换为yaml或纯文本。
aws_amis_search:搜索并删除所有地区的aws amis状态,并检查是否支持这些状态。
aws_instance_search:按keyname/tag搜索并删除所有支持区域中的aws运行实例
tipsearch用法
下面是一个从主题中搜索sed示例的简单示例。在
$ tipsearch -k sed -f subject INFO:Run in mode: keywords:sed fields: subject tipids: None sum_only: False INFO:Loading baseline data file from /home/xiliang/p3_venv/lib/python3.6/site-packages/tipset/data/tips_data.json INFO:--------------------------------------------------------------------------- INFO:tipid:tip_61 subject:sed examples INFO:step:sed -i "97d;98d" /tmp/1 (delete line 97, 98) INFO:step:sed -n '22,30p' /tmp/2 (display 22~30 line) INFO:step:sed -i "/foos/d" /tmp/1 (find and delete the match line) INFO:step:sed -i '1s/^/add to new top line\n/' /tmp/1 (add new line at top) INFO:step:sed -i 's/\(^.*100.*$\)///\1/' /tmp/1 (insert \\ at the head of matched line) INFO:step:sed -i 's/^foo/#comment out as bug 1464851\n&/g' /tmp/1 (add one line before matched) INFO:step:sed -e 's/^foo.*/report/g' /tmp/1 (replace entire line with other) INFO:step:sed '1!G;h;$!d' /tmp/2 (revers file line, move top to down) INFO:tags:bash, sed INFO:comments: INFO:link: INFO:Total found: 1
json_解析器用法
请参阅json_解析器帮助指南。在
安装的文件
所有测试文件都位于“tipset”目录中。在
$ pip3 show -f tipset
Name: tipset
Version: 0.0.1
Summary: tipset is a colletion of mini tools.
Home-page: https://github.com/liangxiao1/tipset
Author: Xiao Liang
Author-email: xiliang@redhat.com
License: GPLv3+
Location: /home/xiliang/p3_venv/lib/python3.6/site-packages
Requires: argparse
Required-by:
Files:
../../../bin/json_parser
../../../bin/tipsearch
tipsearch/__init__.py
tipsearch/data/tips_data.json
tipsearch/tipsearch.py
tipset/__init__.py
tipset/data/tips_data.json
tipset/json_parser.py
tipset/tipsearch.py
贡献
欢迎您创建拉取请求或提出问题。在
- 项目
标签: