template / windows / files / default_config.go
Branch windows · default branch · all branches
default_config.go
74f1d4f2 2022-10-11 Pavel Safronov | 1 | package main |
| 2 | ||
| 3 | func defaultConfig() Config { | |
b0586433 2022-10-21 Pavel Safronov | 4 | config := Config{ |
74f1d4f2 2022-10-11 Pavel Safronov | 5 | Profiles: []Profile{ |
| 6 | { | |
| 7 | Name: "daily", | |
dd789946 2022-10-24 Pavel Safronov | 8 | Description: "Creates a MD file in ~/DailyNotes folder in the format YYYY-MM-DD[-vX].md", |
| 9 | Path: "~/DailyNotes", | |
74f1d4f2 2022-10-11 Pavel Safronov | 10 | Type: FileType, |
1a02ef4e 2022-10-21 Pavel Safronov | 11 | NamePatterns: []ParameterizedText{"{{.Year}}-{{.Month}}-{{.Day}}.md"}, |
b0586433 2022-10-21 Pavel Safronov | 12 | File: File{ |
687d5626 2022-10-28 Pavel Safronov | 13 | Template: `# {{.FileNameWithoutExtension}} |
74f1d4f2 2022-10-11 Pavel Safronov | 14 | |
687d5626 2022-10-28 Pavel Safronov | 15 | Today's notes for {{.Year}}-{{.Month}}-{{.Day}}. |
74f1d4f2 2022-10-11 Pavel Safronov | 16 | |
| 17 | ## Todo | |
| 18 | ||
1a02ef4e 2022-10-21 Pavel Safronov | 19 | 1. Check email |
| 20 | 2. Check chat | |
| 21 | 3. Check calendar | |
| 22 | 4. Check yesterday's notes | |
| 23 | 5. Have fun! | |
| 24 | 6. ADD MORE ITEMS HERE`, | |
b0586433 2022-10-21 Pavel Safronov | 25 | }, |
1a02ef4e 2022-10-21 Pavel Safronov | 26 | PostScripts: []ParameterizedText{ |
52e9ad7c 2022-11-08 Pavel Safronov | 27 | "code . {{ if .FullPath }}\"{{.FullPath}}\"{{else}}(ls -t | head -n1){{ end }}", |
74f1d4f2 2022-10-11 Pavel Safronov | 28 | }, |
687d5626 2022-10-28 Pavel Safronov | 29 | RunPostscriptOnFailure: true, |
74f1d4f2 2022-10-11 Pavel Safronov | 30 | }, |
| 31 | { | |
| 32 | Name: "note", | |
dd789946 2022-10-24 Pavel Safronov | 33 | Description: "Creates a MD file in ~/Notes in the format YYYY-MM-DD[-ProjectName][-vVersion].md", |
74f1d4f2 2022-10-11 Pavel Safronov | 34 | OS: "All", |
dd789946 2022-10-24 Pavel Safronov | 35 | Path: "~/Notes", |
74f1d4f2 2022-10-11 Pavel Safronov | 36 | Type: FileType, |
1a02ef4e 2022-10-21 Pavel Safronov | 37 | NamePatterns: []ParameterizedText{ |
74f1d4f2 2022-10-11 Pavel Safronov | 38 | "{{$version := getVersion}}" + |
| 39 | "{{.Year}}-{{.Month}}-{{.Day}}" + | |
| 40 | "{{if .ProjectName}}-{{.ProjectName}}{{end}}" + | |
| 41 | "{{if (gt $version 1)}}n{{$version}}{{end}}" + | |
| 42 | ".md", | |
| 43 | }, | |
1a02ef4e 2022-10-21 Pavel Safronov | 44 | PostScripts: []ParameterizedText{ |
687d5626 2022-10-28 Pavel Safronov | 45 | "code \"{{.FullPath}}\"", |
74f1d4f2 2022-10-11 Pavel Safronov | 46 | }, |
| 47 | }, | |
b1ded4b4 2022-10-30 Pavel Safronov | 48 | { |
| 49 | Name: "note-here", | |
| 50 | Description: "Creates a MD file in the current folder in the format YYYY-MM-DD[-HH[-MM[-SS]]][-ProjectName][-vVersion].md", | |
| 51 | OS: "All", | |
| 52 | Type: FileType, | |
| 53 | IsDefault: true, | |
8c15a714 2022-11-04 Pavel Safronov | 54 | Path: ".", // current folder |
b1ded4b4 2022-10-30 Pavel Safronov | 55 | NamePatterns: []ParameterizedText{ |
| 56 | "{{$version := getVersion}}" + | |
| 57 | "{{.Year}}-{{.Month}}-{{.Day}}" + | |
| 58 | "{{if .ProjectName}}-{{.ProjectName}}{{end}}" + | |
| 59 | "{{if (gt $version 1)}}n{{$version}}{{end}}" + | |
| 60 | ".md", | |
| 61 | "{{$version := getVersion}}" + | |
| 62 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}" + | |
| 63 | "{{if .ProjectName}}-{{.ProjectName}}{{end}}" + | |
| 64 | "{{if (gt $version 1)}}n{{$version}}{{end}}" + | |
| 65 | ".md", | |
| 66 | "{{$version := getVersion}}" + | |
| 67 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Second}}" + | |
| 68 | "{{if .ProjectName}}-{{.ProjectName}}{{end}}" + | |
| 69 | "{{if (gt $version 1)}}n{{$version}}{{end}}" + | |
| 70 | ".md", | |
| 71 | }, | |
| 72 | PostScripts: []ParameterizedText{ | |
| 73 | "code \"{{.FullPath}}\"", | |
| 74 | }, | |
| 75 | }, | |
74f1d4f2 2022-10-11 Pavel Safronov | 76 | { |
b0586433 2022-10-21 Pavel Safronov | 77 | Name: "blog", |
dd789946 2022-10-24 Pavel Safronov | 78 | Description: "Creates a MD file in the ~/Blog folder in the format YYYY-MM-DD[-ProjectName][-vVersion].md", |
b0586433 2022-10-21 Pavel Safronov | 79 | OS: "All", |
dd789946 2022-10-24 Pavel Safronov | 80 | Path: "~/Blog", |
b0586433 2022-10-21 Pavel Safronov | 81 | File: File{ |
4ded4215 2022-10-26 Pavel Safronov | 82 | Template: `# {{.ProjectName}} |
| 83 | ||
687d5626 2022-10-28 Pavel Safronov | 84 | Created by template, on {{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}-{{.Second}}. |
4ded4215 2022-10-26 Pavel Safronov | 85 | |
| 86 | ## Spelling | |
| 87 | ||
| 88 | cspell:words nanite | |
| 89 | ||
| 90 | ## Removed writing | |
| 91 | ||
| 92 | ## Writing | |
| 93 | `, | |
b0586433 2022-10-21 Pavel Safronov | 94 | }, |
| 95 | Type: FileType, | |
1a02ef4e 2022-10-21 Pavel Safronov | 96 | NamePatterns: []ParameterizedText{ |
74f1d4f2 2022-10-11 Pavel Safronov | 97 | "{{$version := getVersion}}" + |
| 98 | "{{.Year}}-{{.Month}}-{{.Day}}" + | |
| 99 | "{{if .ProjectName}}-{{.ProjectName}}{{end}}" + | |
| 100 | "{{if (gt $version 1)}}v{{$version}}{{end}}" + | |
| 101 | ".md", | |
| 102 | }, | |
1a02ef4e 2022-10-21 Pavel Safronov | 103 | PostScripts: []ParameterizedText{ |
687d5626 2022-10-28 Pavel Safronov | 104 | "code . \"{{.FileName}}\"", |
74f1d4f2 2022-10-11 Pavel Safronov | 105 | }, |
| 106 | }, | |
ae89a42a 2022-11-02 Pavel Safronov | 107 | { |
| 108 | Name: "work-win", | |
| 109 | Description: "Creates a folder in the c:/work folder in the format YYYY-MM-DD[-hh][-mm][-ss][-ProjectName]", | |
| 110 | OS: "Windows", | |
| 111 | Path: "C:/work", | |
| 112 | Type: FolderType, | |
| 113 | NamePatterns: []ParameterizedText{ | |
| 114 | "{{.Year}}-{{.Month}}-{{.Day}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
| 115 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
| 116 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
| 117 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}-{{.Second}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
| 118 | }, | |
| 119 | PostScripts: []ParameterizedText{ | |
| 120 | "explorer \"{{.Path}}\"", | |
| 121 | }, | |
| 122 | }, | |
ad5348d5 2022-10-21 Pavel Safronov | 123 | { |
| 124 | Name: "therapy", | |
dd789946 2022-10-24 Pavel Safronov | 125 | Description: "Creates a MD file in the ~/Therapy folder in the format YYYY-MM-DD[-vVersion].md", |
ad5348d5 2022-10-21 Pavel Safronov | 126 | OS: "All", |
dd789946 2022-10-24 Pavel Safronov | 127 | Path: "~/Therapy", |
b0586433 2022-10-21 Pavel Safronov | 128 | File: File{ |
8c15a714 2022-11-04 Pavel Safronov | 129 | Template: `# {{if .ProjectName}}{{.ProjectName}}{{else}}Therapy notes{{end}} |
ad5348d5 2022-10-21 Pavel Safronov | 130 | |
| 131 | {{if .ProjectName}}Therapy notes on {{.ProjectName}}{{else}}Therapy notes{{end}} | |
| 132 | ||
| 133 | ## Writing | |
| 134 | ||
| 135 | {{if .ProjectName}}Hello {{.ProjectName}},{{else}}Hello,{{end}} | |
| 136 | ||
| 137 | Start writing here... | |
| 138 | ||
| 139 | Sincerely, me | |
| 140 | `, | |
b0586433 2022-10-21 Pavel Safronov | 141 | }, |
ad5348d5 2022-10-21 Pavel Safronov | 142 | Type: FileType, |
1a02ef4e 2022-10-21 Pavel Safronov | 143 | NamePatterns: []ParameterizedText{ |
ad5348d5 2022-10-21 Pavel Safronov | 144 | "{{$version := getVersion}}" + |
| 145 | "{{.Year}}-{{.Month}}-{{.Day}}" + | |
| 146 | "{{if (gt $version 1)}}v{{$version}}{{end}}" + | |
| 147 | ".md", | |
| 148 | }, | |
1a02ef4e 2022-10-21 Pavel Safronov | 149 | PostScripts: []ParameterizedText{ |
52e9ad7c 2022-11-08 Pavel Safronov | 150 | "code . {{.FullPath}}", |
ad5348d5 2022-10-21 Pavel Safronov | 151 | }, |
| 152 | }, | |
74f1d4f2 2022-10-11 Pavel Safronov | 153 | { |
| 154 | Name: "work", | |
4709ec6b 2022-10-12 Pavel Safronov | 155 | Description: "Creates a folder in the ~/Work folder in the format YYYY-MM-DD[-hh][-mm][-ss][-ProjectName]", |
| 156 | Path: "~/Work", | |
74f1d4f2 2022-10-11 Pavel Safronov | 157 | Type: FolderType, |
1a02ef4e 2022-10-21 Pavel Safronov | 158 | NamePatterns: []ParameterizedText{ |
74f1d4f2 2022-10-11 Pavel Safronov | 159 | "{{.Year}}-{{.Month}}-{{.Day}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", |
| 160 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
| 161 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
| 162 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}-{{.Second}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
| 163 | }, | |
1a02ef4e 2022-10-21 Pavel Safronov | 164 | PostScripts: []ParameterizedText{ |
687d5626 2022-10-28 Pavel Safronov | 165 | "code .", |
| 166 | "chmod +x repro.sh", | |
74f1d4f2 2022-10-11 Pavel Safronov | 167 | }, |
5e7795dc 2022-10-21 Pavel Safronov | 168 | Files: []FileInFolder{ |
687d5626 2022-10-28 Pavel Safronov | 169 | { |
5e7795dc 2022-10-21 Pavel Safronov | 170 | File: File{ |
| 171 | Template: `# {{.ProjectName}} | |
| 172 | ||
| 173 | Work notes on {{.ProjectName}} | |
| 174 | `, | |
| 175 | }, | |
| 176 | Name: "README.md", | |
| 177 | }, | |
687d5626 2022-10-28 Pavel Safronov | 178 | { |
| 179 | File: File{ | |
| 180 | Template: `clear | |
| 181 | ||
| 182 | echo "Let's test {{.ProjectName}}!"`, | |
| 183 | }, | |
| 184 | Name: "repro.sh", | |
| 185 | }, | |
5e424f1b 2022-11-12 Pavel Safronov | 186 | { |
| 187 | File: File{ | |
| 188 | Template: `{ | |
| 189 | "version": "0.2.0", | |
| 190 | "configurations": [ | |
| 191 | { | |
| 192 | "type": "bashdb", | |
| 193 | "request": "launch", | |
| 194 | "name": "Debug repo.sh", | |
| 195 | "cwd": "${workspaceFolder}", | |
| 196 | "program": "${workspaceFolder}/repro.sh", | |
| 197 | "terminalKind": "integrated" | |
| 198 | } | |
| 199 | ] | |
| 200 | } | |
| 201 | `, | |
| 202 | }, | |
| 203 | Name: ".vscode/launch.json", | |
| 204 | }, | |
5e7795dc 2022-10-21 Pavel Safronov | 205 | }, |
74f1d4f2 2022-10-11 Pavel Safronov | 206 | }, |
| 207 | { | |
| 208 | Name: "folder", | |
| 209 | Description: "Creates a folder in the current folder in the format YYYY-MM-DD[-ProjectName][-vVersion]", | |
| 210 | Type: FolderType, | |
8c15a714 2022-11-04 Pavel Safronov | 211 | Path: ".", // current folder |
1a02ef4e 2022-10-21 Pavel Safronov | 212 | PostScripts: []ParameterizedText{}, |
| 213 | NamePatterns: []ParameterizedText{ | |
74f1d4f2 2022-10-11 Pavel Safronov | 214 | "{{$version := getVersion}}" + |
| 215 | "{{.Year}}-{{.Month}}-{{.Day}}" + | |
| 216 | "{{if .ProjectName}}-{{.ProjectName}}{{end}}" + | |
| 217 | "{{if (gt $version 1)}}-n{{$version}}{{end}}", | |
| 218 | }, | |
| 219 | }, | |
| 220 | { | |
| 221 | Name: "create-react-app", | |
| 222 | Type: FolderType, | |
| 223 | Description: "Creates a folder in the current folder in the format create-react-app[-ProjectName][-vVersion], runs `npx create-react-app` to initialize the folder, and opens the folder in VSCode", | |
8c15a714 2022-11-04 Pavel Safronov | 224 | Path: ".", // current folder |
1a02ef4e 2022-10-21 Pavel Safronov | 225 | NamePatterns: []ParameterizedText{ |
74f1d4f2 2022-10-11 Pavel Safronov | 226 | "{{$version := getVersion}}" + |
| 227 | "create-react-app" + | |
| 228 | "{{if .ProjectName}}-{{.ProjectName}}{{end}}" + | |
| 229 | "{{if (gt $version 1)}}-n{{$version}}{{end}}", | |
| 230 | }, | |
1a02ef4e 2022-10-21 Pavel Safronov | 231 | PostScripts: []ParameterizedText{ |
74f1d4f2 2022-10-11 Pavel Safronov | 232 | "npx create-react-app .", |
| 233 | "code .", | |
| 234 | }, | |
| 235 | }, | |
| 236 | { | |
| 237 | Name: "git", | |
10676da3 2022-11-06 Pavel Safronov | 238 | Description: "Creates a folder in the ~/code folder in the format YYYY-MM-DD[-hh][-mm][-ss][-ProjectName]", |
| 239 | Path: "~/code", | |
74f1d4f2 2022-10-11 Pavel Safronov | 240 | Type: FolderType, |
1a02ef4e 2022-10-21 Pavel Safronov | 241 | NamePatterns: []ParameterizedText{ |
74f1d4f2 2022-10-11 Pavel Safronov | 242 | "{{.Year}}-{{.Month}}-{{.Day}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", |
| 243 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
| 244 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
| 245 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}-{{.Second}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
| 246 | }, | |
1a02ef4e 2022-10-21 Pavel Safronov | 247 | PostScripts: []ParameterizedText{ |
74f1d4f2 2022-10-11 Pavel Safronov | 248 | "git init", |
687d5626 2022-10-28 Pavel Safronov | 249 | "code .", |
74f1d4f2 2022-10-11 Pavel Safronov | 250 | }, |
| 251 | }, | |
| 252 | { | |
10676da3 2022-11-06 Pavel Safronov | 253 | Name: "git-clone", |
| 254 | Description: "DISABLED - Clones a repository into a new folder under ~/code in the format YYYY-MM-DD[-hh][-mm][-ss][-ProjectName]", | |
| 255 | IsDisabled: true, | |
| 256 | Path: "~/code", | |
| 257 | Type: FolderType, | |
1a02ef4e 2022-10-21 Pavel Safronov | 258 | NamePatterns: []ParameterizedText{ |
74f1d4f2 2022-10-11 Pavel Safronov | 259 | "{{.Year}}-{{.Month}}-{{.Day}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", |
10676da3 2022-11-06 Pavel Safronov | 260 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", |
| 261 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
| 262 | "{{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}-{{.Second}}{{if .ProjectName}}-{{.ProjectName}}{{end}}", | |
74f1d4f2 2022-10-11 Pavel Safronov | 263 | }, |
1a02ef4e 2022-10-21 Pavel Safronov | 264 | PostScripts: []ParameterizedText{ |
10676da3 2022-11-06 Pavel Safronov | 265 | "git clone {{.Url}} .", |
| 266 | "code .", | |
74f1d4f2 2022-10-11 Pavel Safronov | 267 | }, |
| 268 | }, | |
| 269 | }, | |
| 270 | } | |
b0586433 2022-10-21 Pavel Safronov | 271 | |
| 272 | return config | |
74f1d4f2 2022-10-11 Pavel Safronov | 273 | } |