Skip to content

maraloon/pickdate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pickdate

fastly select date via vim-motions and print it to stdout

showcase

Install

arch linux:

yay -S install pickdate 

manualy:

git clone git@github.com:maraloon/pickdate.git
cd pickdate
go install

Usage idea

It's for what i develop this app. Terminal-based notes. Open (or create) file for selected date

#!/usr/bin/env sh
prev_selected_date=$(date +"%Y/%m/%d")
while true
do 
    selected_date=$(pickdate -m --start-at $prev_selected_date) || exit 1
    nvim "$HOME/diary/$selected_date.md" # opens diary/2025/01/15.md
    prev_selected_date=$selected_date # alows to stay in selected date after quit editor
done

usage

Flags

Usage: pickdate [OPTIONS]

Options:
  -f, --format string     Format of date output (default "yyyy/mm/dd")
  -h, --help              Help
  -m, --monday            Monday as first day of week
      --start-at string   Pointed date on enter (default today)
  -s, --sunday            Sunday as first day of week (default true)

--format values

You can use both left and right format types

Format Go Layout
yyyy/mm/dd 2006/01/02
Y/m/d 2006/01/02
yyyy-mm-dd 2006-01-02
Y-m-d 2006-01-02
F j, Y January 2, 2006
m/d/y 01/02/06
M-d-y Jan-02-06
l Monday
D Mon
d 02
j 2
F January
M Jan
m 01
n 1
Y 2006
y 06

TODO

  • Show today, style
  • Help menu
  • Jumps
    • Jump to today
    • Month jump
      • p, n
      • m[1-12]
    • Year jump
      • P, N
      • y[1-12]
    • Jump in line: 3l - 3 days later
    • Jump n month up/down: 3ml/3m - 3 month down
    • Jump lines: 2j - 2 weeks later
    • Jump to selected day: d[1-31]/31g/31<cr> will jump on 31th day of current month
  • Lists
    • Month list (M)
    • Year list (Y)
  • Views
    • Show 3 month view
    • Show full year view
  • Toggle fullsceen (WithAltScreen)
  • Center align
  • Toggle week start, monday or sunday
  • CLI opts
    • Week first day
    • Output date format
    • --start-at date
    • Fullscreen
  • AUR

Made with

Bubble Tea Title Treatment

About

date picker for your terminal

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages