https://github.com/5ht2/snowflake-cli
Easily format Discord and Twitter Snowflakes.
https://github.com/5ht2/snowflake-cli
Last synced: 9 months ago
JSON representation
Easily format Discord and Twitter Snowflakes.
- Host: GitHub
- URL: https://github.com/5ht2/snowflake-cli
- Owner: 5HT2
- License: isc
- Created: 2024-01-02T02:04:14.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-29T14:31:28.000Z (over 2 years ago)
- Last Synced: 2025-03-17T08:21:27.560Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# snowflake-cli
Easily format Discord and Twitter Snowflakes.
### Usage
```bash
# Build project, or run `go build -o snowflake .`
make
# Format default
./snowflake 1191470808191737927
# 1704139177130 - 2024-01-01T20:59:37+01:00
# Format in a custom timezone
TZ=America/New_York ./snowflake -s 1191470808191737927 -f "%u - %p (East Coast)"
# 1704139177130 - 2024-01-01T14:59:37-05:00 (East Coast)
# Format custom output
./snowflake -s 1191470808191737927 -f "%u (%t:R) meow %%uwu%%"
# 1704139177130 () meow %uwu%
```
### Options
```bash
Usage of ./snowflake:
-f string
Format string, options: %u (unix ms), %p (RFC3339), %t (), %t:S () (default "%u - %p")
-s int
Snowflake to parse
-twitter
Set to parse Twitter snowflake instead of Discord
```
#### Custom Format
Please see the [Discord Timestamp Style docs](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) for more info on the `%t` and `%t:S` format.