Parses url and title
parent
8a450948c6
commit
71368f97c2
9
index.js
9
index.js
|
@ -79,7 +79,13 @@ let exportJSON = function(children, langCode, mediaType, outputFile="root.json")
|
||||||
* @return {Object} Returns an Object containing details about the piece of media Exact format TBD.
|
* @return {Object} Returns an Object containing details about the piece of media Exact format TBD.
|
||||||
*/
|
*/
|
||||||
let parseListItem = function(listItem){
|
let parseListItem = function(listItem){
|
||||||
return "NEEDS TO BE IMPLEMENTED";
|
// console.log(listItem);
|
||||||
|
let entry = {};
|
||||||
|
const link = listItem[0];
|
||||||
|
entry.url = link.url;
|
||||||
|
entry.title = link.children[0].value;
|
||||||
|
// remember to get OTHER STUFF!! remember there may be multiple links!
|
||||||
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
let main = function(inputFile, langCode, mediaType, outputFile){
|
let main = function(inputFile, langCode, mediaType, outputFile){
|
||||||
|
@ -119,7 +125,6 @@ let main = function(inputFile, langCode, mediaType, outputFile){
|
||||||
}
|
}
|
||||||
catch(e){
|
catch(e){
|
||||||
console.log(children[children.length-1]);
|
console.log(children[children.length-1]);
|
||||||
// console.log(tree[i]);
|
|
||||||
console.log("error");
|
console.log("error");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,8 +128,10 @@ const languages = {
|
||||||
'pa': 'Panjabi, Punjabi',
|
'pa': 'Panjabi, Punjabi',
|
||||||
'ps': 'Pashto, Pushto',
|
'ps': 'Pashto, Pushto',
|
||||||
'fa': 'Persian',
|
'fa': 'Persian',
|
||||||
|
'fa-IR': 'Persian (Iran)',
|
||||||
'pl': 'Polish',
|
'pl': 'Polish',
|
||||||
'pt': 'Portuguese',
|
'pt-BR': 'Portuguese (Brazil)',
|
||||||
|
'pt-PT': 'Portuguese (Portugal)',
|
||||||
'qu': 'Quechua',
|
'qu': 'Quechua',
|
||||||
'rm': 'Romansh',
|
'rm': 'Romansh',
|
||||||
'rn': 'Rundi',
|
'rn': 'Rundi',
|
||||||
|
|
Loading…
Reference in New Issue