groupme的grep

grepme的Python项目详细描述


格雷姆

GREP代表GROUPME

Build Status

对于用户

安装

  1. pip install grepme
  2. https://dev.groupme.com/applications->;创建应用程序上创建登录令牌 grepme中没有使用任何信息,您可以给出垃圾值。
  3. 运行grepme。应该提示您输入登录令牌。

如果您键入的令牌不正确,可以使用-D,grepme将再次提示您, 例如grepme -D some_text

示例

  • 搜索“school”时不区分大小写:grepme -i school
  • 在其他组中搜索:grepme --group USCCyber api
  • 显示组的整个历史记录:grepme '.*'
  • 按日期筛选:grepme -d '.*' | grep 2018
  • 按用户搜索:grepme -u Joshua '.*'
  • 显示所有可用组:grepme -l
  • 显示版本:grepme -V

行动起来

$ ./grepme.py -i swear --group 'ACM$'
Huиter Damroи: I work in the IBM building but I can meet you at Swearingen or anywhere.
Matthew Clapp: Is anybody in Swearingen?
ℬℜΔƉѰ: Can someone confirm that the Airport monitors in Swearingen have a Code-a-thon announcement?
Justin Baum: Hey does anyone know who I should email so my Carolina Card can get me into Swearingen?
^C

完全使用

usage: grepme.py [-h] [-g GROUP] [-l] [-q] [-d] [-i] [-a AFTER_CONTEXT]
                 [-b BEFORE_CONTEXT] [-c CONTEXT] [--color] [--no-color]
                 [-u USER] [-f] [-F] [-o] [-v] [-V] [-D]
                 text [text ...]

grep for groupme, version 1.0.0

positional arguments:
  text                  text to search

optional arguments:
  -h, --help            show this help message and exit
  -g GROUP, --group GROUP
                        group to search. can be specified multiple times
  -l, --list            show all available groups and exit
  -q, --quiet           don't show who said something
  -d, --date            show the date a message was sent
  -i, --ignore-case     ignore case distinctions in both text and groups
  -a AFTER_CONTEXT, -A AFTER_CONTEXT, --after-context AFTER_CONTEXT
                        show the following n messages after a match
  -b BEFORE_CONTEXT, -B BEFORE_CONTEXT, --before-context BEFORE_CONTEXT
                        show the previous n messages before a match
  -c CONTEXT, -C CONTEXT, --context CONTEXT
                        show n messages around a match. overrides -A and -B.
  --color               always color output
  --no-color            never color output
  -u USER, --user USER  search by username. can be specified multiple times
  -f, --favorited, --liked
                        only show liked messages
  -F, --not-favorited, --not-liked
                        never show liked messages
  -o, --only-matching   only show text that matched, not the whole message
  -v, --reverse-matching
                        only show messages that didn't match
  -V, --version         show version
  -D, --delete-cached   delete cached credentials. useful if you mistype in
                        the inital login prompt

请注意,group默认为“^acm$”。 Unicode处理得很好,请参见下文。

对于开发人员

测试

  1. pip install -r dev-requirements.txt
  2. pytest

如果你看到任何测试失败,这是一个错误!请告诉我:https://github.com/jyn514/GrepMe/issues 如果你有更多的测试建议,也欢迎。

贡献

分叉存储库,进行一些更改,发出一个请求。 注意:脚本test/pre-commit将在任何提交时运行。 您可能需要自己自动运行它:ln -s ../test/pre-commit .git/hooks

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

推荐PyPI第三方库


热门话题
java Admob初始化失败,应用程序在启动时崩溃,即使没有错误   java如何在ibatis中使用存储过程?   java干净体系结构:在不同的环境中分离IO和核心。jar文件   Java streams compare属性在两个列表之间相等,并返回true或false   有没有一种压缩Java Try-Catch块的方法?   Android片段中的java Mapbox SDK   用于IzPack安装的JavaFX本机启动器:控制InnoSetup/WiX/RPMBuild行为   java接口是否可以将一个已经实例化的对象作为属性?   hashmap中的java线程问题   请求中的java字符编码。getRemoteUser()   java将OneTONE链接更改为另一个id为的实体   java当使用javaw启动应用程序时,不会执行关闭钩子。exe   Android java代码更改显示的微调器   java GZIP解压字符串和字节转换   运行springbatch后java LDAP运行状况检查失败