My common cli tool.
Project description
Ik-cli
Introduction
This application provides some common command line tools for me.
Install
You can use pip to install this tool.
pip install ik-cli
Usage
You can use main command to show all subcommands.
ik_cli -h
# the echo are:
Usage: ik_cli [OPTIONS] COMMAND [ARGS]...
Options:
-v, --verbose Enable verbose mode.
-h, --help Show this message and exit.
Commands:
ip get ip info
time timestamp convert
ip info
Now you can use ip subcommand to get point ip info from ip.sb.
ik_cli ip 8.8.8.8
# the echo is:
IP: 8.8.8.8
ASN: 15169
CONTINENT_CODE: NA
COUNTRY: United States
COUNTRY_CODE: US
LATITUDE: 37.751
LONGITUDE: -97.822
ORGANIZATION: Google LLC
TIMEZONE: America/Chicago
If you want get your host ip, you can do as follows:
ik_cli ip -m host
# echo
Your IP: 192.168.0.2
Method: UDP
time convert
Now you can change string time (like: 2019-8-1 or 2019-8-2 12.09.11) to timestamp.
Or change timestamp (like 1565007913) to string time.
Notice: the timezone depend on your machine's timezone.
ik_cli time '2019-08-05 13:14:11'
# echo
Timestamp: 1564982051
Time: 2019-08-05 13:14:11
ik_cli time 1564982100
# echo
Timestamp: 1564982100
Time: 2019-08-05 13:15:00
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ik-cli-0.1.6.tar.gz.
File metadata
- Download URL: ik-cli-0.1.6.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e2c0f3fc73578c75271e7bd811c8b92d956bcde4d755c3ffa87c7026583f3a9
|
|
| MD5 |
c10c52c590524f93f4bc2c293bdda92c
|
|
| BLAKE2b-256 |
8c76200f279a057384b5472e6a2845750da5f2a001ee3c4d56440312fa41db7e
|
File details
Details for the file ik_cli-0.1.6-py2.py3-none-any.whl.
File metadata
- Download URL: ik_cli-0.1.6-py2.py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3539080f7e0158f18d9345987c5a1f9ae907faba3ef90207756eec8d7712abca
|
|
| MD5 |
56ae2cdcd194385a1289c0248f7b98b3
|
|
| BLAKE2b-256 |
346a50aeb28b913b0f1618e4859d3eb0d0b60d1de4f7bb044d73512183c021e7
|