From c2ed7fac98285d0f476bd29cb2845b2de779f295 Mon Sep 17 00:00:00 2001 From: DARSAN Date: Thu, 21 Nov 2024 13:37:34 +0530 Subject: [PATCH] JSON configuration pre processor removed --- dev/base.rjsc.jsonc | 227 -------------------------------------------- dev/conf_preproc.js | 35 ------- 2 files changed, 262 deletions(-) delete mode 100644 dev/base.rjsc.jsonc delete mode 100644 dev/conf_preproc.js diff --git a/dev/base.rjsc.jsonc b/dev/base.rjsc.jsonc deleted file mode 100644 index 6b4dabd..0000000 --- a/dev/base.rjsc.jsonc +++ /dev/null @@ -1,227 +0,0 @@ -{ - "domainAddress": "cresteem.com", - "timeFormat": "yyyy-MM-dd hh:mm a", - "siteSearchBoxFieldName": "searchTerm", - // - "reservedNames": { - "aggregateRating": { - "wrapper": "aggrate", - "aggregatedRatingValue": "arv", - "maxRangeOfRating": "mr", - "numberOfRatings": "rc" - }, - // - "reviews": { - "parentWrapper": "reviews", - "childWrapper": "urate", - "raterName": "rater", - "ratedValue": "rv", - "maxRateRange": "mr", - "reviewPublishedOn": "rpOn" - }, - // - "common": { - "fallbackCurrency": "INR", - "publishedDate": "pdt", //for article,recipe | "datecreated" - profilepage , Movie - "modifiedDate": "mdt", //for article,profilepage - "heroImage": "img", - //"thumbnails" - article,movie,recipe, | "images" - businessentity,profilepage,events,product - "author": { //article,reviews,recipe - "name": "aname", //events(performerName) - "url": "aurl", - "jobTitle": "ajob" - }, - "publisher": { //article,course - "name": "pname", // events(organiser) - "url": "purl" - }, - "authorAndPubPrefix": { //article,reviews,recipe possibly, but sure in events - "person": "P", - "organisation": "O" - }, - "heroName": "name", //for name- movie,recipe,businessEntity,softwareApp,profilePage,events,product | course(courseName) - "entityDescription": "desc", // for description - recipe,course,organisation,profilePage,events,product - "keywords": "kw", // for recipe,localBusiness - "MO": "mode", // for mode - course, events - "currencyDataVar": "currency", // course(feesCurrency),softwareApp(priceCurrencyDataVar) | currency - product.offer,events - "heroCost": "cost", // course(fees) | price - events,product.offer,softwareapp | businessEntity(priceRange) - "cuisineType": "csnt", // restaurant,recipe(recipeCuisine) - "heroLinkRef": "rlink", //event(bookingLink),org(socialMediaLink),profilePage(socialMediaLinks) - "videoFrame": "vframe" //video,recipe(video) - }, - // - "article": { - "baseID": "rjs-article", - "articleType": "articletype", - "authorNameStartwith": "a", //it dep on common.author.name's 0 index - "publisherNameStartwith": "p" //it dep on common.publisher.name's 0 index - }, - //carousal - "movie": { - "baseID": "rjs-movie", - "director": "dir" - }, - // - "recipe": { - "baseID": "rjs-recipe", - "preptime": { - "hours": "pth", - "minutes": "ptm", - "hoursAndMinutes": "pthm" - }, - "cooktime": { - "hours": "cth", - "minutes": "ctm", - "hoursAndMinutes": "cthm" - }, - "durationID": { //validator vars - "hours": "h", //dependant to recipe.preptime.hours[-1] and recipe.cooktime.hours[-1] - "minutes": "m" //dependant to recipe.preptime.minutes[-1] and recipe.cooktime.minutes[-1] - }, - "serveCount": "serves", - "recipeCategory": "cat", - "nutritionInformations": { - "wrapper": "nutrition", - "calories": "cal" - }, - "ingredients": "ingredient", - "instructions": { - "wrapper": "instructions", - "childwrapper": "step", - "shortInstruction": "short", - "longInstruction": "long", - "image": "simg" - } - }, - // - "course": { - "baseID": "rjs-course", - "language": "lang", - "instructor": "ins", - "duration": "period", - "courseFrequency": "freq", - "courseRepeatation": "rep" - }, - // - "restaurant": { - "baseID": "rjs-restaurant" - }, - // - "events": { - "baseID": "rjs-event", - "startFrom": "from", - "endAt": "end", - "status": "sts" - }, - // - "faqPage": { - "baseID": "rjs-faq", - "question": "question", - "answer": "answer" - }, - // - "video": { - "baseID": "rjs-video", - "segmentsWrapper": "index", - "startOffsetDataVar": "offset" - }, - // - "localBusiness": { - "baseID": "rjs-lb", - "areaAvailablity": "areaserves" - }, - // - "organisation": { - "baseID": "rjs-org", - "logo": "logo", - "email": "email", - "foundingYear": "found", - "taxid": "tid" - }, - // - "product": { - "baseID": "rjs-prod", - "productPriceValidUntilNext": 30, - "productGroupIDHashLength": "128", - "producrVariableDelimiter": "|", - "skuID": "sku", - "mpnCode": "mpn", - "brand": "brand", - "variesByDataVar": "var", - "offer": { - "shippingDetails": { - "deliveryCost": "delcost", - "deliveryOver": "delover", - "processingTime": "ptime", - "transitTime": "ttime", - "rangeDataVar": "range" - }, - "returnPolicy": { - "returnWithin": "returnin", - "returnFees": "returnfee" - }, - "availability": "avail", - "itemCondition": "cond" - }, - "varientParameterName": "var", - "fallbacks": { - "deliveryOver": "india" - } - }, - // - "profilePage": { - "baseID": "rjs-pp", - "altName": "altname", - "uniquePlatformID": "uid", - "authorWorks": { - "wrapper": "awork", - "headline": "head", - "thumbnail": "timg", - "publishedOn": "pon", - "url": "url" - }, - "authorActionCounts": { - "written": "aposts", - "liked": "aliked", - "follows": "afollows", - "shared": "ashared" - }, - "audienceActionCounts": { - "followers": "followers", - "likes": "likes", - "mutualConnections": "bicon" - } - }, - // - "softwareApp": { - "baseID": "rjs-sapp", - "operatingSystem": "os", - "OSSeperator": ",", - "category": "cat" - }, - // - "businessEntity": { - "location": { - "wrapper": "loc", - "physicalLocationName": "venue", - "virtualLocation": "vlurl", - "street": "stl", - "city": "ct", - "state": "st", - "country": "ctry", - "pincode": "pc" - }, - "telephone": "tel", - "reservationDataVar": "reserve", - "workHours": { - "wrapper": "workhours", - "dayRange": "wdr", - "dayAlone": "wd", - "timein24": "HR", - "timein12": "hr" - }, - "menuLink": "menu", - "mapFrame": "map" - } - } -} \ No newline at end of file diff --git a/dev/conf_preproc.js b/dev/conf_preproc.js deleted file mode 100644 index fb71c66..0000000 --- a/dev/conf_preproc.js +++ /dev/null @@ -1,35 +0,0 @@ -const fs = require("fs"); - -function removeComments(jsonString) { - // Remove single-line comments - jsonString = jsonString.replace(/\/\/.*/g, ""); - - // Remove multi-line comments - jsonString = jsonString.replace(/\/\*[\s\S]*?\*\//g, ""); - - return jsonString; -} - -function removeCommentsFromFile(inputFilePath, outputFilePath) { - fs.readFile(inputFilePath, "utf8", (err, data) => { - if (err) { - console.error(`Error reading file: ${err}`); - return; - } - - const cleanedJsonString = removeComments(data); - - fs.writeFile(outputFilePath, cleanedJsonString, "utf8", (err) => { - if (err) { - console.error(`Error writing file: ${err}`); - return; - } - console.log(`Comments removed and saved to ${outputFilePath}`); - }); - }); -} - -const inputFilePath = "base.richiejs.jsonc"; -const outputFilePath = ".richiejs"; - -removeCommentsFromFile(inputFilePath, outputFilePath);