generateAlias generates a suggested alias from the filename
(filename string)
| 277 | |
| 278 | // generateAlias generates a suggested alias from the filename |
| 279 | func generateAlias(filename string) string { |
| 280 | // Remove "id_" prefix if present |
| 281 | alias := strings.TrimPrefix(filename, "id_") |
| 282 | |
| 283 | // Remove common suffixes |
| 284 | alias = strings.TrimSuffix(alias, "_sk") |
| 285 | |
| 286 | // If empty after trimming, use original filename |
| 287 | if alias == "" { |
| 288 | alias = filename |
| 289 | } |
| 290 | |
| 291 | return alias |
| 292 | } |
| 293 | |
| 294 | // parseSelection parses user selection string into indices |
| 295 | // Supports formats: "all", "1", "1,3", "1-3", "1,3-5,7" |