├── .github └── workflows │ └── main.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── deno.json ├── deno.lock ├── main.ts ├── main_test.ts ├── package.json └── readme.md /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Deno Compile 2 | on: 3 | push: 4 | branches: 5 | - main 6 | 7 | jobs: 8 | changelog: 9 | runs-on: ubuntu-latest 10 | outputs: 11 | tag: ${{ steps.changelog.outputs.tag }} 12 | skipped: ${{ steps.changelog.outputs.skipped }} 13 | output: ${{steps.changelog.outputs.clean_changelog}} 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: Conventional Changelog 17 | id: changelog 18 | uses: TriPSs/conventional-changelog-action@v4.1.1 19 | with: 20 | github-token: ${{ secrets.GITHUB_TOKEN }} 21 | 22 | compile: 23 | strategy: 24 | matrix: 25 | target: [{target: x86_64-unknown-linux-gnu, file: linux-airenamer}, {target: x86_64-pc-windows-msvc, file: win-airenamer.exe}, {target: x86_64-apple-darwin, file: macos-x86-airenamer}, {target: aarch64-apple-darwin, file: macos-arm64-airenamer}] 26 | runs-on: ubuntu-latest 27 | needs: changelog 28 | if: ${{ needs.changelog.outputs.skipped == 'false' }} 29 | steps: 30 | - uses: actions/checkout@v4 31 | - uses: denoland/setup-deno@v1 32 | with: 33 | deno-version: 1.37.2 34 | - run: 35 | deno compile --allow-write --allow-read --allow-net --target ${{ matrix.target.target }} --output ${{ matrix.target.file}} main.ts 36 | 37 | - name: Release 38 | uses: softprops/action-gh-release@v1 39 | if: ${{ needs.changelog.outputs.skipped == 'false' }} 40 | with: 41 | tag_name: ${{ needs.changelog.outputs.tag }} 42 | name: ${{ needs.changelog.outputs.tag }} 43 | body: ${{ needs.changelog.outputs.output }} 44 | files: | 45 | linux-airenamer 46 | win-airenamer.exe 47 | macos-x86-airenamer 48 | macos-arm64-airenamer 49 | 50 | token: ${{ secrets.GITHUB_TOKEN }} 51 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | archive 2 | node_modules -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [0.0.8](https://github.com/technovangelist/airenamer/compare/v0.0.6...v0.0.8) (2024-04-25) 2 | 3 | 4 | ### Bug Fixes 5 | 6 | * force pull llava ([dea263c](https://github.com/technovangelist/airenamer/commit/dea263c2cfb01d24bb64954653bd89e86ec6efa2)) 7 | * vedsion number ([95fd1d4](https://github.com/technovangelist/airenamer/commit/95fd1d4b6357424655907ee0a69a875990c46083)) 8 | 9 | 10 | 11 | ## [0.0.6](https://github.com/technovangelist/airenamer/compare/v0.0.5...v0.0.6) (2024-01-29) 12 | 13 | 14 | ### Bug Fixes 15 | 16 | * bad link in the readme ([5a07ebb](https://github.com/technovangelist/airenamer/commit/5a07ebb16d0f208a178379bbbd719ce2f016db0e)) 17 | 18 | 19 | 20 | ## [0.0.5](https://github.com/technovangelist/airenamer/compare/v0.0.4...v0.0.5) (2024-01-29) 21 | 22 | 23 | ### Bug Fixes 24 | 25 | * error handling for no json plus for when file name too long ([e58993f](https://github.com/technovangelist/airenamer/commit/e58993f956a8e353c6545ba60945909754c86bdb)) 26 | 27 | 28 | 29 | ## [0.0.4](https://github.com/technovangelist/airenamer/compare/v0.0.3...v0.0.4) (2024-01-06) 30 | 31 | 32 | ### Bug Fixes 33 | 34 | * add the right permissions ([49d9b51](https://github.com/technovangelist/airenamer/commit/49d9b519db6bcdb4776585b661ea1114a6a2e4aa)) 35 | 36 | 37 | 38 | ## [0.0.3](https://github.com/technovangelist/airenamer/compare/68576a401113e1d293e2da54195ec60dada20d2f...v0.0.3) (2024-01-06) 39 | 40 | 41 | ### Bug Fixes 42 | 43 | * add version number ([56a1435](https://github.com/technovangelist/airenamer/commit/56a143525fc0fb8aa00394f25539fac5db7d406d)) 44 | * update model to just the q4 ([68576a4](https://github.com/technovangelist/airenamer/commit/68576a401113e1d293e2da54195ec60dada20d2f)) 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Matt Williams 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /deno.json: -------------------------------------------------------------------------------- 1 | { 2 | "tasks": { 3 | "dev": "deno run --watch main.ts" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /deno.lock: -------------------------------------------------------------------------------- 1 | { 2 | "version": "3", 3 | "packages": { 4 | "specifiers": { 5 | "npm:matts-llm-tools": "npm:matts-llm-tools@0.0.4_typescript@5.2.2", 6 | "npm:matts-llm-tools@0.0.5": "npm:matts-llm-tools@0.0.5_typescript@5.2.2", 7 | "npm:matts-llm-tools@0.0.6": "npm:matts-llm-tools@0.0.6_typescript@5.2.2", 8 | "npm:ollama": "npm:ollama@0.4.4" 9 | }, 10 | "npm": { 11 | "@isaacs/cliui@8.0.2": { 12 | "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", 13 | "dependencies": { 14 | "string-width": "string-width@5.1.2", 15 | "string-width-cjs": "string-width@4.2.3", 16 | "strip-ansi": "strip-ansi@7.1.0", 17 | "strip-ansi-cjs": "strip-ansi@6.0.1", 18 | "wrap-ansi": "wrap-ansi@8.1.0", 19 | "wrap-ansi-cjs": "wrap-ansi@7.0.0" 20 | } 21 | }, 22 | "@pkgjs/parseargs@0.11.0": { 23 | "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", 24 | "dependencies": {} 25 | }, 26 | "@stdlib/assert-has-own-property@0.2.1": { 27 | "integrity": "sha512-TNx+PlR1kGG6Ypg9aiHpHzaIYI8iaKAj7Ad1r/A6BlbkA/czzJMMidJE91uDlpgrMAIILAT68MRXt3kD6X2tAw==", 28 | "dependencies": {} 29 | }, 30 | "@stdlib/assert-has-symbol-support@0.2.1": { 31 | "integrity": "sha512-a0N1kI/csNiPZ/0lad7ATOIMSXgpm0mCBjV95TgA4+Dmmruol0DK3PrP4n+NuoziTLzRSM/CRgEtLQI5X9g6mQ==", 32 | "dependencies": {} 33 | }, 34 | "@stdlib/assert-has-tostringtag-support@0.2.1": { 35 | "integrity": "sha512-cWhgirurOsVJzHSSU0GdX5HqHGF2DRWXPk7xbQ4OPhu0x4yeOa2WAupPf7PHQ0pMD++IoWW3I16Gr310WjLDeg==", 36 | "dependencies": { 37 | "@stdlib/assert-has-symbol-support": "@stdlib/assert-has-symbol-support@0.2.1" 38 | } 39 | }, 40 | "@stdlib/assert-is-boolean@0.2.1": { 41 | "integrity": "sha512-Ls9j8PAFGZsR8v9J/39QKghT9oLmkm8RI418dt+fHBemFsjd4U/VEvUUgNEfal1LsVAc31ltklR0HJEKrkGDEg==", 42 | "dependencies": { 43 | "@stdlib/assert-has-tostringtag-support": "@stdlib/assert-has-tostringtag-support@0.2.1", 44 | "@stdlib/boolean-ctor": "@stdlib/boolean-ctor@0.2.1", 45 | "@stdlib/utils-define-nonenumerable-read-only-property": "@stdlib/utils-define-nonenumerable-read-only-property@0.2.1", 46 | "@stdlib/utils-native-class": "@stdlib/utils-native-class@0.2.1" 47 | } 48 | }, 49 | "@stdlib/assert-is-string@0.2.1": { 50 | "integrity": "sha512-xphxm9i61By/M7cmyCqgPiDof4DP3Rms3lVdcCpkr7T9PkBFMhOlm6zyhxo/2+dhukjf4Sak/WqntF/CWgJFJw==", 51 | "dependencies": { 52 | "@stdlib/assert-has-tostringtag-support": "@stdlib/assert-has-tostringtag-support@0.2.1", 53 | "@stdlib/utils-define-nonenumerable-read-only-property": "@stdlib/utils-define-nonenumerable-read-only-property@0.2.1", 54 | "@stdlib/utils-native-class": "@stdlib/utils-native-class@0.2.1" 55 | } 56 | }, 57 | "@stdlib/boolean-ctor@0.2.1": { 58 | "integrity": "sha512-CJx4lCU2eYoIcthpdzIoEmhE1Fgd1PFvQeFHhOvbm4TidP/uRP5xQGU+eimgxQ4G0lMxTJ8RNXpLPiK5OdeSUQ==", 59 | "dependencies": {} 60 | }, 61 | "@stdlib/error-tools-fmtprodmsg@0.2.1": { 62 | "integrity": "sha512-SaxvGeGfWfda/O3rTNGRGBzAL9gsY/yd8n1hXwzOl/2aUHf8nxcf6Fz6/BQ5PguT0GiBkca19XEhHZZHxX3X/g==", 63 | "dependencies": {} 64 | }, 65 | "@stdlib/nlp-sentencize@0.2.1": { 66 | "integrity": "sha512-s9+zCRZWQqt0DbmebGwJJami5QBgEPtlXbJj5oEFrlt2usEiNTxn07ExdUuWpYqQ7AKeRN4qp7eg2pdl3vSvtw==", 67 | "dependencies": { 68 | "@stdlib/assert-is-string": "@stdlib/assert-is-string@0.2.1", 69 | "@stdlib/nlp-tokenize": "@stdlib/nlp-tokenize@0.2.1", 70 | "@stdlib/string-base-trim": "@stdlib/string-base-trim@0.2.1" 71 | } 72 | }, 73 | "@stdlib/nlp-tokenize@0.2.1": { 74 | "integrity": "sha512-jy2399uPIhqHURoCwbgzhnIe7T+oC6oPpgybj3IVln83zsNbu9HjWe89ThaVduu9yPxqE3jBIn1/ch6DEO4eIg==", 75 | "dependencies": { 76 | "@stdlib/assert-has-own-property": "@stdlib/assert-has-own-property@0.2.1", 77 | "@stdlib/assert-is-boolean": "@stdlib/assert-is-boolean@0.2.1", 78 | "@stdlib/assert-is-string": "@stdlib/assert-is-string@0.2.1", 79 | "@stdlib/string-format": "@stdlib/string-format@0.2.1" 80 | } 81 | }, 82 | "@stdlib/string-base-format-interpolate@0.2.1": { 83 | "integrity": "sha512-Uxz89eUi4m9yao4VjsqXIxLIF7qDmqEAH0e+XBRWRGC2zx6DhmK2kLnaU0xW69+VJPn3dq4itxq0oryw2E+qIQ==", 84 | "dependencies": {} 85 | }, 86 | "@stdlib/string-base-format-tokenize@0.2.1": { 87 | "integrity": "sha512-3Ut96pmCgEFArrdwXKm1q0j1FOqTnG/uOsh24uYNU/ABRsMOOajRlAjCCdQv9f8P916qPrSnF1V3Pd18LAaksg==", 88 | "dependencies": {} 89 | }, 90 | "@stdlib/string-base-replace@0.2.1": { 91 | "integrity": "sha512-n7FRXJDCFTr7BfW/HOhyaOFKYrzsUHS3MULrykCld5MEJrVbTL61eXRWBPhMWeTVwJHCHU6zxtiwGt4+cU5vdg==", 92 | "dependencies": {} 93 | }, 94 | "@stdlib/string-base-trim@0.2.1": { 95 | "integrity": "sha512-1X5auUy9y2+qZHg8InGh7+8zCTyUy29D059FjUrUcLiHqBBGkeuYwIHFOUONReFs4ZcZ4Xe86NtelS5pbIm7hQ==", 96 | "dependencies": { 97 | "@stdlib/string-base-replace": "@stdlib/string-base-replace@0.2.1" 98 | } 99 | }, 100 | "@stdlib/string-format@0.2.1": { 101 | "integrity": "sha512-+HpXkEJ0Z4gthH5KicXvRRJiCiCTSrKzM+mS8N6vwaAD+OG+Oq8Cn43XBD1ic/UHROI9un42MruF1ZLlkSmdOw==", 102 | "dependencies": { 103 | "@stdlib/string-base-format-interpolate": "@stdlib/string-base-format-interpolate@0.2.1", 104 | "@stdlib/string-base-format-tokenize": "@stdlib/string-base-format-tokenize@0.2.1" 105 | } 106 | }, 107 | "@stdlib/symbol-ctor@0.2.1": { 108 | "integrity": "sha512-ZZAuKPJZ9PVrbRCp4iPKdlyh7uyrCi39dqrU/j/w38mOzYZJV6utK33eeAIsQH5yMDO7Tr0Zu69TKGf2XqmaPw==", 109 | "dependencies": {} 110 | }, 111 | "@stdlib/utils-define-nonenumerable-read-only-property@0.2.1": { 112 | "integrity": "sha512-L8fs1kI79T2RQIg8rHR9aQnnSDELqiDGWbK3jA1NP8iW+ydxlxXyO8Dw17fBCXVua3Y19a1NVyGtIN5WGe2UCw==", 113 | "dependencies": { 114 | "@stdlib/utils-define-property": "@stdlib/utils-define-property@0.2.3" 115 | } 116 | }, 117 | "@stdlib/utils-define-property@0.2.3": { 118 | "integrity": "sha512-+EzWImaQR/6XNFbXIITFi3PLQGTbKVIWSYxJfHXAuTtibAMnhHOWvEzKOumVe/Q4Cdsrc3/PIkpjJzliqAX9AA==", 119 | "dependencies": { 120 | "@stdlib/error-tools-fmtprodmsg": "@stdlib/error-tools-fmtprodmsg@0.2.1", 121 | "@stdlib/string-format": "@stdlib/string-format@0.2.1" 122 | } 123 | }, 124 | "@stdlib/utils-native-class@0.2.1": { 125 | "integrity": "sha512-tM3am6amt50I4mFRlClExUmORqPzMExgDyZc4Lur+LXn5wb0uEoeBbJ27ftMDg8PNLSi5RUuBCwZBEXvYpG0yw==", 126 | "dependencies": { 127 | "@stdlib/assert-has-own-property": "@stdlib/assert-has-own-property@0.2.1", 128 | "@stdlib/assert-has-tostringtag-support": "@stdlib/assert-has-tostringtag-support@0.2.1", 129 | "@stdlib/symbol-ctor": "@stdlib/symbol-ctor@0.2.1" 130 | } 131 | }, 132 | "ansi-regex@5.0.1": { 133 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 134 | "dependencies": {} 135 | }, 136 | "ansi-regex@6.0.1": { 137 | "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", 138 | "dependencies": {} 139 | }, 140 | "ansi-styles@4.3.0": { 141 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 142 | "dependencies": { 143 | "color-convert": "color-convert@2.0.1" 144 | } 145 | }, 146 | "ansi-styles@6.2.1": { 147 | "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", 148 | "dependencies": {} 149 | }, 150 | "balanced-match@1.0.2": { 151 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 152 | "dependencies": {} 153 | }, 154 | "brace-expansion@2.0.1": { 155 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 156 | "dependencies": { 157 | "balanced-match": "balanced-match@1.0.2" 158 | } 159 | }, 160 | "color-convert@2.0.1": { 161 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 162 | "dependencies": { 163 | "color-name": "color-name@1.1.4" 164 | } 165 | }, 166 | "color-name@1.1.4": { 167 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 168 | "dependencies": {} 169 | }, 170 | "cross-spawn@7.0.3": { 171 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 172 | "dependencies": { 173 | "path-key": "path-key@3.1.1", 174 | "shebang-command": "shebang-command@2.0.0", 175 | "which": "which@2.0.2" 176 | } 177 | }, 178 | "eastasianwidth@0.2.0": { 179 | "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", 180 | "dependencies": {} 181 | }, 182 | "emoji-regex@8.0.0": { 183 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 184 | "dependencies": {} 185 | }, 186 | "emoji-regex@9.2.2": { 187 | "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", 188 | "dependencies": {} 189 | }, 190 | "foreground-child@3.1.1": { 191 | "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", 192 | "dependencies": { 193 | "cross-spawn": "cross-spawn@7.0.3", 194 | "signal-exit": "signal-exit@4.1.0" 195 | } 196 | }, 197 | "fs@0.0.1-security": { 198 | "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==", 199 | "dependencies": {} 200 | }, 201 | "glob@10.3.10": { 202 | "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", 203 | "dependencies": { 204 | "foreground-child": "foreground-child@3.1.1", 205 | "jackspeak": "jackspeak@2.3.6", 206 | "minimatch": "minimatch@9.0.3", 207 | "minipass": "minipass@7.0.4", 208 | "path-scurry": "path-scurry@1.10.1" 209 | } 210 | }, 211 | "hex-encoding@2.0.2": { 212 | "integrity": "sha512-NhclxbCmF1NTU9mE0GYEkUrFX5VvnfiHrzcqGbsQJcLT33rE/yqBB+U1bHDuLk86AQyN/hsr+Q/sX3jRxmarhg==", 213 | "dependencies": { 214 | "node-buffer-encoding": "node-buffer-encoding@1.0.2", 215 | "uint8-encoding": "uint8-encoding@2.0.0" 216 | } 217 | }, 218 | "inherits@2.0.3": { 219 | "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", 220 | "dependencies": {} 221 | }, 222 | "is-fullwidth-code-point@3.0.0": { 223 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 224 | "dependencies": {} 225 | }, 226 | "isexe@2.0.0": { 227 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", 228 | "dependencies": {} 229 | }, 230 | "jackspeak@2.3.6": { 231 | "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", 232 | "dependencies": { 233 | "@isaacs/cliui": "@isaacs/cliui@8.0.2", 234 | "@pkgjs/parseargs": "@pkgjs/parseargs@0.11.0" 235 | } 236 | }, 237 | "lru-cache@10.1.0": { 238 | "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", 239 | "dependencies": {} 240 | }, 241 | "matts-llm-tools@0.0.4_typescript@5.2.2": { 242 | "integrity": "sha512-FcC+H8I6OtNsOijnkzZWrR4Xpg12CeGaw0dz3A8cu3CNHT9vi+v+A9U/Fbr9EgZI+psGo8VIgcMvOvnympVfPQ==", 243 | "dependencies": { 244 | "@stdlib/nlp-sentencize": "@stdlib/nlp-sentencize@0.2.1", 245 | "fs": "fs@0.0.1-security", 246 | "glob": "glob@10.3.10", 247 | "hex-encoding": "hex-encoding@2.0.2", 248 | "ollama": "ollama@0.5.0", 249 | "path": "path@0.12.7", 250 | "typescript": "typescript@5.2.2" 251 | } 252 | }, 253 | "matts-llm-tools@0.0.5_typescript@5.2.2": { 254 | "integrity": "sha512-N48yu1Em7CVJg32UzdoGdLIxLAAvcujGbFKVCrggXTS10eq5GNSS0bH9TyDvxMw6dmFanG8pyf51n57wrQ4tdA==", 255 | "dependencies": { 256 | "@stdlib/nlp-sentencize": "@stdlib/nlp-sentencize@0.2.1", 257 | "fs": "fs@0.0.1-security", 258 | "glob": "glob@10.3.10", 259 | "hex-encoding": "hex-encoding@2.0.2", 260 | "ollama": "ollama@0.5.0", 261 | "path": "path@0.12.7", 262 | "typescript": "typescript@5.2.2" 263 | } 264 | }, 265 | "matts-llm-tools@0.0.6_typescript@5.2.2": { 266 | "integrity": "sha512-O4mng7/HaUMQQpKAcCLx/S36XTPFKTsuyKmVIYVyswHQ9f/kQ1SgGBlqexfTRLiW6i45KrAbhEa1bZQsGFupLA==", 267 | "dependencies": { 268 | "@stdlib/nlp-sentencize": "@stdlib/nlp-sentencize@0.2.1", 269 | "fs": "fs@0.0.1-security", 270 | "glob": "glob@10.3.10", 271 | "hex-encoding": "hex-encoding@2.0.2", 272 | "ollama": "ollama@0.5.0", 273 | "path": "path@0.12.7", 274 | "typescript": "typescript@5.2.2" 275 | } 276 | }, 277 | "minimatch@9.0.3": { 278 | "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", 279 | "dependencies": { 280 | "brace-expansion": "brace-expansion@2.0.1" 281 | } 282 | }, 283 | "minipass@7.0.4": { 284 | "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", 285 | "dependencies": {} 286 | }, 287 | "node-buffer-encoding@1.0.2": { 288 | "integrity": "sha512-v2QFjf04xWb5Q7cyzbi8qEwe2vw2xJBXT7+pMOLA02+KJZlcJ/6syFYiH96ClXKfOG/kyBeysAuewJ7zfAUYKQ==", 289 | "dependencies": {} 290 | }, 291 | "ollama@0.4.4": { 292 | "integrity": "sha512-vAOZ3LM3DUE98Yy+iUJHu9Y9juKmjDAMntYoe8XqGAEkJkU5ZRkO1lwJxu5sRNU6WkEQ3MoHsvgeVIWr+cQmbg==", 293 | "dependencies": { 294 | "whatwg-fetch": "whatwg-fetch@3.6.20" 295 | } 296 | }, 297 | "ollama@0.5.0": { 298 | "integrity": "sha512-CRtRzsho210EGdK52GrUMohA2pU+7NbgEaBG3DcYeRmvQthDO7E2LHOkLlUUeaYUlNmEd8icbjC02ug9meSYnw==", 299 | "dependencies": { 300 | "whatwg-fetch": "whatwg-fetch@3.6.20" 301 | } 302 | }, 303 | "path-key@3.1.1": { 304 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 305 | "dependencies": {} 306 | }, 307 | "path-scurry@1.10.1": { 308 | "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", 309 | "dependencies": { 310 | "lru-cache": "lru-cache@10.1.0", 311 | "minipass": "minipass@7.0.4" 312 | } 313 | }, 314 | "path@0.12.7": { 315 | "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", 316 | "dependencies": { 317 | "process": "process@0.11.10", 318 | "util": "util@0.10.4" 319 | } 320 | }, 321 | "process@0.11.10": { 322 | "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", 323 | "dependencies": {} 324 | }, 325 | "shebang-command@2.0.0": { 326 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 327 | "dependencies": { 328 | "shebang-regex": "shebang-regex@3.0.0" 329 | } 330 | }, 331 | "shebang-regex@3.0.0": { 332 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 333 | "dependencies": {} 334 | }, 335 | "signal-exit@4.1.0": { 336 | "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", 337 | "dependencies": {} 338 | }, 339 | "string-width@4.2.3": { 340 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 341 | "dependencies": { 342 | "emoji-regex": "emoji-regex@8.0.0", 343 | "is-fullwidth-code-point": "is-fullwidth-code-point@3.0.0", 344 | "strip-ansi": "strip-ansi@6.0.1" 345 | } 346 | }, 347 | "string-width@5.1.2": { 348 | "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", 349 | "dependencies": { 350 | "eastasianwidth": "eastasianwidth@0.2.0", 351 | "emoji-regex": "emoji-regex@9.2.2", 352 | "strip-ansi": "strip-ansi@7.1.0" 353 | } 354 | }, 355 | "strip-ansi@6.0.1": { 356 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 357 | "dependencies": { 358 | "ansi-regex": "ansi-regex@5.0.1" 359 | } 360 | }, 361 | "strip-ansi@7.1.0": { 362 | "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", 363 | "dependencies": { 364 | "ansi-regex": "ansi-regex@6.0.1" 365 | } 366 | }, 367 | "typescript@5.2.2": { 368 | "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", 369 | "dependencies": {} 370 | }, 371 | "uint8-encoding@2.0.0": { 372 | "integrity": "sha512-MQcY+mEuLoHBqAawasWrFbZx1SqUoFU/wVYNGO6lsIxczeO+cNjA1djYHQM3GWU3SaEhKTfG3Z5cE2r+zR6tNw==", 373 | "dependencies": {} 374 | }, 375 | "util@0.10.4": { 376 | "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", 377 | "dependencies": { 378 | "inherits": "inherits@2.0.3" 379 | } 380 | }, 381 | "whatwg-fetch@3.6.20": { 382 | "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", 383 | "dependencies": {} 384 | }, 385 | "which@2.0.2": { 386 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 387 | "dependencies": { 388 | "isexe": "isexe@2.0.0" 389 | } 390 | }, 391 | "wrap-ansi@7.0.0": { 392 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 393 | "dependencies": { 394 | "ansi-styles": "ansi-styles@4.3.0", 395 | "string-width": "string-width@4.2.3", 396 | "strip-ansi": "strip-ansi@6.0.1" 397 | } 398 | }, 399 | "wrap-ansi@8.1.0": { 400 | "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", 401 | "dependencies": { 402 | "ansi-styles": "ansi-styles@6.2.1", 403 | "string-width": "string-width@5.1.2", 404 | "strip-ansi": "strip-ansi@7.1.0" 405 | } 406 | } 407 | } 408 | }, 409 | "redirects": { 410 | "https://deno.land/std/assert/mod.ts": "https://deno.land/std@0.204.0/assert/mod.ts", 411 | "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.211.0/path/mod.ts", 412 | "https://deno.land/std/testing/asserts.ts": "https://deno.land/std@0.213.0/testing/asserts.ts", 413 | "https://deno.land/x/bb64/mod.ts": "https://deno.land/x/bb64@1.1.0/mod.ts" 414 | }, 415 | "remote": { 416 | "https://deno.land/std@0.204.0/assert/_constants.ts": "8a9da298c26750b28b326b297316cdde860bc237533b07e1337c021379e6b2a9", 417 | "https://deno.land/std@0.204.0/assert/_diff.ts": "58e1461cc61d8eb1eacbf2a010932bf6a05b79344b02ca38095f9b805795dc48", 418 | "https://deno.land/std@0.204.0/assert/_format.ts": "a69126e8a469009adf4cf2a50af889aca364c349797e63174884a52ff75cf4c7", 419 | "https://deno.land/std@0.204.0/assert/assert.ts": "9a97dad6d98c238938e7540736b826440ad8c1c1e54430ca4c4e623e585607ee", 420 | "https://deno.land/std@0.204.0/assert/assert_almost_equals.ts": "e15ca1f34d0d5e0afae63b3f5d975cbd18335a132e42b0c747d282f62ad2cd6c", 421 | "https://deno.land/std@0.204.0/assert/assert_array_includes.ts": "6856d7f2c3544bc6e62fb4646dfefa3d1df5ff14744d1bca19f0cbaf3b0d66c9", 422 | "https://deno.land/std@0.204.0/assert/assert_equals.ts": "d8ec8a22447fbaf2fc9d7c3ed2e66790fdb74beae3e482855d75782218d68227", 423 | "https://deno.land/std@0.204.0/assert/assert_exists.ts": "407cb6b9fb23a835cd8d5ad804e2e2edbbbf3870e322d53f79e1c7a512e2efd7", 424 | "https://deno.land/std@0.204.0/assert/assert_false.ts": "0ccbcaae910f52c857192ff16ea08bda40fdc79de80846c206bfc061e8c851c6", 425 | "https://deno.land/std@0.204.0/assert/assert_greater.ts": "ae2158a2d19313bf675bf7251d31c6dc52973edb12ac64ac8fc7064152af3e63", 426 | "https://deno.land/std@0.204.0/assert/assert_greater_or_equal.ts": "1439da5ebbe20855446cac50097ac78b9742abe8e9a43e7de1ce1426d556e89c", 427 | "https://deno.land/std@0.204.0/assert/assert_instance_of.ts": "3aedb3d8186e120812d2b3a5dea66a6e42bf8c57a8bd927645770bd21eea554c", 428 | "https://deno.land/std@0.204.0/assert/assert_is_error.ts": "c21113094a51a296ffaf036767d616a78a2ae5f9f7bbd464cd0197476498b94b", 429 | "https://deno.land/std@0.204.0/assert/assert_less.ts": "aec695db57db42ec3e2b62e97e1e93db0063f5a6ec133326cc290ff4b71b47e4", 430 | "https://deno.land/std@0.204.0/assert/assert_less_or_equal.ts": "5fa8b6a3ffa20fd0a05032fe7257bf985d207b85685fdbcd23651b70f928c848", 431 | "https://deno.land/std@0.204.0/assert/assert_match.ts": "c4083f80600bc190309903c95e397a7c9257ff8b5ae5c7ef91e834704e672e9b", 432 | "https://deno.land/std@0.204.0/assert/assert_not_equals.ts": "9f1acab95bd1f5fc9a1b17b8027d894509a745d91bac1718fdab51dc76831754", 433 | "https://deno.land/std@0.204.0/assert/assert_not_instance_of.ts": "0c14d3dfd9ab7a5276ed8ed0b18c703d79a3d106102077ec437bfe7ed912bd22", 434 | "https://deno.land/std@0.204.0/assert/assert_not_match.ts": "3796a5b0c57a1ce6c1c57883dd4286be13a26f715ea662318ab43a8491a13ab0", 435 | "https://deno.land/std@0.204.0/assert/assert_not_strict_equals.ts": "ca6c6d645e95fbc873d25320efeb8c4c6089a9a5e09f92d7c1c4b6e935c2a6ad", 436 | "https://deno.land/std@0.204.0/assert/assert_object_match.ts": "d8fc2867cfd92eeacf9cea621e10336b666de1874a6767b5ec48988838370b54", 437 | "https://deno.land/std@0.204.0/assert/assert_rejects.ts": "45c59724de2701e3b1f67c391d6c71c392363635aad3f68a1b3408f9efca0057", 438 | "https://deno.land/std@0.204.0/assert/assert_strict_equals.ts": "b1f538a7ea5f8348aeca261d4f9ca603127c665e0f2bbfeb91fa272787c87265", 439 | "https://deno.land/std@0.204.0/assert/assert_string_includes.ts": "b821d39ebf5cb0200a348863c86d8c4c4b398e02012ce74ad15666fc4b631b0c", 440 | "https://deno.land/std@0.204.0/assert/assert_throws.ts": "63784e951475cb7bdfd59878cd25a0931e18f6dc32a6077c454b2cd94f4f4bcd", 441 | "https://deno.land/std@0.204.0/assert/assertion_error.ts": "4d0bde9b374dfbcbe8ac23f54f567b77024fb67dbb1906a852d67fe050d42f56", 442 | "https://deno.land/std@0.204.0/assert/equal.ts": "9f1a46d5993966d2596c44e5858eec821859b45f783a5ee2f7a695dfc12d8ece", 443 | "https://deno.land/std@0.204.0/assert/fail.ts": "c36353d7ae6e1f7933d45f8ea51e358c8c4b67d7e7502028598fe1fea062e278", 444 | "https://deno.land/std@0.204.0/assert/mod.ts": "37c49a26aae2b254bbe25723434dc28cd7532e444cf0b481a97c045d110ec085", 445 | "https://deno.land/std@0.204.0/assert/unimplemented.ts": "d56fbeecb1f108331a380f72e3e010a1f161baa6956fd0f7cf3e095ae1a4c75a", 446 | "https://deno.land/std@0.204.0/assert/unreachable.ts": "4600dc0baf7d9c15a7f7d234f00c23bca8f3eba8b140286aaca7aa998cf9a536", 447 | "https://deno.land/std@0.204.0/fmt/colors.ts": "c51c4642678eb690dcf5ffee5918b675bf01a33fba82acf303701ae1a4f8c8d9", 448 | "https://deno.land/std@0.207.0/encoding/_util.ts": "f368920189c4fe6592ab2e93bd7ded8f3065b84f95cd3e036a4a10a75649dcba", 449 | "https://deno.land/std@0.207.0/encoding/base64.ts": "81c0ecff5ccb402def58ca03d8bd245bd01da15a077d3362b568e991aa10f4d9", 450 | "https://deno.land/std@0.211.0/assert/assert.ts": "bec068b2fccdd434c138a555b19a2c2393b71dfaada02b7d568a01541e67cdc5", 451 | "https://deno.land/std@0.211.0/assert/assertion_error.ts": "9f689a101ee586c4ce92f52fa7ddd362e86434ffdf1f848e45987dc7689976b8", 452 | "https://deno.land/std@0.211.0/path/_common/assert_path.ts": "2ca275f36ac1788b2acb60fb2b79cb06027198bc2ba6fb7e163efaedde98c297", 453 | "https://deno.land/std@0.211.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2", 454 | "https://deno.land/std@0.211.0/path/_common/common.ts": "6157c7ec1f4db2b4a9a187efd6ce76dcaf1e61cfd49f87e40d4ea102818df031", 455 | "https://deno.land/std@0.211.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c", 456 | "https://deno.land/std@0.211.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", 457 | "https://deno.land/std@0.211.0/path/_common/format.ts": "92500e91ea5de21c97f5fe91e178bae62af524b72d5fcd246d6d60ae4bcada8b", 458 | "https://deno.land/std@0.211.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf", 459 | "https://deno.land/std@0.211.0/path/_common/glob_to_reg_exp.ts": "2007aa87bed6eb2c8ae8381adcc3125027543d9ec347713c1ad2c68427330770", 460 | "https://deno.land/std@0.211.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", 461 | "https://deno.land/std@0.211.0/path/_common/normalize_string.ts": "dfdf657a1b1a7db7999f7c575ee7e6b0551d9c20f19486c6c3f5ff428384c965", 462 | "https://deno.land/std@0.211.0/path/_common/relative.ts": "faa2753d9b32320ed4ada0733261e3357c186e5705678d9dd08b97527deae607", 463 | "https://deno.land/std@0.211.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a", 464 | "https://deno.land/std@0.211.0/path/_common/to_file_url.ts": "7f76adbc83ece1bba173e6e98a27c647712cab773d3f8cbe0398b74afc817883", 465 | "https://deno.land/std@0.211.0/path/_interface.ts": "a1419fcf45c0ceb8acdccc94394e3e94f99e18cfd32d509aab514c8841799600", 466 | "https://deno.land/std@0.211.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15", 467 | "https://deno.land/std@0.211.0/path/basename.ts": "5d341aadb7ada266e2280561692c165771d071c98746fcb66da928870cd47668", 468 | "https://deno.land/std@0.211.0/path/common.ts": "973e019d3cfa6a134a13f1fda3f7efbaf400a64365d7a7b96f66afe373a09dc5", 469 | "https://deno.land/std@0.211.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c", 470 | "https://deno.land/std@0.211.0/path/extname.ts": "593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441", 471 | "https://deno.land/std@0.211.0/path/format.ts": "98fad25f1af7b96a48efb5b67378fcc8ed77be895df8b9c733b86411632162af", 472 | "https://deno.land/std@0.211.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069", 473 | "https://deno.land/std@0.211.0/path/glob_to_regexp.ts": "83c5fd36a8c86f5e72df9d0f45317f9546afa2ce39acaafe079d43a865aced08", 474 | "https://deno.land/std@0.211.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7", 475 | "https://deno.land/std@0.211.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141", 476 | "https://deno.land/std@0.211.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a", 477 | "https://deno.land/std@0.211.0/path/join_globs.ts": "e9589869a33dc3982101898ee50903db918ca00ad2614dbe3934d597d7b1fbea", 478 | "https://deno.land/std@0.211.0/path/mod.ts": "8e1ffe983557e9637184ccb84bd6b0447e319f4a28bfad7f3f41ee050579e5e6", 479 | "https://deno.land/std@0.211.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352", 480 | "https://deno.land/std@0.211.0/path/normalize_glob.ts": "98ee8268fad271193603271c203ae973280b5abfbdd2cbca1053fd2af71869ca", 481 | "https://deno.land/std@0.211.0/path/parse.ts": "65e8e285f1a63b714e19ef24b68f56e76934c3df0b6e65fd440d3991f4f8aefb", 482 | "https://deno.land/std@0.211.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d", 483 | "https://deno.land/std@0.211.0/path/posix/basename.ts": "39ee27a29f1f35935d3603ccf01d53f3d6e0c5d4d0f84421e65bd1afeff42843", 484 | "https://deno.land/std@0.211.0/path/posix/common.ts": "809cc86e79db8171b9a97ac397d56b9588c25a8f3062f483c8d651a2b6739daa", 485 | "https://deno.land/std@0.211.0/path/posix/dirname.ts": "6535d2bdd566118963537b9dda8867ba9e2a361015540dc91f5afbb65c0cce8b", 486 | "https://deno.land/std@0.211.0/path/posix/extname.ts": "8d36ae0082063c5e1191639699e6f77d3acf501600a3d87b74943f0ae5327427", 487 | "https://deno.land/std@0.211.0/path/posix/format.ts": "185e9ee2091a42dd39e2a3b8e4925370ee8407572cee1ae52838aed96310c5c1", 488 | "https://deno.land/std@0.211.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40", 489 | "https://deno.land/std@0.211.0/path/posix/glob_to_regexp.ts": "54d3ff40f309e3732ab6e5b19d7111d2d415248bcd35b67a99defcbc1972e697", 490 | "https://deno.land/std@0.211.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede", 491 | "https://deno.land/std@0.211.0/path/posix/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", 492 | "https://deno.land/std@0.211.0/path/posix/join.ts": "aef88d5fa3650f7516730865dbb951594d1a955b785e2450dbee93b8e32694f3", 493 | "https://deno.land/std@0.211.0/path/posix/join_globs.ts": "35ddd5f321d79e1fc72d2ec9a8d8863f0bb1431125e57bb2661799278d4ee9cd", 494 | "https://deno.land/std@0.211.0/path/posix/mod.ts": "9dfff9f3618ba6990eb8495dadef13871e5756419b25079b6b905a4ebf790926", 495 | "https://deno.land/std@0.211.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91", 496 | "https://deno.land/std@0.211.0/path/posix/normalize_glob.ts": "0f01bcfb0791144f0e901fd2cc706432baf84828c393f3c25c53583f03d0c0b7", 497 | "https://deno.land/std@0.211.0/path/posix/parse.ts": "d5bac4eb21262ab168eead7e2196cb862940c84cee572eafedd12a0d34adc8fb", 498 | "https://deno.land/std@0.211.0/path/posix/relative.ts": "3907d6eda41f0ff723d336125a1ad4349112cd4d48f693859980314d5b9da31c", 499 | "https://deno.land/std@0.211.0/path/posix/resolve.ts": "bac20d9921beebbbb2b73706683b518b1d0c1b1da514140cee409e90d6b2913a", 500 | "https://deno.land/std@0.211.0/path/posix/separator.ts": "6530f253a33d92d8f8a1d1d7fa7fad2992c739ad9886dde72e4e78793f1cfd49", 501 | "https://deno.land/std@0.211.0/path/posix/to_file_url.ts": "7aa752ba66a35049e0e4a4be5a0a31ac6b645257d2e031142abb1854de250aaf", 502 | "https://deno.land/std@0.211.0/path/posix/to_namespaced_path.ts": "28b216b3c76f892a4dca9734ff1cc0045d135532bfd9c435ae4858bfa5a2ebf0", 503 | "https://deno.land/std@0.211.0/path/relative.ts": "ab739d727180ed8727e34ed71d976912461d98e2b76de3d3de834c1066667add", 504 | "https://deno.land/std@0.211.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d", 505 | "https://deno.land/std@0.211.0/path/separator.ts": "2b5a590d4f1942e70650ee7421d161c24ec7d3b94b49981e4138ae07397fb2d2", 506 | "https://deno.land/std@0.211.0/path/to_file_url.ts": "88f049b769bce411e2d2db5bd9e6fd9a185a5fbd6b9f5ad8f52bef517c4ece1b", 507 | "https://deno.land/std@0.211.0/path/to_namespaced_path.ts": "b706a4103b104cfadc09600a5f838c2ba94dbcdb642344557122dda444526e40", 508 | "https://deno.land/std@0.211.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808", 509 | "https://deno.land/std@0.211.0/path/windows/basename.ts": "e2dbf31d1d6385bfab1ce38c333aa290b6d7ae9e0ecb8234a654e583cf22f8fe", 510 | "https://deno.land/std@0.211.0/path/windows/common.ts": "809cc86e79db8171b9a97ac397d56b9588c25a8f3062f483c8d651a2b6739daa", 511 | "https://deno.land/std@0.211.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9", 512 | "https://deno.land/std@0.211.0/path/windows/extname.ts": "165a61b00d781257fda1e9606a48c78b06815385e7d703232548dbfc95346bef", 513 | "https://deno.land/std@0.211.0/path/windows/format.ts": "bbb5ecf379305b472b1082cd2fdc010e44a0020030414974d6029be9ad52aeb6", 514 | "https://deno.land/std@0.211.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01", 515 | "https://deno.land/std@0.211.0/path/windows/glob_to_regexp.ts": "6dcd1242bd8907aa9660cbdd7c93446e6927b201112b0cba37ca5d80f81be51b", 516 | "https://deno.land/std@0.211.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a", 517 | "https://deno.land/std@0.211.0/path/windows/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", 518 | "https://deno.land/std@0.211.0/path/windows/join.ts": "e0b3356615c1a75c56ebb6a7311157911659e11fd533d80d724800126b761ac3", 519 | "https://deno.land/std@0.211.0/path/windows/join_globs.ts": "35ddd5f321d79e1fc72d2ec9a8d8863f0bb1431125e57bb2661799278d4ee9cd", 520 | "https://deno.land/std@0.211.0/path/windows/mod.ts": "e739f7e783b69fb7956bed055e117201ccb071a7917c09f87c5c8c2b54369d38", 521 | "https://deno.land/std@0.211.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780", 522 | "https://deno.land/std@0.211.0/path/windows/normalize_glob.ts": "49c634af33a7c6bc738885c4b34633278b7ab47bd47bf11281b2190970b823e2", 523 | "https://deno.land/std@0.211.0/path/windows/parse.ts": "b9239edd892a06a06625c1b58425e199f018ce5649ace024d144495c984da734", 524 | "https://deno.land/std@0.211.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7", 525 | "https://deno.land/std@0.211.0/path/windows/resolve.ts": "75b2e3e1238d840782cee3d8864d82bfaa593c7af8b22f19c6422cf82f330ab3", 526 | "https://deno.land/std@0.211.0/path/windows/separator.ts": "2bbcc551f64810fb43252185bd1d33d66e0477d74bd52f03b89f5dc21a3dd486", 527 | "https://deno.land/std@0.211.0/path/windows/to_file_url.ts": "1cd63fd35ec8d1370feaa4752eccc4cc05ea5362a878be8dc7db733650995484", 528 | "https://deno.land/std@0.211.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c", 529 | "https://deno.land/std@0.213.0/assert/_constants.ts": "a271e8ef5a573f1df8e822a6eb9d09df064ad66a4390f21b3e31f820a38e0975", 530 | "https://deno.land/std@0.213.0/assert/_diff.ts": "dcc63d94ca289aec80644030cf88ccbf7acaa6fbd7b0f22add93616b36593840", 531 | "https://deno.land/std@0.213.0/assert/_format.ts": "0ba808961bf678437fb486b56405b6fefad2cf87b5809667c781ddee8c32aff4", 532 | "https://deno.land/std@0.213.0/assert/assert.ts": "bec068b2fccdd434c138a555b19a2c2393b71dfaada02b7d568a01541e67cdc5", 533 | "https://deno.land/std@0.213.0/assert/assert_almost_equals.ts": "8b96b7385cc117668b0720115eb6ee73d04c9bcb2f5d2344d674918c9113688f", 534 | "https://deno.land/std@0.213.0/assert/assert_array_includes.ts": "1688d76317fd45b7e93ef9e2765f112fdf2b7c9821016cdfb380b9445374aed1", 535 | "https://deno.land/std@0.213.0/assert/assert_equals.ts": "4497c56fe7d2993b0d447926702802fc0becb44e319079e8eca39b482ee01b4e", 536 | "https://deno.land/std@0.213.0/assert/assert_exists.ts": "24a7bf965e634f909242cd09fbaf38bde6b791128ece08e33ab08586a7cc55c9", 537 | "https://deno.land/std@0.213.0/assert/assert_false.ts": "6f382568e5128c0f855e5f7dbda8624c1ed9af4fcc33ef4a9afeeedcdce99769", 538 | "https://deno.land/std@0.213.0/assert/assert_greater.ts": "4945cf5729f1a38874d7e589e0fe5cc5cd5abe5573ca2ddca9d3791aa891856c", 539 | "https://deno.land/std@0.213.0/assert/assert_greater_or_equal.ts": "573ed8823283b8d94b7443eb69a849a3c369a8eb9666b2d1db50c33763a5d219", 540 | "https://deno.land/std@0.213.0/assert/assert_instance_of.ts": "72dc1faff1e248692d873c89382fa1579dd7b53b56d52f37f9874a75b11ba444", 541 | "https://deno.land/std@0.213.0/assert/assert_is_error.ts": "6596f2b5ba89ba2fe9b074f75e9318cda97a2381e59d476812e30077fbdb6ed2", 542 | "https://deno.land/std@0.213.0/assert/assert_less.ts": "2b4b3fe7910f65f7be52212f19c3977ecb8ba5b2d6d0a296c83cde42920bb005", 543 | "https://deno.land/std@0.213.0/assert/assert_less_or_equal.ts": "b93d212fe669fbde959e35b3437ac9a4468f2e6b77377e7b6ea2cfdd825d38a0", 544 | "https://deno.land/std@0.213.0/assert/assert_match.ts": "ec2d9680ed3e7b9746ec57ec923a17eef6d476202f339ad91d22277d7f1d16e1", 545 | "https://deno.land/std@0.213.0/assert/assert_not_equals.ts": "f3edda73043bc2c9fae6cbfaa957d5c69bbe76f5291a5b0466ed132c8789df4c", 546 | "https://deno.land/std@0.213.0/assert/assert_not_instance_of.ts": "8f720d92d83775c40b2542a8d76c60c2d4aeddaf8713c8d11df8984af2604931", 547 | "https://deno.land/std@0.213.0/assert/assert_not_match.ts": "b4b7c77f146963e2b673c1ce4846473703409eb93f5ab0eb60f6e6f8aeffe39f", 548 | "https://deno.land/std@0.213.0/assert/assert_not_strict_equals.ts": "da0b8ab60a45d5a9371088378e5313f624799470c3b54c76e8b8abeec40a77be", 549 | "https://deno.land/std@0.213.0/assert/assert_object_match.ts": "e85e5eef62a56ce364c3afdd27978ccab979288a3e772e6855c270a7b118fa49", 550 | "https://deno.land/std@0.213.0/assert/assert_rejects.ts": "e9e0c8d9c3e164c7ac962c37b3be50577c5a2010db107ed272c4c1afb1269f54", 551 | "https://deno.land/std@0.213.0/assert/assert_strict_equals.ts": "0425a98f70badccb151644c902384c12771a93e65f8ff610244b8147b03a2366", 552 | "https://deno.land/std@0.213.0/assert/assert_string_includes.ts": "dfb072a890167146f8e5bdd6fde887ce4657098e9f71f12716ef37f35fb6f4a7", 553 | "https://deno.land/std@0.213.0/assert/assert_throws.ts": "edddd86b39606c342164b49ad88dd39a26e72a26655e07545d172f164b617fa7", 554 | "https://deno.land/std@0.213.0/assert/assertion_error.ts": "9f689a101ee586c4ce92f52fa7ddd362e86434ffdf1f848e45987dc7689976b8", 555 | "https://deno.land/std@0.213.0/assert/equal.ts": "fae5e8a52a11d3ac694bbe1a53e13a7969e3f60791262312e91a3e741ae519e2", 556 | "https://deno.land/std@0.213.0/assert/fail.ts": "f310e51992bac8e54f5fd8e44d098638434b2edb802383690e0d7a9be1979f1c", 557 | "https://deno.land/std@0.213.0/assert/mod.ts": "325df8c0683ad83a873b9691aa66b812d6275fc9fec0b2d180ac68a2c5efed3b", 558 | "https://deno.land/std@0.213.0/assert/unimplemented.ts": "47ca67d1c6dc53abd0bd729b71a31e0825fc452dbcd4fde4ca06789d5644e7fd", 559 | "https://deno.land/std@0.213.0/assert/unreachable.ts": "38cfecb95d8b06906022d2f9474794fca4161a994f83354fd079cac9032b5145", 560 | "https://deno.land/std@0.213.0/fmt/colors.ts": "aeaee795471b56fc62a3cb2e174ed33e91551b535f44677f6320336aabb54fbb", 561 | "https://deno.land/std@0.213.0/testing/asserts.ts": "0cb9c745d9b157bed062a4aa8647168d2221f6456c385a548b0ca24de9e0f3ca", 562 | "https://deno.land/x/bb64@1.1.0/mod.ts": "6e059e6c8cb5ff17910adf85751b10c4628f0fa943c2b1647508aa0cb250274f" 563 | } 564 | } 565 | -------------------------------------------------------------------------------- /main.ts: -------------------------------------------------------------------------------- 1 | import { Base64 } from "https://deno.land/x/bb64@1.1.0/mod.ts"; 2 | import ollama from "npm:ollama"; 3 | 4 | export async function getkeywords(image: string): Promise { 5 | const body = { 6 | "model": "llava:13b", 7 | "format": "json", 8 | "prompt": `Describe the image as a collection of keywords. Output in JSON format. Use the following schema: { filename: string, keywords: string[] }`, 9 | "images": [image], 10 | "stream": false 11 | }; 12 | 13 | const response = await fetch("http://localhost:11434/api/generate", { 14 | method: "POST", 15 | headers: { 16 | "Content-Type": "application/json", 17 | }, 18 | body: JSON.stringify(body), 19 | }); 20 | 21 | if (response.status !== 200) { 22 | console.log(`Error: ${response.status}: ${response.statusText}`); 23 | return []; 24 | } else { 25 | const json = await response.json(); 26 | const keywords = JSON.parse(json.response); 27 | return keywords?.keywords || []; 28 | } 29 | 30 | } 31 | 32 | export function createFileName(keywords: string[], fileext: string): string { 33 | let newfilename = ""; 34 | if (keywords.length > 0) { 35 | const fileparts = keywords.map(k => k.replace(/ /g, "_")); 36 | let cl = 0 37 | const filteredWords = fileparts.filter(w => { 38 | cl = cl + w.length + 1; 39 | return cl <= 230 40 | }) 41 | newfilename = filteredWords.join("-") + "." + fileext; 42 | } 43 | return newfilename; 44 | } 45 | 46 | 47 | if (import.meta.main) { 48 | await ollama.pull({model: "llava:13b"}); 49 | const currentpath = Deno.cwd(); 50 | for (const file of Deno.readDirSync(".")) { 51 | if (file.name.endsWith(".jpg") || file.name.endsWith(".jpeg") || file.name.endsWith(".png")) { 52 | 53 | const b64 = Base64.fromFile(`${currentpath}/${file.name}`).toString(); 54 | Base64 55 | const keywords = await getkeywords(b64); 56 | const newfilename = createFileName(keywords, file.name.split(".").pop()!); 57 | Deno.copyFileSync(`${currentpath}/${file.name}`, `${currentpath}/${newfilename}`); 58 | 59 | console.log(`Copied ${file.name} to ${newfilename}`); 60 | } else { 61 | console.log(`Skipping ${file.name}`); 62 | } 63 | } 64 | } 65 | 66 | -------------------------------------------------------------------------------- /main_test.ts: -------------------------------------------------------------------------------- 1 | import { assertEquals, assertMatch, assertThrows } from "https://deno.land/std/assert/mod.ts" 2 | import { createFileName, getkeywords } from "./main.ts"; 3 | 4 | Deno.test("create a good name", () => { 5 | const keywords = ["this", "is", "a", "good", "name", "for", "testing"]; 6 | 7 | const fname = createFileName(keywords, "jpg"); 8 | assertEquals(fname, "this-is-a-good-name-for-testing.jpg"); 9 | }) 10 | 11 | Deno.test("File name too long", () => { 12 | const keywords = ["this", "is", "a", "longer", "name", "for", "testing", "that's", "too", "long", "and", "needs", "to", "be", "truncated", "otherwise", "the", "mac", "will", "fail", "to", "create", "the", "file", "because", "it's", "too", "long", "this", "is", "a", "longer", "name", "for", "testing", "that's", "too", "long", "and", "needs", "to", "be", "truncated", "otherwise", "the", "mac", "will", "fail", "to", "create", "the", "file", "because", "it's", "too", "long", "this", "is", "a", "longer", "name", "for", "testing", "that's", "too", "long", "and", "needs", "to", "be", "truncated", "otherwise", "the", "mac", "will", "fail", "to", "create", "the", "file", "because", "it's", "too", "long"]; 13 | 14 | const destname = "this-is-a-longer-name-for-testing-that's-too-long-and-needs-to-be-truncated-otherwise-the-mac-will-fail-to-create-the-file-because-it's-too-long-this-is-a-longer-name-for-testing-that's-too-long-and-needs-to-be-truncated.jpg"; 15 | 16 | const fname = createFileName(keywords, "jpg"); 17 | assertEquals(fname, destname); 18 | }) 19 | 20 | Deno.test("Underscores for spaces", () => { 21 | const keywords = ["this is a good name", "for testing"]; 22 | 23 | const fname = createFileName(keywords, "jpg"); 24 | assertEquals(fname, "this_is_a_good_name-for_testing.jpg"); 25 | }) 26 | 27 | Deno.test("getKeywords should return an array of keywords", async () => { 28 | const image = "someImageData"; // You need to replace this with actual image data for a valid test 29 | const result = await getkeywords(image); 30 | assertEquals(result, janeiro.instanceOf(Array)); 31 | }); 32 | 33 | Deno.test("getKeywords should return an empty array when no image is provided", async () => { 34 | // Since the function signature expects a string, let's test what happens if we pass in an empty string 35 | const result = await getkeywords(''); 36 | assertEquals(result, []); 37 | }); 38 | 39 | Deno.test("getKeywords should throw an error when passed non-string data", async () => { 40 | // The function signature expects a string argument, so passing in a number should raise an error 41 | await assertThrows(() => getkeywords("123")); // TypeScript requires type assertion to pass wrong type for testing purposes 42 | }); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.8", 3 | "scripts": { 4 | "dev": "deno run --allow-read --allow-net --allow-write --watch main.ts", 5 | "buildapp": "deno compile --allow-read --allow-net --allow-write --output airenamer main.ts" 6 | } 7 | } -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # AI Image File Renamer 2 | 3 | [![let the ai rename your images](https://img.youtube.com/vi/W4Bn73JHPZs/0.jpg)](https://www.youtube.com/watch?v=W4Bn73JHPZs) 4 | 5 | 6 | A simple executable that renames image files based on keywords that describe the image. The keywords are generated using [Ollama.ai](https://ollama.ai). You must have Ollama installed first. 7 | 8 | ## Installation 9 | 10 | 1. Find the latest release for your OS [here](https://github.com/technovangelist/airenamer/releases/latest/) 11 | 2. Rename it to something memorable, like airenamer (or airenamer.exe on Windows). 12 | 3. Ensure it is executable. On Linux or Mac, run `chmod +x airenamer`. 13 | 4. Move the file somewhere into your path. 14 | 5. Again, make sure you have [Ollama.ai](https://ollama.ai) installed. 15 | 16 | ## Usage 17 | 18 | Navigate to a folder with some images in it and run `airenamer`. 19 | 20 | Make sure you have a backup first. It only copies the files, but I'm not responsible for any data loss. 21 | --------------------------------------------------------------------------------