View Source Chr (CHR v0.2.1)

Chr module

Summary

Functions

return command history

pick up command from history record

pick up date from DateTime

pick up directory from history record

pick up time from DateTime

pick up date from history record

pick weekday from DateTime

timestamp to datetime

Functions

Link to this function

busiest_day(history_list)

View Source

busiest day

Link to this function

daily_activity(history_list)

View Source

Daily Activity

return command history

pick up command from history record

Examples

iex> Chr.pick_up_command(": 1707397937:0;cat ~/.zsh_history")
"cat"

iex> Chr.pick_up_command(": 1707397937:0;clear")
"clear"

pick up date from DateTime

Examples

iex> Chr.pick_up_date(~U[2021-03-31 00:00:00Z])
~D[2021-03-31]
Link to this function

pick_up_directory(string)

View Source

pick up directory from history record

Examples

iex> Chr.pick_up_directory(": 1707397937:0;cd ~/projects/chr")
"~/projects/chr"

pick up time from DateTime

Link to this function

pick_up_local_datetime(string)

View Source

pick up date from history record

Examples

iex> Chr.pick_up_local_datetime(": 1707397937:0;cat ~/.zsh_history")
~U[2024-02-08 22:12:17Z]
Link to this function

pick_up_weekday(datetime)

View Source

pick weekday from DateTime

Examples

iex> Chr.pick_up_weekday(~U[2021-03-31 00:00:00Z])
3
Link to this function

timestamp_to_datetime(timestamp)

View Source

timestamp to datetime

Examples

iex> Chr.timestamp_to_datetime("1617226800")
~U[2021-03-31 21:40:00Z]
@spec timezone_offset() :: integer()
Link to this function

top_commands(history_list)

View Source

top commands

Link to this function

top_directories(history_list)

View Source

top directories

Link to this function

weekly_activity(history_list)

View Source

Weekly Activity