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

贡献

欢迎您创建拉取请求或提出问题。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何将cassandra中的行数据转换为与列相关的嵌套json   java如何使用jcr XPath在jcr:content/@jcr:data中搜索?   java在使用openCV进行安卓开发时如何利用手机的广角镜头   java解析扩展了接口,结束了一个潜在的无限循环   位置服务的@Override方法中存在java Android应用程序错误   java本地线程的用途和需求是什么   具有左右子访问的java节点树遍历   java验证JsonWebToken签名   JUL日志处理程序中的java日志记录   嵌入式Java读取给定时间段的串行数据。   java有没有办法从多个URL获取多个图像?   java线程通过等待intent阻止自己发送intent   java Spring MVC解析多部分内容请求   java JPA/Hibernate静态元模型属性未填充NullPointerException   java格式错误的字符(需要引号,得到I)~正在处理   java为什么PrintWriter对象抛出FileNotFoundException?   java Neo4j未正确保存标签   java IE不加载图像