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