diary

command module
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

README

diary

Text file based diary command.

Usage

Text file based diary command

Usage:
  diary [command]

Available Commands:
  help         Help about any command
  list         Show file list
  open         Open file
  self-update  Self update

Flags:
      --config string   config file (default is $HOME/.config/diary/config.toml)
  -h, --help            help for diary
  -t, --toggle          Help message for toggle
  -v, --version         version for diary

Installation

You can download binary from release page.

Configuration

Placeholder

file template

  • {{ .Date }}

command

  • {{ .BaseDir }}
  • {{ .File }}
  • {{ .Pattern }}
Sample
# $HOME/.config/diary/config.toml

base_directory = "/home/longkey1/Dropbox/Documents/Diary"
date_format = "2006/01/02"
file_name_format = "2006-01-02.md"
file_template = "# 2006-01-02\n"
open_command = "vim {{ .File }}"
list_command = "ranger {{ .BaseDir }}"
find_command = "selected=$(pt \"{{ .Pattern }}\" \"{{ .BaseDir }}\" | fzf --query \"$LBUFFER\" | awk -F : '{print \"-c \" $2 \" \" $1}'); [[ -n ${selected} ]] && echo $selected || true"
save_command = "git commit -m \"Auto commit by diary command\""

file_name or file_template are using golang's time format.

Documentation

Overview

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL