Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artskydj/lego-digital-designer-files
My Lego Digital Designer Creations
https://github.com/artskydj/lego-digital-designer-files
designer digital ldd lego
Last synced: about 2 months ago
JSON representation
My Lego Digital Designer Creations
- Host: GitHub
- URL: https://github.com/artskydj/lego-digital-designer-files
- Owner: ArtskydJ
- Created: 2015-08-19T14:49:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-02-22T22:50:13.000Z (almost 6 years ago)
- Last Synced: 2024-10-13T07:49:04.389Z (3 months ago)
- Topics: designer, digital, ldd, lego
- Language: HTML
- Homepage:
- Size: 16.4 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README generator/readme_generator.js
Awesome Lists containing this project
README
var fs = require('fs')
var path = require('path')
console.log('lego-digital-designer-files')
console.log('===========================')
console.log('')var htmlDir = path.dirname(__dirname) + '/HTML Building Instructions'
var repoDirFileAndFolderNames = fs.readdirSync(path.dirname(__dirname))
var htmlDirFileAndFolderNames = fs.readdirSync(htmlDir)var lxfFiles = repoDirFileAndFolderNames.filter(function (repoFileOrFolderName) {
return path.extname(repoFileOrFolderName) === '.lxf'
}).map(function (lxfFileName) {
return path.basename(lxfFileName, '.lxf')
})lxfFiles.forEach(function (lxfFileNameNoExt) {
var htmlFileName = `Building Instructions [${lxfFileNameNoExt}].html`
if (htmlDirFileAndFolderNames.indexOf(htmlFileName) === -1) {
console.error('Building instructions don\'t exist for ' + lxfFileNameNoExt)
process.exit(1)
}var htmlFileContents = fs.readFileSync(htmlDir + '/' + htmlFileName, { encoding: 'utf-8' })
stepNum = htmlFileContents.match(/\]\-images\/Step(\d+)/)
stepNum = stepNum && stepNum.pop()console.log('## ' + lxfFileNameNoExt)
console.log('')
console.log('![' + lxfFileNameNoExt + '](https://raw.githubusercontent.com/ArtskydJ/' +
'lego-digital-designer-files/master/HTML%20Building%20Instructions/Building%20Instructions%20[' +
lxfFileNameNoExt.replace(/ /g, '%20') + ']-images/Step' + stepNum + '.png)')
console.log('')
})