Categorygithub.com/komem3/go-diary
modulepackage
1.4.1
Repository: https://github.com/komem3/go-diary.git
Documentation: pkg.go.dev

# README

Go-diary

CircleCI

Go-diary is a tool for managing diaries.

Contents

Usage

Install

Install with go tool

go get github.com/komem3/go-diary/cmd/diary

Target File

Target diary file is YYYYMMDD*.*.

  • good example: 20200102.md, 19990912_test.md, 19990912.txt
  • bad example: diary_20111102.md, 202011.md

Sample Case

$ pwd
${GOPATH}/src/github.com/komem3/diary/sample

$ tree
.
├── 20021201.md
├── 20200101.md
└── 20200102.txt

$ diary init
$ ls
20021201.md  20200101.md  20200102.txt template

$ diary format
$ tree
.
├── 2002
│   └── 12
│       └── 20021201.md
├── 2020
│   ├── 01
│   │   ├── 20200101.md
│   │   └── 20200102.txt
│   └── 02
│       └── 20200202.org
├── README.md
└── template
    ├── diary.template.md
    └── top.template.md

$ diary new
$ ls
2002  2020  20200531.md  README.md  template
$ cat 20200531.md
2020/05/31 (Sunday)

Template Variables

top.template.md

  • Base: Base path.
  • Years: Slice of year element.
    • Year
    • Months: Slice of month element.
      • Month
      • Days: Slice of day element.
        • Day
        • Path: Path from base.

diary.template.md

  • Year
  • Month
  • Day
  • Weekday

Licence

MIT

Author

komem3

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
DaySort specify day sort.
Initialize create template files.
MonthSort specify month sort.
NewCreator generate Creator.
NewFormatter generate Formatter.
No description provided by the author
YearSort specify year sort.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

Creator generate file.
No description provided by the author
Formatter is generator diary.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author