https://github.com/pybites-open-source/pybites-tips
Little wrapper to query tips from the command line
https://github.com/pybites-open-source/pybites-tips
hacktoberfest
Last synced: 5 months ago
JSON representation
Little wrapper to query tips from the command line
- Host: GitHub
- URL: https://github.com/pybites-open-source/pybites-tips
- Owner: PyBites-Open-Source
- License: mit
- Created: 2020-08-18T17:58:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-16T15:40:49.000Z (over 3 years ago)
- Last Synced: 2025-09-24T22:22:40.552Z (5 months ago)
- Topics: hacktoberfest
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PyBites Tips CLI
A wrapper to read [PyBites Python tips](https://codechalleng.es/tips) from the command line.
## Installation
You can install _PyBites Tips CLI_ from [PyPI](https://pypi.org/project/pybites-tips/):
pip install pybites-tips
This tool uses Python 3.x
## Usage
PyBites Tips CLI is a command line application. There are two ways to run it:
1. Interactive mode:
$ pytip
Search tips (press 'q' to exit): functools
3 tips found
=== TIP 153 ===
Title: functools.partial
...
...
2. Search for tips from the command line using the `-s` flag:
$ pytip -s itertools
7 tips found
=== TIP 53 ===
Title: random.choice and itertools.product
Tip: #Python's random, range and itertools.product make it easy to simulate 5 dice rolls:
...
...
## Paging
If you want to _page_ through the results use the `-p` flag:
$ pytip -s itertools -p
7 tips found
Press any key to start paging them, then press 'q' to go to the next one ... or hit 'c' bail out:
...
<< resulting tips are paged (you see them one by one in your terminal) >>
You can also just pipe `pytip`'s output to `more`:
`pytip -s itertools|more`
---
Enjoy!