2023-09-01 15:20:34 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
2023-09-01 21:32:25 +00:00
|
|
|
import {convert} from './vrml1to97/index.js'
|
2023-09-01 15:20:34 +00:00
|
|
|
import {stdin, argv} from 'node:process'
|
2023-09-01 21:32:25 +00:00
|
|
|
import {streamToString} from './streamToString.js'
|
2023-09-01 15:20:34 +00:00
|
|
|
|
|
|
|
if (argv.length > 2) {
|
|
|
|
console.log('Usage: vrml1to97 < old.wrl > shinynew.wrl')
|
|
|
|
console.log(' Translates VRML 1.0 on standard input to VRML97 on standard out.')
|
|
|
|
} else {
|
|
|
|
const input = await streamToString(stdin)
|
|
|
|
console.log(convert(input))
|
|
|
|
}
|