varnodnospatt=/\s{0,4}\*\s\[(.*?)\]\((.*?)\)\s\-\s(.{0,249}?\.\s)`(.*?)`\s`(.*?)`/// Regex for entries with no demo and no source code
varslpatt=/\s{0,4}\*\s\[(.*?)\]\((.*?)\)\s\-\s(.{0,249}?\.\s)\(\[Demo\b\]\((.*?)\),\s\[Source Code\b\]\((.*?)\)\)\s`(.*?)`\s`(.*?)`/// Regex for entries with demo and source code
varnodpatt=/\s{0,4}\*\s\[(.*?)\]\((.*?)\)\s\-\s(.{0,249}?\.\s)\(\[Source Code\]\((.*?)\)\)\s`(.*?)`\s`(.*?)`/// Regex for entries with no demo
varnospatt=/\s{0,4}\*\s\[(.*?)\]\((.*?)\)\s\-\s(.{0,249}?\.\s)\(\[Demo\]\((.*?)\)\)\s`(.*?)`\s`(.*?)`/// Regex for entries with no source code
varpnodnospatt=/\s{0,4}\*\s\[(.*?)\]\((.*?)\)\s`(⚠)`\s\-\s(.{0,249}?\.\s)`(.*?)`\s`(.*?)`/// Regex for entries with proprietary with no demo and no source code
varpslpatt=/\s{0,4}\*\s\[(.*?)\]\((.*?)\)\s`(⚠)`\s\-\s(.{0,249}?\.\s)\(\[Demo\b\]\((.*?)\),\s\[Source Code\b\]\((.*?)\)\)\s`(.*?)`\s`(.*?)`/// Regex for entries with proprietary with demo and source code
varpnodpatt=/\s{0,4}\*\s\[(.*?)\]\((.*?)\)\s`(⚠)`\s\-\s(.{0,249}?\.\s)\(\[Source Code\]\((.*?)\)\)\s`(.*?)`\s`(.*?)`/// Regex for entries with proprietary with no demo
varpnospatt=/\s{0,4}\*\s\[(.*?)\]\((.*?)\)\s`(⚠)`\s\-\s(.{0,249}?\.\s)\(\[Demo\]\((.*?)\)\)\s`(.*?)`\s`(.*?)`/// Regex for entries with proprietary with no source code
if(nodnospatt.test(text)===true){
returntrue
}elseif(slpatt.test(text)===true){
returntrue
}elseif(nodpatt.test(text)===true){
returntrue
}elseif(nospatt.test(text)===true){
returntrue
}elseif(pnodnospatt.test(text)===true){
returntrue
}elseif(pslpatt.test(text)===true){
returntrue
}elseif(pnodpatt.test(text)===true){
returntrue
}elseif(pnospatt.test(text)===true){
returntrue
}else{
returnfalse
}
};
// WIP
functionfindError(entry){
varfixedEntry=entry
if(/\s{0,4}\*\s\[.*?\]\(http.*?\)/.test(entry)===false){// Fix * site name/URL
entry.replace(/(\s{0,3}\*\s\[.*?\]\(.*?\))(\s*`*⚠`*\s*-*\s*|\s*`*⚠`*\s*-*|`*⚠`*\s*-*\s*|`*⚠`*-*|\s*|\s*-*\s*|\s*-*|-*\s*|-*|\s*)(.{0,249}?\.)(.*)/gi,function(match,p1,p2,p3,p4){// Fix space - space between link and descrition
console.log('Missing ` - ` between Site link and description.')
entry.replace(/^(\s*\*\s.*?\)\)|.*?\s\-\s.*?\.)(\s*`*\s*)(.*?)(\s*`\s*`\s*|\s*`\s*`*\s*|\s*`*\s*`\s*|\s)(.*?)`/gi,function(match,p1,p2,p3,p4,p5){// Fix License and Language
console.log('Issue in Language or License')
fixedEntry=p1+' `'+p3+'` `'+p5+'`'
console.log('Fixed: '+fixedEntry)
})
}elseif(/demo/i.test(entry)===true){
}elseif(/source/i.test(entry)===true){
}
console.log(findPattern(fixedEntry))
// if (findPattern(fixedEntry) === false) {
// findError(fixedEntry) // If it's not fixed let's try again.