coomer-downloader 3.2.0 → 3.4.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.
Files changed (43) hide show
  1. package/README.md +14 -3
  2. package/biome.json +6 -4
  3. package/dist/index.js +539 -285
  4. package/docs/images/Screenshot 01.jpg +0 -0
  5. package/package.json +14 -5
  6. package/src/api/bunkr.ts +1 -1
  7. package/src/api/coomer-api.ts +23 -6
  8. package/src/api/gofile.ts +2 -2
  9. package/src/api/index.ts +5 -1
  10. package/src/api/nsfw.xxx.ts +3 -3
  11. package/src/api/plain-curl.ts +1 -1
  12. package/src/{args-handler.ts → cli/args-handler.ts} +17 -12
  13. package/src/cli/ui/app.tsx +40 -0
  14. package/src/cli/ui/components/file.tsx +44 -0
  15. package/src/cli/ui/components/filelist.tsx +52 -0
  16. package/src/cli/ui/components/index.ts +6 -0
  17. package/src/cli/ui/components/keyboardinfo.tsx +41 -0
  18. package/src/cli/ui/components/loading.tsx +20 -0
  19. package/src/cli/ui/components/preview.tsx +32 -0
  20. package/src/cli/ui/components/spinner.tsx +28 -0
  21. package/src/cli/ui/components/titlebar.tsx +15 -0
  22. package/src/cli/ui/hooks/downloader.ts +21 -0
  23. package/src/cli/ui/hooks/input.ts +17 -0
  24. package/src/cli/ui/index.tsx +7 -0
  25. package/src/cli/ui/store/index.ts +19 -0
  26. package/src/index.ts +42 -23
  27. package/src/logger/index.ts +15 -0
  28. package/src/services/downloader.ts +161 -0
  29. package/src/services/file.ts +113 -0
  30. package/src/types/index.ts +16 -1
  31. package/src/utils/duplicates.ts +23 -0
  32. package/src/utils/filters.ts +15 -15
  33. package/src/utils/io.ts +25 -0
  34. package/src/utils/mediatypes.ts +13 -0
  35. package/src/utils/promise.ts +0 -50
  36. package/src/utils/requests.ts +2 -2
  37. package/src/utils/strings.ts +1 -10
  38. package/src/utils/timer.ts +11 -9
  39. package/tsconfig.json +2 -1
  40. package/src/utils/downloader.ts +0 -108
  41. package/src/utils/file.ts +0 -75
  42. package/src/utils/index.ts +0 -11
  43. package/src/utils/multibar.ts +0 -62
package/README.md CHANGED
@@ -2,9 +2,12 @@
2
2
 
3
3
  [![NPM](https://nodei.co/npm/coomer-downloader.svg?color=lightgrey)](https://www.npmjs.com/package/coomer-downloader)
4
4
 
5
+ <img src="https://github.com/smartacephale/coomer-downloader/blob/main/docs/images/Screenshot%2001.jpg?raw=true" width="500"></img>
5
6
 
6
7
  ### Features
7
- * script keeps track of downloaded files and resume downloading if it's crashed.
8
+ * Script keeps track of downloaded files and resume downloading if it's crashed.
9
+ * Skip files, filter by text and media type
10
+ * Preview images in console. For now partial downloads not supported.
8
11
 
9
12
  ### Install:
10
13
  ```
@@ -42,12 +45,20 @@ npx coomer-downloader --u https://random.com/file.mp4
42
45
  ### Options:
43
46
  ```
44
47
  --dir <directory>
45
- --media <video|image|all>
48
+ --media <video|image>
46
49
  --skip <number>
47
50
 
48
- # include/exclude filters files by name
51
+ # Removes duplicates by url and file hash
52
+ --remove-dupilicates <true|false>
53
+
54
+ # Filter by file name
49
55
  --include <keyword1>
50
56
  --exclude <keyword2>
57
+
58
+ # Filter by min/max file size. Example: "1mb" or "500kb"
59
+ --min-size <keyword>
60
+ --max-size <keyword>
61
+
51
62
  ```
52
63
 
53
64
  ```
package/biome.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.2.6/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
3
3
  "assist": {
4
4
  "actions": {
5
5
  "source": {
@@ -14,13 +14,14 @@
14
14
  "indentStyle": "space",
15
15
  "indentWidth": 2,
16
16
  "lineEnding": "lf",
17
- "lineWidth": 100
17
+ "lineWidth": 90
18
18
  },
19
19
  "javascript": {
20
20
  "formatter": {
21
21
  "quoteStyle": "single",
22
22
  "semicolons": "always"
23
- }
23
+ },
24
+ "jsxRuntime": "reactClassic"
24
25
  },
25
26
  "linter": {
26
27
  "enabled": true,
@@ -37,7 +38,8 @@
37
38
  "useNumberNamespace": "off"
38
39
  },
39
40
  "suspicious": {
40
- "noRedundantUseStrict": "off"
41
+ "noRedundantUseStrict": "off",
42
+ "noControlCharactersInRegex": "info"
41
43
  }
42
44
  }
43
45
  }