home

phonk

hi

Hi () is a tiny ephemeral journal concept. With every new day, the journal resets lol

ui.background(0, 0, 0)

const pad = n => ('' + n).padStart(2, '0')

function label (date) {
  const y = date.getFullYear()
  const m = pad(date.getMonth() + 1)
  const d = pad(date.getDate())
  return y + '-' + m + '-' + d
}

const date = label(new Date())
const file = date + '.txt'
const text = ui.addTextArea(0, 0, 1, .9)

text.onChange(e => fileio.saveTextToFile(e.text, file))
text.text(fileio.loadTextFromFile(file))

ui.toast(date)