fuzzyworld

template / windows / files / default_config.go

Branch windows · 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 {
7 Name: "daily",
dd789946 2022-10-24 Pavel Safronov8 Description: "Creates a MD file in ~/DailyNotes folder in the format YYYY-MM-DD[-vX].md",
9 Path: "~/DailyNotes",
74f1d4f2 2022-10-11 Pavel Safronov10 Type: FileType,
1a02ef4e 2022-10-21 Pavel Safronov11 NamePatterns: []ParameterizedText{"{{.Year}}-{{.Month}}-{{.Day}}.md"},
b0586433 2022-10-21 Pavel Safronov12 File: File{
687d5626 2022-10-28 Pavel Safronov13 Template: `# {{.FileNameWithoutExtension}}
74f1d4f2 2022-10-11 Pavel Safronov14
687d5626 2022-10-28 Pavel Safronov15Today's notes for {{.Year}}-{{.Month}}-{{.Day}}.
74f1d4f2 2022-10-11 Pavel Safronov16
17## Todo
18
1a02ef4e 2022-10-21 Pavel Safronov191. Check email
202. Check chat
213. Check calendar
224. Check yesterday's notes
235. Have fun!
246. ADD MORE ITEMS HERE`,
b0586433 2022-10-21 Pavel Safronov25 },
1a02ef4e 2022-10-21 Pavel Safronov26 PostScripts: []ParameterizedText{
52e9ad7c 2022-11-08 Pavel Safronov27 "code . {{ if .FullPath }}\"{{.FullPath}}\"{{else}}(ls -t | head -n1){{ end }}",
74f1d4f2 2022-10-11 Pavel Safronov28 },
687d5626 2022-10-28 Pavel Safronov29 RunPostscriptOnFailure: true,
74f1d4f2 2022-10-11 Pavel Safronov30 },
31 {
32 Name: "note",
dd789946 2022-10-24 Pavel Safronov33 Description: "Creates a MD file in ~/Notes in the format YYYY-MM-DD[-ProjectName][-vVersion].md",
74f1d4f2 2022-10-11 Pavel Safronov34 OS: "All",
dd789946 2022-10-24 Pavel Safronov35 Path: "~/Notes",
74f1d4f2 2022-10-11 Pavel Safronov36 Type: FileType,
1a02ef4e 2022-10-21 Pavel Safronov37 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov38 "{{$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 Safronov44 PostScripts: []ParameterizedText{
687d5626 2022-10-28 Pavel Safronov45 "code \"{{.FullPath}}\"",
74f1d4f2 2022-10-11 Pavel Safronov46 },
47 },
b1ded4b4 2022-10-30 Pavel Safronov48 {
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 Safronov54 Path: ".", // current folder
b1ded4b4 2022-10-30 Pavel Safronov55 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 Safronov76 {
b0586433 2022-10-21 Pavel Safronov77 Name: "blog",
dd789946 2022-10-24 Pavel Safronov78 Description: "Creates a MD file in the ~/Blog folder in the format YYYY-MM-DD[-ProjectName][-vVersion].md",
b0586433 2022-10-21 Pavel Safronov79 OS: "All",
dd789946 2022-10-24 Pavel Safronov80 Path: "~/Blog",
b0586433 2022-10-21 Pavel Safronov81 File: File{
4ded4215 2022-10-26 Pavel Safronov82 Template: `# {{.ProjectName}}
83
687d5626 2022-10-28 Pavel Safronov84Created by template, on {{.Year}}-{{.Month}}-{{.Day}}-{{.Hour}}-{{.Minute}}-{{.Second}}.
4ded4215 2022-10-26 Pavel Safronov85
86## Spelling
87
88cspell:words nanite
89
90## Removed writing
91
92## Writing
93`,
b0586433 2022-10-21 Pavel Safronov94 },
95 Type: FileType,
1a02ef4e 2022-10-21 Pavel Safronov96 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov97 "{{$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 Safronov103 PostScripts: []ParameterizedText{
687d5626 2022-10-28 Pavel Safronov104 "code . \"{{.FileName}}\"",
74f1d4f2 2022-10-11 Pavel Safronov105 },
106 },
ae89a42a 2022-11-02 Pavel Safronov107 {
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 Safronov123 {
124 Name: "therapy",
dd789946 2022-10-24 Pavel Safronov125 Description: "Creates a MD file in the ~/Therapy folder in the format YYYY-MM-DD[-vVersion].md",
ad5348d5 2022-10-21 Pavel Safronov126 OS: "All",
dd789946 2022-10-24 Pavel Safronov127 Path: "~/Therapy",
b0586433 2022-10-21 Pavel Safronov128 File: File{
8c15a714 2022-11-04 Pavel Safronov129 Template: `# {{if .ProjectName}}{{.ProjectName}}{{else}}Therapy notes{{end}}
ad5348d5 2022-10-21 Pavel Safronov130
131{{if .ProjectName}}Therapy notes on {{.ProjectName}}{{else}}Therapy notes{{end}}
132
133## Writing
134
135{{if .ProjectName}}Hello {{.ProjectName}},{{else}}Hello,{{end}}
136
137Start writing here...
138
139Sincerely, me
140`,
b0586433 2022-10-21 Pavel Safronov141 },
ad5348d5 2022-10-21 Pavel Safronov142 Type: FileType,
1a02ef4e 2022-10-21 Pavel Safronov143 NamePatterns: []ParameterizedText{
ad5348d5 2022-10-21 Pavel Safronov144 "{{$version := getVersion}}" +
145 "{{.Year}}-{{.Month}}-{{.Day}}" +
146 "{{if (gt $version 1)}}v{{$version}}{{end}}" +
147 ".md",
148 },
1a02ef4e 2022-10-21 Pavel Safronov149 PostScripts: []ParameterizedText{
52e9ad7c 2022-11-08 Pavel Safronov150 "code . {{.FullPath}}",
ad5348d5 2022-10-21 Pavel Safronov151 },
152 },
74f1d4f2 2022-10-11 Pavel Safronov153 {
154 Name: "work",
4709ec6b 2022-10-12 Pavel Safronov155 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 Safronov157 Type: FolderType,
1a02ef4e 2022-10-21 Pavel Safronov158 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov159 "{{.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 Safronov164 PostScripts: []ParameterizedText{
687d5626 2022-10-28 Pavel Safronov165 "code .",
166 "chmod +x repro.sh",
74f1d4f2 2022-10-11 Pavel Safronov167 },
5e7795dc 2022-10-21 Pavel Safronov168 Files: []FileInFolder{
687d5626 2022-10-28 Pavel Safronov169 {
5e7795dc 2022-10-21 Pavel Safronov170 File: File{
171 Template: `# {{.ProjectName}}
172
173Work notes on {{.ProjectName}}
174`,
175 },
176 Name: "README.md",
177 },
687d5626 2022-10-28 Pavel Safronov178 {
179 File: File{
180 Template: `clear
181
182echo "Let's test {{.ProjectName}}!"`,
183 },
184 Name: "repro.sh",
185 },
5e424f1b 2022-11-12 Pavel Safronov186 {
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 Safronov205 },
74f1d4f2 2022-10-11 Pavel Safronov206 },
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 Safronov211 Path: ".", // current folder
1a02ef4e 2022-10-21 Pavel Safronov212 PostScripts: []ParameterizedText{},
213 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov214 "{{$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 Safronov224 Path: ".", // current folder
1a02ef4e 2022-10-21 Pavel Safronov225 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov226 "{{$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 Safronov231 PostScripts: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov232 "npx create-react-app .",
233 "code .",
234 },
235 },
236 {
237 Name: "git",
10676da3 2022-11-06 Pavel Safronov238 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 Safronov240 Type: FolderType,
1a02ef4e 2022-10-21 Pavel Safronov241 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov242 "{{.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 Safronov247 PostScripts: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov248 "git init",
687d5626 2022-10-28 Pavel Safronov249 "code .",
74f1d4f2 2022-10-11 Pavel Safronov250 },
251 },
252 {
10676da3 2022-11-06 Pavel Safronov253 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 Safronov258 NamePatterns: []ParameterizedText{
74f1d4f2 2022-10-11 Pavel Safronov259 "{{.Year}}-{{.Month}}-{{.Day}}{{if .ProjectName}}-{{.ProjectName}}{{end}}",
10676da3 2022-11-06 Pavel Safronov260 "{{.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 Safronov263 },
1a02ef4e 2022-10-21 Pavel Safronov264 PostScripts: []ParameterizedText{
10676da3 2022-11-06 Pavel Safronov265 "git clone {{.Url}} .",
266 "code .",
74f1d4f2 2022-10-11 Pavel Safronov267 },
268 },
269 },
270 }
b0586433 2022-10-21 Pavel Safronov271
272 return config
74f1d4f2 2022-10-11 Pavel Safronov273}