ai-renamer
Advanced tools
Comparing version 1.0.17 to 1.0.18
{ | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"license": "GPL-3.0", | ||
@@ -15,2 +15,6 @@ "name": "ai-renamer", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ozgrozer/ai-renamer.git" | ||
}, | ||
"dependencies": { | ||
@@ -17,0 +21,0 @@ "change-case": "^5.4.4", |
@@ -54,3 +54,3 @@ # ai-renamer | ||
-s, --set-include-subdirectories Include files in subdirectories when | ||
processing (e.g: true, false) [boolean] | ||
processing (e.g: true, false) [string] | ||
``` | ||
@@ -57,0 +57,0 @@ |
@@ -5,3 +5,3 @@ const ollama = require('ollama').default | ||
module.exports = async ({ model, _case, chars, content, language, images }) => { | ||
module.exports = async ({ model, _case, chars, content, language, images, relativeFilePath }) => { | ||
try { | ||
@@ -32,4 +32,4 @@ const promptLines = [ | ||
} catch (err) { | ||
throw new Error(err.message) | ||
console.log(`🔴 Ollama error: ${err.message} (${relativeFilePath})`) | ||
} | ||
} |
@@ -7,13 +7,17 @@ #!/usr/bin/env node | ||
const main = async () => { | ||
const { argv, config } = await configureYargs() | ||
const [inputPath] = argv._ | ||
try { | ||
const { argv, config } = await configureYargs() | ||
const [inputPath] = argv._ | ||
if (!inputPath) { | ||
console.log('🔴 Please provide a file or folder path') | ||
process.exit(1) | ||
if (!inputPath) { | ||
console.log('🔴 Please provide a file or folder path') | ||
process.exit(1) | ||
} | ||
await processPath({ ...config, inputPath }) | ||
} catch (err) { | ||
console.log(err.message) | ||
} | ||
await processPath({ ...config, inputPath }) | ||
} | ||
main() |
@@ -34,7 +34,4 @@ const path = require('path') | ||
const newName = await getNewName({ model, _case, chars, content, language, images }) | ||
if (!newName) { | ||
console.log(`🔴 No new name: ${relativeFilePath}`) | ||
return | ||
} | ||
const newName = await getNewName({ model, _case, chars, content, language, images, relativeFilePath }) | ||
if (!newName) return | ||
@@ -45,4 +42,4 @@ const newFileName = await saveFile({ ext, newName, filePath }) | ||
} catch (err) { | ||
throw new Error(err.message) | ||
console.log(err.message) | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
49463
329
5