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 Spring启动启用HTTPS   actionscript 3 java中的这个[“var”+“name”]   java只匹配给定集合中一个字符的一个匹配项   java Hibernate:防止角色表中出现多个相同的条目   javajersey+Spring注入servlet请求   java HtmlEditor javafx失去焦点   java Apache Wicket AjaxRequestTarget ListView组件未刷新或更新   mysql java。无法将lang.String转换为java。sql。时间戳   java将巨大的整数文件(在一行中)拆分为具有内存限制的已排序块   安卓如何完全关闭proguard?   安装Eclipse和Android SDK后的java“无AVD可用”消息   java动态显示图像视图   java在Spring中还有哪些WebsocketClient实现?   java Glassfish需要很长时间才能重新启动   使用Java简单串行连接器将pc与arduino连接   java如何在camel文件组件配置中结合readLockCheckInterval和maxMessagesPerPoll?   单击Android时的java预览图像   java如何将字节数组转换为ByteArrayOutputStream