tlid
Installation
pip install tlid
Usage:
import tlid
tlid_str = tlid.get_tlid()
print(tlid_str)
tlid_milli = tlid.get_milliseconds()
print(tlid_milli)
print(tlid.get_seconds())
print(tlid.get_minutes())
print(tlid.get_hour())
print(tlid.get_day())
print(tlid.get_month())
print(tlid.get_year())
print(tlid.has_tlid('Hello 210101010101 World'))
print(tlid.extract_tlid('Hello 210101010101 World'))
print(tlid.clean_tlid('Hello 210101010101 World'))
print(tlid.to_date('210101010101'))
# pytlid
`pytlid` is a command-line interface for generating time-based identifiers using the `tlid` Python package.
## Usage
To use `pytlid`, simply run the command followed by the desired time unit. The default time unit is minutes if no argument is provided.
```sh
pytlid [unit]
Here are the available units and their corresponding outputs:
h
: Current hour in YYMMDDHH formats
: Current seconds in YYMMDDHHMMSS formatms
: Current milliseconds in YYMMDDHHMMSSmmm formatm
: Current month in YYMM formatM
: Current month in YYMM format (same as m
)y
: Current year in YY formatd
: Current day in YYMMDD format
Examples
To get the current time in minutes:
pytlid
To get the current time in hours:
pytlid h
To get the current time in seconds:
pytlid s
For help:
pytlid --help
This will display the help message for the pytlid
command.