@@ -9,6 +9,7 @@ title: Advanced Topic
99* [ Cache] ( #cache )
1010* [ Configuration] ( #configuration )
1111* [ Color Themes] ( #color-themes )
12+ * [ File Name] ( #file-name )
1213* [ Log Levels] ( #log-levels )
1314* [ Plugins] ( #plugins )
1415
@@ -91,6 +92,10 @@ The config file is saved in `~/.lc/config.json`, here is a full exmaple (include
9192 "enable": true,
9293 "theme": "default"
9394 },
95+ "file": {
96+ "show": "${fid}.${slug}",
97+ "submission": "${fid}.${slug}.${sid}.${ac}"
98+ },
9499 "icon": {
95100 "theme": ""
96101 },
@@ -107,6 +112,7 @@ Here are some useful settings:
107112* ` code:lang ` to set your default language used in coding.
108113* ` color:enable ` to enable colorful output.
109114* ` color:theme ` to set color theme used in output. (see [ Color Theme] ( #color-theme ) )
115+ * ` file.show ` to set filename pattern for generated code file. (see [ File Name] ( #file-name ) )
110116* ` icon:theme ` to set icon them used in output.
111117* ` plugins ` to config each installed plugins. (see [ Plugins] ( #plugins ) )
112118
@@ -167,6 +173,23 @@ Of course you can create your own themes if you like, look into `colors` folder
167173 "yellow": "#ffff00"
168174 }
169175
176+ # File Name
177+
178+ You could configure file name pattern in code generation.
179+
180+ * config ` file.show ` for generated file in ` show ` .
181+ * config ` file.submission ` for downloaded file in ` submission ` .
182+
183+ Followings are some variables you could used in the pattern:
184+
185+ * ` ${fid} ` for question id. (e.g. ` 123 ` )
186+ * ` ${slug} ` for dash-separated question name. (e.g. ` add-two ` )
187+ * ` ${name} ` for space-separated questions name. (e.g. ` Add Two ` )
188+ * ` ${level} ` for question level. (e.g. ` Hard ` )
189+ * ` ${category} ` for question category. (e.g. ` algorithms ` )
190+ * ` ${sid} ` for submission id.
191+ * ` ${ac} ` for accept status of existing submission.
192+
170193# Log Levels
171194
172195* ` -v ` to enable debug output.
0 commit comments