tidyf 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +299 -0
- package/dist/cli.js +19340 -0
- package/dist/fsevents-hj42pnne.node +0 -0
- package/dist/index.js +17617 -0
- package/package.json +58 -0
- package/src/cli.ts +63 -0
- package/src/commands/config.ts +630 -0
- package/src/commands/organize.ts +396 -0
- package/src/commands/watch.ts +302 -0
- package/src/index.ts +93 -0
- package/src/lib/config.ts +335 -0
- package/src/lib/opencode.ts +380 -0
- package/src/lib/scanner.ts +296 -0
- package/src/lib/watcher.ts +151 -0
- package/src/types/config.ts +69 -0
- package/src/types/organizer.ts +144 -0
- package/src/utils/files.ts +198 -0
- package/src/utils/icons.ts +195 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File type icons for terminal display
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const FILE_ICONS: Record<string, string> = {
|
|
6
|
+
// Documents
|
|
7
|
+
pdf: "๐",
|
|
8
|
+
doc: "๐",
|
|
9
|
+
docx: "๐",
|
|
10
|
+
txt: "๐",
|
|
11
|
+
rtf: "๐",
|
|
12
|
+
odt: "๐",
|
|
13
|
+
md: "๐",
|
|
14
|
+
|
|
15
|
+
// Spreadsheets
|
|
16
|
+
xls: "๐",
|
|
17
|
+
xlsx: "๐",
|
|
18
|
+
csv: "๐",
|
|
19
|
+
ods: "๐",
|
|
20
|
+
|
|
21
|
+
// Presentations
|
|
22
|
+
ppt: "๐ฝ๏ธ",
|
|
23
|
+
pptx: "๐ฝ๏ธ",
|
|
24
|
+
key: "๐ฝ๏ธ",
|
|
25
|
+
|
|
26
|
+
// Images
|
|
27
|
+
jpg: "๐ผ๏ธ",
|
|
28
|
+
jpeg: "๐ผ๏ธ",
|
|
29
|
+
png: "๐ผ๏ธ",
|
|
30
|
+
gif: "๐ผ๏ธ",
|
|
31
|
+
svg: "๐จ",
|
|
32
|
+
webp: "๐ผ๏ธ",
|
|
33
|
+
heic: "๐ผ๏ธ",
|
|
34
|
+
ico: "๐ผ๏ธ",
|
|
35
|
+
bmp: "๐ผ๏ธ",
|
|
36
|
+
tiff: "๐ผ๏ธ",
|
|
37
|
+
psd: "๐จ",
|
|
38
|
+
ai: "๐จ",
|
|
39
|
+
sketch: "๐จ",
|
|
40
|
+
fig: "๐จ",
|
|
41
|
+
|
|
42
|
+
// Videos
|
|
43
|
+
mp4: "๐ฌ",
|
|
44
|
+
mov: "๐ฌ",
|
|
45
|
+
avi: "๐ฌ",
|
|
46
|
+
mkv: "๐ฌ",
|
|
47
|
+
webm: "๐ฌ",
|
|
48
|
+
wmv: "๐ฌ",
|
|
49
|
+
flv: "๐ฌ",
|
|
50
|
+
|
|
51
|
+
// Audio
|
|
52
|
+
mp3: "๐ต",
|
|
53
|
+
wav: "๐ต",
|
|
54
|
+
flac: "๐ต",
|
|
55
|
+
aac: "๐ต",
|
|
56
|
+
ogg: "๐ต",
|
|
57
|
+
m4a: "๐ต",
|
|
58
|
+
wma: "๐ต",
|
|
59
|
+
|
|
60
|
+
// Archives
|
|
61
|
+
zip: "๐ฆ",
|
|
62
|
+
rar: "๐ฆ",
|
|
63
|
+
"7z": "๐ฆ",
|
|
64
|
+
tar: "๐ฆ",
|
|
65
|
+
gz: "๐ฆ",
|
|
66
|
+
bz2: "๐ฆ",
|
|
67
|
+
xz: "๐ฆ",
|
|
68
|
+
|
|
69
|
+
// Code
|
|
70
|
+
ts: "๐",
|
|
71
|
+
tsx: "๐",
|
|
72
|
+
js: "๐",
|
|
73
|
+
jsx: "๐",
|
|
74
|
+
py: "๐",
|
|
75
|
+
rb: "๐",
|
|
76
|
+
go: "๐ต",
|
|
77
|
+
rs: "๐ฆ",
|
|
78
|
+
java: "โ",
|
|
79
|
+
c: "๐",
|
|
80
|
+
cpp: "๐",
|
|
81
|
+
h: "๐",
|
|
82
|
+
hpp: "๐",
|
|
83
|
+
cs: "๐",
|
|
84
|
+
swift: "๐",
|
|
85
|
+
kt: "๐",
|
|
86
|
+
php: "๐",
|
|
87
|
+
html: "๐",
|
|
88
|
+
css: "๐จ",
|
|
89
|
+
scss: "๐จ",
|
|
90
|
+
less: "๐จ",
|
|
91
|
+
json: "๐",
|
|
92
|
+
xml: "๐",
|
|
93
|
+
yaml: "๐",
|
|
94
|
+
yml: "๐",
|
|
95
|
+
toml: "๐",
|
|
96
|
+
|
|
97
|
+
// Applications/Installers
|
|
98
|
+
dmg: "๐ฟ",
|
|
99
|
+
pkg: "๐ฆ",
|
|
100
|
+
exe: "โ๏ธ",
|
|
101
|
+
msi: "โ๏ธ",
|
|
102
|
+
app: "๐ฑ",
|
|
103
|
+
apk: "๐ฑ",
|
|
104
|
+
ipa: "๐ฑ",
|
|
105
|
+
deb: "๐ฆ",
|
|
106
|
+
rpm: "๐ฆ",
|
|
107
|
+
|
|
108
|
+
// Data
|
|
109
|
+
sql: "๐๏ธ",
|
|
110
|
+
db: "๐๏ธ",
|
|
111
|
+
sqlite: "๐๏ธ",
|
|
112
|
+
|
|
113
|
+
// Ebooks
|
|
114
|
+
epub: "๐",
|
|
115
|
+
mobi: "๐",
|
|
116
|
+
azw: "๐",
|
|
117
|
+
azw3: "๐",
|
|
118
|
+
|
|
119
|
+
// Fonts
|
|
120
|
+
ttf: "๐ค",
|
|
121
|
+
otf: "๐ค",
|
|
122
|
+
woff: "๐ค",
|
|
123
|
+
woff2: "๐ค",
|
|
124
|
+
|
|
125
|
+
// Default
|
|
126
|
+
default: "๐",
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const CATEGORY_ICONS: Record<string, string> = {
|
|
130
|
+
Documents: "๐",
|
|
131
|
+
Images: "๐ผ๏ธ",
|
|
132
|
+
Videos: "๐ฌ",
|
|
133
|
+
Audio: "๐ต",
|
|
134
|
+
Archives: "๐ฆ",
|
|
135
|
+
Code: "๐",
|
|
136
|
+
Applications: "๐ฟ",
|
|
137
|
+
Spreadsheets: "๐",
|
|
138
|
+
Presentations: "๐ฝ๏ธ",
|
|
139
|
+
Ebooks: "๐",
|
|
140
|
+
Fonts: "๐ค",
|
|
141
|
+
Data: "๐๏ธ",
|
|
142
|
+
Other: "๐",
|
|
143
|
+
Unknown: "โ",
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const STATUS_ICONS: Record<string, string> = {
|
|
147
|
+
pending: "โณ",
|
|
148
|
+
moving: "๐",
|
|
149
|
+
completed: "โ
",
|
|
150
|
+
failed: "โ",
|
|
151
|
+
skipped: "โญ๏ธ",
|
|
152
|
+
conflict: "โ ๏ธ",
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Get the icon for a file based on its extension
|
|
157
|
+
*/
|
|
158
|
+
export function getFileIcon(filename: string): string {
|
|
159
|
+
const ext = filename.split(".").pop()?.toLowerCase() || "";
|
|
160
|
+
return FILE_ICONS[ext] || FILE_ICONS.default;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Get the icon for a category
|
|
165
|
+
*/
|
|
166
|
+
export function getCategoryIcon(category: string): string {
|
|
167
|
+
return CATEGORY_ICONS[category] || CATEGORY_ICONS.Other;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Get the icon for a move status
|
|
172
|
+
*/
|
|
173
|
+
export function getStatusIcon(status: string): string {
|
|
174
|
+
return STATUS_ICONS[status] || STATUS_ICONS.pending;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Get a colored status indicator
|
|
179
|
+
*/
|
|
180
|
+
export function getStatusIndicator(status: string): string {
|
|
181
|
+
switch (status) {
|
|
182
|
+
case "completed":
|
|
183
|
+
return "โ";
|
|
184
|
+
case "failed":
|
|
185
|
+
return "โ";
|
|
186
|
+
case "skipped":
|
|
187
|
+
return "โ";
|
|
188
|
+
case "conflict":
|
|
189
|
+
return "!";
|
|
190
|
+
case "moving":
|
|
191
|
+
return "โ";
|
|
192
|
+
default:
|
|
193
|
+
return "ยท";
|
|
194
|
+
}
|
|
195
|
+
}
|