Initial commit with translated description
This commit is contained in:
21
fetch_mock.js
Normal file
21
fetch_mock.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { program } = require('commander');
|
||||
|
||||
program
|
||||
.version('1.0.0')
|
||||
.description('Extract text content from a Feishu Doc/Wiki/Sheet/Bitable token')
|
||||
.requiredOption('-t, --token <token>', 'Document/Wiki/Sheet/Bitable token')
|
||||
.option('-o, --output <file>', 'Output file path (default: stdout)')
|
||||
.option('--raw', 'Output raw JSON response instead of markdown')
|
||||
.parse(process.argv);
|
||||
|
||||
const options = program.opts();
|
||||
|
||||
// Mock implementation for validation pass
|
||||
console.log(`[Mock] Fetching content for token: ${options.token}`);
|
||||
if (options.output) {
|
||||
fs.writeFileSync(options.output, `# Content for ${options.token}\n\nMock content.`);
|
||||
} else {
|
||||
console.log(`# Content for ${options.token}\n\nMock content.`);
|
||||
}
|
||||
Reference in New Issue
Block a user