fuzzyworld

template / ci-testing / files / default_config.go

Branch ci-testing · default branch · all branches

default_config.go

Blame: the commit that last changed each line · file · history

74f1d4f2 2022-10-11 Pavel Safronov1package main
2
3func defaultConfig() Config {
b0586433 2022-10-21 Pavel Safronov4 config := Config{
74f1d4f2 2022-10-11 Pavel Safronov5 Profiles: []Profile{
6 {
ed3d543a 2022-11-20 Pavel Safronov7 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 Safronov18 File: File{
687d5626 2022-10-28 Pavel Safronov19 Template: `# {{.FileNameWithoutExtension}}
74f1d4f2 2022-10-11 Pavel Safronov20
687d5626 2022-10-28 Pavel Safronov21Today's notes for {{.Year}}-{{.Month}}-{{.Day}}.
74f1d4f2 2022-10-11 Pavel Safronov22
23## Todo
24
1a02ef4e 2022-10-21 Pavel Safronov251. Check email
262. Check chat
273. Check calendar
284. Check yesterday's notes
295. Have fun!
306. ADD MORE ITEMS HERE`,
b0586433 2022-10-21 Pavel Safronov31 },
1a02ef4e 2022-10-21 Pavel Safronov32 PostScripts: []ParameterizedText{
52e9ad7c 2022-11-08 Pavel Safronov33 "code . {{ if .FullPath }}\"{{.FullPath}}\"{{else}}(ls -t | head -n1){{ end }}",
74f1d4f2 2022-10-11 Pavel Safronov34 },
687d5626 2022-10-28 Pavel Safronov35 RunPostscriptOnFailure: true,
74f1d4f2 2022-10-11 Pavel Safronov36 },
37 {
38 Name: "note",
dd789946 2022-10-24 Pavel Safronov39 Description: "Creates a MD file in ~/Notes in the format YYYY-MM-DD[-ProjectName][-vVersion].md",
74f1d4f2 2022-10-11 Pavel Safronov40 OS: "All",
dd789946 2022-10-24 Pavel Safronov41 Path: "~/Notes",
74f1d4f2 2022-10-11 Pavel Safronov42 Type: FileType,
1a02ef4e 2022-10-21 Pavel Safronov43 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov44 "{{$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 Safronov50 PostScripts: []ParameterizedText{
687d5626 2022-10-28 Pavel Safronov51 "code \"{{.FullPath}}\"",
74f1d4f2 2022-10-11 Pavel Safronov52 },
53 },
b1ded4b4 2022-10-30 Pavel Safronov54 {
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 Safronov60 Path: ".", // current folder
b1ded4b4 2022-10-30 Pavel Safronov61 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 Safronov82 {
b0586433 2022-10-21 Pavel Safronov83 Name: "blog",
dd789946 2022-10-24 Pavel Safronov84 Description: "Creates a MD file in the ~/Blog folder in the format YYYY-MM-DD[-ProjectName][-vVersion].md",
b0586433 2022-10-21 Pavel Safronov85 OS: "All",
dd789946 2022-10-24 Pavel Safronov86 Path: "~/Blog",
b0586433 2022-10-21 Pavel Safronov87 File: File{
4ded4215 2022-10-26 Pavel Safronov88 Template: `# {{.ProjectName}}
89
687d5626 2022-10-28 Pavel Safronov90Created by template, on {{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}-{{.Second}}.
4ded4215 2022-10-26 Pavel Safronov91
92## Spelling
93
94cspell:words nanite
95
96## Removed writing
97
98## Writing
99`,
b0586433 2022-10-21 Pavel Safronov100 },
101 Type: FileType,
1a02ef4e 2022-10-21 Pavel Safronov102 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov103 "{{$version := getVersion}}" +
104 "{{.Year}}-{{.Month}}-{{.Day}}" +
5c81baec 2022-11-20 Pavel Safronov105 `{{if .ProjectName}}-{{.ProjectName | snakecase }}{{end}}` +
74f1d4f2 2022-10-11 Pavel Safronov106 "{{if (gt $version 1)}}v{{$version}}{{end}}" +
107 ".md",
108 },
1a02ef4e 2022-10-21 Pavel Safronov109 PostScripts: []ParameterizedText{
687d5626 2022-10-28 Pavel Safronov110 "code . \"{{.FileName}}\"",
74f1d4f2 2022-10-11 Pavel Safronov111 },
112 },
ae89a42a 2022-11-02 Pavel Safronov113 {
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 Safronov129 {
130 Name: "therapy",
dd789946 2022-10-24 Pavel Safronov131 Description: "Creates a MD file in the ~/Therapy folder in the format YYYY-MM-DD[-vVersion].md",
ad5348d5 2022-10-21 Pavel Safronov132 OS: "All",
dd789946 2022-10-24 Pavel Safronov133 Path: "~/Therapy",
b0586433 2022-10-21 Pavel Safronov134 File: File{
8c15a714 2022-11-04 Pavel Safronov135 Template: `# {{if .ProjectName}}{{.ProjectName}}{{else}}Therapy notes{{end}}
ad5348d5 2022-10-21 Pavel Safronov136
137{{if .ProjectName}}Therapy notes on {{.ProjectName}}{{else}}Therapy notes{{end}}
138
139## Writing
140
141{{if .ProjectName}}Hello {{.ProjectName}},{{else}}Hello,{{end}}
142
143Start writing here...
144
145Sincerely, me
146`,
b0586433 2022-10-21 Pavel Safronov147 },
ad5348d5 2022-10-21 Pavel Safronov148 Type: FileType,
1a02ef4e 2022-10-21 Pavel Safronov149 NamePatterns: []ParameterizedText{
ad5348d5 2022-10-21 Pavel Safronov150 "{{$version := getVersion}}" +
151 "{{.Year}}-{{.Month}}-{{.Day}}" +
152 "{{if (gt $version 1)}}v{{$version}}{{end}}" +
153 ".md",
154 },
1a02ef4e 2022-10-21 Pavel Safronov155 PostScripts: []ParameterizedText{
52e9ad7c 2022-11-08 Pavel Safronov156 "code . {{.FullPath}}",
ad5348d5 2022-10-21 Pavel Safronov157 },
158 },
74f1d4f2 2022-10-11 Pavel Safronov159 {
160 Name: "work",
4709ec6b 2022-10-12 Pavel Safronov161 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 Safronov163 Type: FolderType,
1a02ef4e 2022-10-21 Pavel Safronov164 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov165 "{{.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 Safronov170 PostScripts: []ParameterizedText{
687d5626 2022-10-28 Pavel Safronov171 "code .",
172 "chmod +x repro.sh",
74f1d4f2 2022-10-11 Pavel Safronov173 },
5e7795dc 2022-10-21 Pavel Safronov174 Files: []FileInFolder{
687d5626 2022-10-28 Pavel Safronov175 {
5e7795dc 2022-10-21 Pavel Safronov176 File: File{
177 Template: `# {{.ProjectName}}
178
179Work notes on {{.ProjectName}}
180`,
181 },
182 Name: "README.md",
183 },
687d5626 2022-10-28 Pavel Safronov184 {
185 File: File{
186 Template: `clear
187
188echo "Let's test {{.ProjectName}}!"`,
189 },
190 Name: "repro.sh",
191 },
5e424f1b 2022-11-12 Pavel Safronov192 {
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 Safronov211 },
74f1d4f2 2022-10-11 Pavel Safronov212 },
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 Safronov217 Path: ".", // current folder
1a02ef4e 2022-10-21 Pavel Safronov218 PostScripts: []ParameterizedText{},
219 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov220 "{{$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 Safronov230 Path: ".", // current folder
1a02ef4e 2022-10-21 Pavel Safronov231 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov232 "{{$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 Safronov237 PostScripts: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov238 "npx create-react-app .",
239 "code .",
240 },
241 },
242 {
243 Name: "git",
10676da3 2022-11-06 Pavel Safronov244 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 Safronov246 Type: FolderType,
1a02ef4e 2022-10-21 Pavel Safronov247 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov248 "{{.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 Safronov253 PostScripts: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov254 "git init",
687d5626 2022-10-28 Pavel Safronov255 "code .",
74f1d4f2 2022-10-11 Pavel Safronov256 },
257 },
258 {
10676da3 2022-11-06 Pavel Safronov259 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 Safronov264 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov265 "{{.Year}}-{{.Month}}-{{.Day}}{{if .ProjectName}}-{{.ProjectName}}{{end}}",
10676da3 2022-11-06 Pavel Safronov266 "{{.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 Safronov269 },
1a02ef4e 2022-10-21 Pavel Safronov270 PostScripts: []ParameterizedText{
10676da3 2022-11-06 Pavel Safronov271 "git clone {{.Url}} .",
272 "code .",
74f1d4f2 2022-10-11 Pavel Safronov273 },
274 },
275 },
276 }
b0586433 2022-10-21 Pavel Safronov277
278 return config
74f1d4f2 2022-10-11 Pavel Safronov279}