diff --git a/README.md b/README.md
deleted file mode 100644
index a5bbda1..0000000
--- a/README.md
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-# INSTAFICATION - Check who is not following you back!
-
- _Github deployment webpage link = [INSTAFICATION](https://prathamreet.github.io/instafication/)_
-
-
-
-
-## Steps to use Instafication
-
-- **Step 1:** Goto your instagram profile page (logged in) and press `F12` or `ctrl+shift+i`
-
-
-
-![image](https://github.com/prathamreet/instafication/blob/main/media/tutorialScreenShots/step1.png?raw=true)
-
-
-
-- **Step 2:** Type `allow pasting` in the console to enable pasting.
-
-
-
-![image](https://github.com/prathamreet/instafication/blob/main/media/tutorialScreenShots/step2.png?raw=true)
-
-
-
-- **Step 3:** click on you followers section and scroll way down to your last followers
-
-
-
-![image](https://github.com/prathamreet/instafication/blob/main/media/tutorialScreenShots/step3.png?raw=true)
-
-
-
-- **Step 4:** copy and paste the code snippet from INSTAFICATION webpage in the console while keeping your follower section on screen. Hit enter
-
-
-
-![image](https://github.com/prathamreet/instafication/blob/main/media/tutorialScreenShots/step4.png?raw=true)
-
-
-
-- **Step 5:** copy the Dictionary values from `0 to last number` and paste it in the `Raw followers Data` section in INSTAFICATION webpage
-
-
-
-![image](https://github.com/prathamreet/instafication/blob/main/media/tutorialScreenShots/step5.png?raw=true)
-
-
-
-- **Step 6:** repeat the `step 3`, `step 4` and `step 5` for `following` section
-
-
-
-- **Step 7:** After pasting on either sides i.e followers and following raw data, Hit `check unfollowers`. Booom!! these people don't follow back..
-
-
-
-![image](https://github.com/prathamreet/instafication/blob/main/media/tutorialScreenShots/step7.png?raw=true)
-
-
-
-- ~~If you are Reciprocal follower then just click on the usernames listed and unfollow them!!~~ 😉
-
-
-
-
-
-
-
-
-
diff --git a/media/favicon/about.txt b/media/favicon/about.txt
deleted file mode 100644
index 952febe..0000000
--- a/media/favicon/about.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This favicon was generated using the following font:
-
-- Font Title: Leckerli One
-- Font Author: Copyright (c) 2011 Gesine Todt (www.gesine-todt.de hallo@gesine-todt.de), with Reserved Font Names "Leckerli"
-- Font Source: https://fonts.gstatic.com/s/leckerlione/v20/V8mCoQH8VCsNttEnxnGQ-1itLZxcBtItFw.ttf
-- Font License: SIL Open Font License, 1.1 (http://scripts.sil.org/OFL))
diff --git a/media/favicon/android-chrome-192x192.png b/media/favicon/android-chrome-192x192.png
deleted file mode 100644
index e0470c7..0000000
Binary files a/media/favicon/android-chrome-192x192.png and /dev/null differ
diff --git a/media/favicon/android-chrome-512x512.png b/media/favicon/android-chrome-512x512.png
deleted file mode 100644
index e0c613c..0000000
Binary files a/media/favicon/android-chrome-512x512.png and /dev/null differ
diff --git a/media/favicon/apple-touch-icon.png b/media/favicon/apple-touch-icon.png
deleted file mode 100644
index da79cc4..0000000
Binary files a/media/favicon/apple-touch-icon.png and /dev/null differ
diff --git a/media/favicon/favicon-16x16.png b/media/favicon/favicon-16x16.png
deleted file mode 100644
index a5adec3..0000000
Binary files a/media/favicon/favicon-16x16.png and /dev/null differ
diff --git a/media/favicon/favicon-32x32.png b/media/favicon/favicon-32x32.png
deleted file mode 100644
index cac3f31..0000000
Binary files a/media/favicon/favicon-32x32.png and /dev/null differ
diff --git a/media/favicon/favicon.ico b/media/favicon/favicon.ico
deleted file mode 100644
index b9b5548..0000000
Binary files a/media/favicon/favicon.ico and /dev/null differ
diff --git a/media/favicon/site.webmanifest b/media/favicon/site.webmanifest
deleted file mode 100644
index 45dc8a2..0000000
--- a/media/favicon/site.webmanifest
+++ /dev/null
@@ -1 +0,0 @@
-{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
\ No newline at end of file
diff --git a/media/tutorialScreenShots/step1.png b/media/tutorialScreenShots/step1.png
deleted file mode 100644
index 57362b3..0000000
Binary files a/media/tutorialScreenShots/step1.png and /dev/null differ
diff --git a/media/tutorialScreenShots/step2.png b/media/tutorialScreenShots/step2.png
deleted file mode 100644
index 9ccd5d0..0000000
Binary files a/media/tutorialScreenShots/step2.png and /dev/null differ
diff --git a/media/tutorialScreenShots/step3.png b/media/tutorialScreenShots/step3.png
deleted file mode 100644
index 05a1dd0..0000000
Binary files a/media/tutorialScreenShots/step3.png and /dev/null differ
diff --git a/media/tutorialScreenShots/step4.png b/media/tutorialScreenShots/step4.png
deleted file mode 100644
index a68db34..0000000
Binary files a/media/tutorialScreenShots/step4.png and /dev/null differ
diff --git a/media/tutorialScreenShots/step5.png b/media/tutorialScreenShots/step5.png
deleted file mode 100644
index 0b6a10d..0000000
Binary files a/media/tutorialScreenShots/step5.png and /dev/null differ
diff --git a/media/tutorialScreenShots/step7.png b/media/tutorialScreenShots/step7.png
deleted file mode 100644
index 8203475..0000000
Binary files a/media/tutorialScreenShots/step7.png and /dev/null differ
diff --git a/raw codes/FollowingList.txt b/raw codes/FollowingList.txt
deleted file mode 100644
index 4d8cff0..0000000
--- a/raw codes/FollowingList.txt
+++ /dev/null
@@ -1,632 +0,0 @@
-0
-:
-"🕉"
-1
-:
-"🕉"
-2
-:
-"electrozues"
-3
-:
-"Following"
-4
-:
-"kumarsamar376"
-5
-:
-"Following"
-6
-:
-"valkyrie_x.o.x.o"
-7
-:
-"Following"
-8
-:
-"equino_rize"
-9
-:
-"Following"
-10
-:
-"bhavdeep_25"
-11
-:
-"Following"
-12
-:
-"yugant_goyal_1978"
-13
-:
-"Following"
-14
-:
-"giga_niga_4chan"
-15
-:
-"Following"
-16
-:
-"i.amwahid"
-17
-:
-"Following"
-18
-:
-"shiv_am6740"
-19
-:
-"Following"
-20
-:
-"aksharshounikya"
-21
-:
-"Following"
-22
-:
-"krishna_vijay2711"
-23
-:
-"Following"
-24
-:
-"kumarharsh04"
-25
-:
-"Following"
-26
-:
-"ronitk_09"
-27
-:
-"Following"
-28
-:
-"abhay.ks_2101"
-29
-:
-"Following"
-30
-:
-"_zeeshan_08_16"
-31
-:
-"Following"
-32
-:
-"reeshav2303"
-33
-:
-"Following"
-34
-:
-"tanishroy2"
-35
-:
-"Following"
-36
-:
-"prashant.singh3566"
-37
-:
-"Following"
-38
-:
-"_26_madhan"
-39
-:
-"Following"
-40
-:
-"premranjan8437"
-41
-:
-"Following"
-42
-:
-"kumarbhaveshsharma440"
-43
-:
-"Following"
-44
-:
-"lily_smith_007"
-45
-:
-"Following"
-46
-:
-"saubhik.mag"
-47
-:
-"Following"
-48
-:
-"deepraval__"
-49
-:
-"Following"
-50
-:
-"pranjalkaundilya"
-51
-:
-"Following"
-52
-:
-"karthik_pavan_01"
-53
-:
-"Following"
-54
-:
-"_.rajgoyal._"
-55
-:
-"Following"
-56
-:
-"ansh_sg69"
-57
-:
-"Following"
-58
-:
-"tanishk_nayak21"
-59
-:
-"Following"
-60
-:
-"__.aditya___.__"
-61
-:
-"Following"
-62
-:
-"nazim_manaf"
-63
-:
-"Following"
-64
-:
-"ruchit_454"
-65
-:
-"Following"
-66
-:
-"nkd_krish0210"
-67
-:
-"Following"
-68
-:
-"omjirao9575"
-69
-:
-"Following"
-70
-:
-"zhonothan"
-71
-:
-"Following"
-72
-:
-"_preetham_23"
-73
-:
-"Following"
-74
-:
-"_.aman.x"
-75
-:
-"Following"
-76
-:
-"soham0798"
-77
-:
-"Following"
-78
-:
-"vikshitkumar6"
-79
-:
-"Following"
-80
-:
-"shubhayudas04"
-81
-:
-"Following"
-82
-:
-"shivamroy85"
-83
-:
-"Following"
-84
-:
-"ayush_ideal"
-85
-:
-"Following"
-86
-:
-"_aditya_raj_45"
-87
-:
-"Following"
-88
-:
-"anunay_verma05"
-89
-:
-"Following"
-90
-:
-"raja_srijan_kumar186"
-91
-:
-"Following"
-92
-:
-"navrajsidhu54"
-93
-:
-"Following"
-94
-:
-"kharsh.7944"
-95
-:
-"Following"
-96
-:
-"prashispallav"
-97
-:
-"Following"
-98
-:
-"gaurav_.v18"
-99
-:
-"Following"
-[100 … 199]
-100
-:
-"aviral_x_storm"
-101
-:
-"Following"
-102
-:
-"swastik_264"
-103
-:
-"Following"
-104
-:
-"bhavyas_024"
-105
-:
-"Following"
-106
-:
-"amarjeettuti"
-107
-:
-"Following"
-108
-:
-"ayan____181"
-109
-:
-"Following"
-110
-:
-"manikantasai_mks"
-111
-:
-"Following"
-112
-:
-"rustydozen"
-113
-:
-"Following"
-114
-:
-"_iam_nr_"
-115
-:
-"Following"
-116
-:
-"nugxie"
-117
-:
-"Following"
-118
-:
-"_saahaanaa__"
-119
-:
-"Following"
-120
-:
-"_snehashisss._"
-121
-:
-"Following"
-122
-:
-"itx_saharx"
-123
-:
-"Following"
-124
-:
-"_.aamaan"
-125
-:
-"Following"
-126
-:
-"x.kartikeya.x"
-127
-:
-"Following"
-128
-:
-"th4run_19"
-129
-:
-"Following"
-130
-:
-"_aditiiir"
-131
-:
-"Following"
-132
-:
-"iguessterry"
-133
-:
-"Following"
-134
-:
-"aacchhall"
-135
-:
-"Following"
-136
-:
-"ig_painaditya18"
-137
-:
-"Following"
-138
-:
-"____sak.shamm"
-139
-:
-"Following"
-140
-:
-"_subhojeet_05"
-141
-:
-"Following"
-142
-:
-"bhanutejayadalla"
-143
-:
-"Following"
-144
-:
-"starnight609"
-145
-:
-"Following"
-146
-:
-"_akshata54"
-147
-:
-"Following"
-148
-:
-"sahilpratapsingh_"
-149
-:
-"Following"
-150
-:
-"purvi.chouhan__"
-151
-:
-"Following"
-152
-:
-"md_salman_hussain"
-153
-:
-"Following"
-154
-:
-"niyatilabala"
-155
-:
-"Following"
-156
-:
-"_nikita_20_02"
-157
-:
-"Following"
-158
-:
-"harmanay_x_"
-159
-:
-"Following"
-160
-:
-"satyam.dev.127"
-161
-:
-"Following"
-162
-:
-"tanisha_jain31"
-163
-:
-"Following"
-164
-:
-"panditarihantshukla"
-165
-:
-"Following"
-166
-:
-"shabdeek"
-167
-:
-"Following"
-168
-:
-"sarayu_r6"
-169
-:
-"Following"
-170
-:
-"akansha.aditi"
-171
-:
-"Following"
-172
-:
-"_soumya.191"
-173
-:
-"Following"
-174
-:
-"jadhav_manoj987"
-175
-:
-"Following"
-176
-:
-"divyyasshree"
-177
-:
-"Following"
-178
-:
-"saima__009"
-179
-:
-"Following"
-180
-:
-"devesh_jain28"
-181
-:
-"Following"
-182
-:
-"vaibhaw4444"
-183
-:
-"Following"
-184
-:
-"surbhi_kandhway"
-185
-:
-"Following"
-186
-:
-"aryan_sinha28"
-187
-:
-"Following"
-188
-:
-"ka_nav_agarwal"
-189
-:
-"Following"
-190
-:
-"vaibhavgolani_59"
-191
-:
-"Following"
-192
-:
-"gs_sai_kamal"
-193
-:
-"Following"
-194
-:
-"pay_al__"
-195
-:
-"Following"
-196
-:
-"fardu._.mk"
-197
-:
-"Following"
-198
-:
-"nikunj_tulsyan"
-199
-:
-"Following"
-[200 … 209]
-200
-:
-"surakshith_94"
-201
-:
-"Following"
-202
-:
-"jayanth_18r"
-203
-:
-"Following"
-204
-:
-"kt_krix"
-205
-:
-"Following"
-206
-:
-"sachan_tanay"
-207
-:
-"Following"
-208
-:
-"__reyansha__190"
-209
-:
-"Following"
\ No newline at end of file
diff --git a/raw codes/classconv.js b/raw codes/classconv.js
deleted file mode 100644
index 7305a48..0000000
--- a/raw codes/classconv.js
+++ /dev/null
@@ -1,35 +0,0 @@
-const readline = require('readline');
-
-// Create readline interface
-const rl = readline.createInterface({
- input: process.stdin,
- output: process.stdout
-});
-
-function convertClassInputToSelector(classString) {
- // Split the class string into individual class names
- let classes = classString.split(' ');
-
- // Map each class name to create a selector string
- let selector = classes.map(className => `.${className}`).join(', ');
-
- // Log the generated selector (for demonstration)
- console.log("Generated selector:", selector);
-
- // You can perform other operations with the generated selector here
- // For example, querying a database or processing files based on the selector
-}
-
-// Function to handle input
-function handleInput(classString) {
- convertClassInputToSelector(classString);
- rl.close();
-}
-
-// Ask user to enter the class names separated by spaces
-rl.question('Enter the class names separated by spaces: ', (classString) => {
- handleInput(classString);
-});
-
-// Example usage:
-// convertClassInputToSelector("class1 class2 class3");
diff --git a/raw codes/compare.js b/raw codes/compare.js
deleted file mode 100644
index 49470f0..0000000
--- a/raw codes/compare.js
+++ /dev/null
@@ -1,54 +0,0 @@
-const fs = require('fs');
-
-function findUnfollowed(data1, data2) {
- // Split the comma-separated strings into arrays
- const followers = data1.split(',').map(item => item.trim());
- const following = data2.split(',').map(item => item.trim());
-
- // Create a Set for faster lookup of followers
- const followerSet = new Set(followers);
-
- // Filter the following list to get values not present in followers
- const unfollowed = following.filter(item => !followerSet.has(item));
-
- // Return the array of unfollowed users (or values)
- return unfollowed;
-}
-
-// Function to read a file and return its content as a promise
-function readFileAsync(filename) {
- return new Promise((resolve, reject) => {
- fs.readFile(filename, 'utf8', (err, data) => {
- if (err) {
- reject(err);
- } else {
- resolve(data);
- }
- });
- });
-}
-
-// Main function to execute the comparison and write the result to a file
-async function processFiles() {
- try {
- const followers = await readFileAsync('ER_csv.txt');
- const following = await readFileAsync('IN_csv.txt');
-
- const unfollowedList = findUnfollowed(followers, following);
-
- // Save the result to a new text file
- const output = unfollowedList.join(', ');
- fs.writeFile('result.txt', output, (err) => {
- if (err) {
- console.error('Error writing file:', err);
- } else {
- console.log('Unfollowed list has been saved to unfollowed.txt');
- }
- });
- } catch (error) {
- console.error('Error processing files:', error);
- }
-}
-
-// Execute the main function
-processFiles();
diff --git a/raw codes/followerList.txt b/raw codes/followerList.txt
deleted file mode 100644
index c3801e4..0000000
--- a/raw codes/followerList.txt
+++ /dev/null
@@ -1,288 +0,0 @@
-0
-:
-"🕉"
-1
-:
-"🕉"
-2
-:
-"_subhojeet_05"
-3
-:
-"bhanutejayadalla"
-4
-:
-"starnight609"
-5
-:
-"_akshata54"
-6
-:
-"sahilpratapsingh_"
-7
-:
-"purvi.chouhan__"
-8
-:
-"satyam.dev.127"
-9
-:
-"md_salman_hussain"
-10
-:
-"niyatilabala"
-11
-:
-"_nikita_20_02"
-12
-:
-"panditarihantshukla"
-13
-:
-"shabdeek"
-14
-:
-"beacon_005"
-15
-:
-"akansha.aditi"
-16
-:
-"sarayu_r6"
-17
-:
-"jadhav_manoj987"
-18
-:
-"saima__009"
-19
-:
-"divyyasshree"
-20
-:
-"gs_sai_kamal"
-21
-:
-"pay_al__"
-22
-:
-"geetha_55555"
-23
-:
-"Follow"
-24
-:
-"fardu._.mk"
-25
-:
-"nikunj_tulsyan"
-26
-:
-"ayan____181"
-27
-:
-"surakshith_94"
-28
-:
-"kt_krix"
-29
-:
-"sachan_tanay"
-30
-:
-"kumarharsh04"
-31
-:
-"__reyansha__190"
-32
-:
-"anunay_verma05"
-33
-:
-"gaurav_.v18"
-34
-:
-"aksharshounikya"
-35
-:
-"_zeeshan_08_16"
-36
-:
-"bhavyas_024"
-37
-:
-"tanishroy2"
-38
-:
-"reeshav2303"
-39
-:
-"deepraval__"
-40
-:
-"_preetham_23"
-41
-:
-"raja_srijan_kumar186"
-42
-:
-"_iam_nr_"
-43
-:
-"pranjalkaundilya"
-44
-:
-"abhay.ks_2101"
-45
-:
-"ruchit_454"
-46
-:
-"_.aamaan"
-47
-:
-"bhavdeep_25"
-48
-:
-"ansh_sg69"
-49
-:
-"ronitk_09"
-50
-:
-"_.aman.x"
-51
-:
-"manikantasai_mks"
-52
-:
-"kumarsamar376"
-53
-:
-"ayush_ideal"
-54
-:
-"_aditiiir"
-55
-:
-"nkd_krish0210"
-56
-:
-"__.aditya___.__"
-57
-:
-"equino_rize"
-58
-:
-"rustydozen"
-59
-:
-"karthik_pavan_01"
-60
-:
-"swastik_264"
-61
-:
-"zhonothan"
-62
-:
-"_saahaanaa__"
-63
-:
-"giga_niga_4chan"
-64
-:
-"_26_madhan"
-65
-:
-"i.amwahid"
-66
-:
-"_snehashisss._"
-67
-:
-"tanishk_nayak21"
-68
-:
-"aviral_x_storm"
-69
-:
-"x.kartikeya.x"
-70
-:
-"_.rajgoyal._"
-71
-:
-"nugxie"
-72
-:
-"omjirao9575"
-73
-:
-"vikshitkumar6"
-74
-:
-"yasuki_041"
-75
-:
-"Follow"
-76
-:
-"riley.xik"
-77
-:
-"Follow"
-78
-:
-"wheelwulfenite"
-79
-:
-"Follow"
-80
-:
-"soham0798"
-81
-:
-"aacchhall"
-82
-:
-"amarjeettuti"
-83
-:
-"yugant_goyal_1978"
-84
-:
-"th4run_19"
-85
-:
-"shivamroy85"
-86
-:
-"saubhik.mag"
-87
-:
-"_aditya_raj_45"
-88
-:
-"p0wel_39"
-89
-:
-"Follow"
-90
-:
-"_schrodinger_._"
-91
-:
-"Follow"
-92
-:
-"itx_saharx"
-93
-:
-"electrozues"
-94
-:
-"valkyrie_x.o.x.o"
-95
-:
-"lily_smith_007"
\ No newline at end of file
diff --git a/raw codes/getnames.js b/raw codes/getnames.js
deleted file mode 100644
index 85f46fd..0000000
--- a/raw codes/getnames.js
+++ /dev/null
@@ -1,15 +0,0 @@
-function extractUsernames() {
- const usernames = [];
- const elements = document.querySelectorAll('._ap3a, ._aaco, ._aacw, ._aacx, ._aad7, ._aade');
-
- elements.forEach(element => {
- const username = element.textContent.trim(); // Assuming the username is in the text content of the element
- usernames.push(username);
- });
-
- return usernames;
-}
-
-// Example usage
-const followersUsernames = extractUsernames();
-console.log(followersUsernames);
diff --git a/raw codes/mergedComponents.js b/raw codes/mergedComponents.js
deleted file mode 100644
index 174f8dd..0000000
--- a/raw codes/mergedComponents.js
+++ /dev/null
@@ -1,223 +0,0 @@
-//1st component: class converter to comma sparated
-
-const readline = require('readline');
-
-// Create readline interface
-const rl = readline.createInterface({
- input: process.stdin,
- output: process.stdout
-});
-
-function convertClassInputToSelector(classString) {
- // Split the class string into individual class names
- let classes = classString.split(' ');
-
- // Map each class name to create a selector string
- let selector = classes.map(className => `.${className}`).join(', ');
-
- // Log the generated selector (for demonstration)
- console.log("Generated selector:", selector);
-
- // You can perform other operations with the generated selector here
- // For example, querying a database or processing files based on the selector
-}
-
-// Function to handle input
-function handleInput(classString) {
- convertClassInputToSelector(classString);
- rl.close();
-}
-
-// Ask user to enter the class names separated by spaces
-rl.question('Enter the class names separated by spaces: ', (classString) => {
- handleInput(classString);
-});
-
-// Example usage:
-// convertClassInputToSelector("class1 class2 class3");
-
-
-//2nd Component: getting names of follower from typing it in console
-
-function ER_extractUsernames() {
- const usernames = [];
- const elements = document.querySelectorAll('._ap3a, ._aaco, ._aacw, ._aacx, ._aad7, ._aade');
-
- elements.forEach(element => {
- const username = element.textContent.trim(); // Assuming the username is in the text content of the element
- usernames.push(username);
- });
-
- return usernames;
-}
-
-// Example usage
-const followersUsernames = ER_extractUsernames();
-console.log(followersUsernames);
-
-
-//3rd component: getting names of followings from typing it in console
-
-function IN_extractUsernames() {
- const usernames = [];
- const elements = document.querySelectorAll('._ap3a, ._aaco, ._aacw, ._aacx, ._aad7, ._aade');
-
- elements.forEach(element => {
- const username = element.textContent.trim(); // Assuming the username is in the text content of the element
- usernames.push(username);
- });
-
- return usernames;
-}
-
-// Example usage
-const followingsUsernames = IN_extractUsernames();
-console.log(followingsUsernames);
-
-//4th component: converting raw data of followers with unwanted letters to usernames with comma separated values
-
-const fs = require('fs');
-
-function extractStringValues(rawData) {
- // Split the raw data by newline characters to process each line
- const lines = rawData.split('\n');
- const values = [];
-
- // Regular expression to match strings within double quotes
- const regex = /"([^"]*)"/;
-
- lines.forEach(line => {
- // Remove unnecessary elements and extract string values
- if (!line.includes(':') && !line.includes('Follow') && !line.includes('Following')) {
- const match = regex.exec(line);
- if (match && match[1]) {
- values.push(match[1]);
- }
- }
- });
-
- // Join the extracted values into a comma-separated string
- return values.join(', ');
-}
-
-// Read data from the text file
-fs.readFile('ER.txt', 'utf8', (err, rawData) => {
- if (err) {
- console.error('Error reading file:', err);
- return;
- }
- const result = extractStringValues(rawData);
- console.log(result); // Output the result to the console
-
- // Save the result to a new text file
- fs.writeFile('ER_csv.txt', result, (err) => {
- if (err) {
- console.error('Error writing file:', err);
- } else {
- console.log('Extracted values have been saved to output.txt');
- }
- });
-});
-
-//5th component: converting raw data of followings with unwanted letters to usernames with comma separated values
-
-const fs = require('fs');
-
-function extractStringValues(rawData) {
- // Split the raw data by newline characters to process each line
- const lines = rawData.split('\n');
- const values = [];
-
- // Regular expression to match strings within double quotes
- const regex = /"([^"]*)"/;
-
- lines.forEach(line => {
- // Remove unnecessary elements and extract string values
- if (!line.includes(':') && !line.includes('Follow') && !line.includes('Following')) {
- const match = regex.exec(line);
- if (match && match[1]) {
- values.push(match[1]);
- }
- }
- });
-
- // Join the extracted values into a comma-separated string
- return values.join(', ');
-}
-
-// Read data from the text file
-fs.readFile('IN.txt', 'utf8', (err, rawData) => {
- if (err) {
- console.error('Error reading file:', err);
- return;
- }
- const result = extractStringValues(rawData);
- console.log(result); // Output the result to the console
-
- // Save the result to a new text file
- fs.writeFile('IN_csv.txt', result, (err) => {
- if (err) {
- console.error('Error writing file:', err);
- } else {
- console.log('Extracted values have been saved to output.txt');
- }
- });
-});
-
-
-//6th component: comparing followers and followings from ER.txt and IN.txt and producin result as result.txt
-
-const fs = require('fs');
-
-function findUnfollowed(data1, data2) {
- // Split the comma-separated strings into arrays
- const followers = data1.split(',').map(item => item.trim());
- const following = data2.split(',').map(item => item.trim());
-
- // Create a Set for faster lookup of followers
- const followerSet = new Set(followers);
-
- // Filter the following list to get values not present in followers
- const unfollowed = following.filter(item => !followerSet.has(item));
-
- // Return the array of unfollowed users (or values)
- return unfollowed;
-}
-
-// Function to read a file and return its content as a promise
-function readFileAsync(filename) {
- return new Promise((resolve, reject) => {
- fs.readFile(filename, 'utf8', (err, data) => {
- if (err) {
- reject(err);
- } else {
- resolve(data);
- }
- });
- });
-}
-
-// Main function to execute the comparison and write the result to a file
-async function processFiles() {
- try {
- const followers = await readFileAsync('ER_csv.txt');
- const following = await readFileAsync('IN_csv.txt');
-
- const unfollowedList = findUnfollowed(followers, following);
-
- // Save the result to a new text file
- const output = unfollowedList.join(', ');
- fs.writeFile('result.txt', output, (err) => {
- if (err) {
- console.error('Error writing file:', err);
- } else {
- console.log('Unfollowed list has been saved to unfollowed.txt');
- }
- });
- } catch (error) {
- console.error('Error processing files:', error);
- }
-}
-
-// Execute the main function
-processFiles();
diff --git a/raw codes/rawtocsv.js b/raw codes/rawtocsv.js
deleted file mode 100644
index e0b6c4e..0000000
--- a/raw codes/rawtocsv.js
+++ /dev/null
@@ -1,42 +0,0 @@
-const fs = require('fs');
-
-function extractStringValues(rawData) {
- // Split the raw data by newline characters to process each line
- const lines = rawData.split('\n');
- const values = [];
-
- // Regular expression to match strings within double quotes
- const regex = /"([^"]*)"/;
-
- lines.forEach(line => {
- // Remove unnecessary elements and extract string values
- if (!line.includes(':') && !line.includes('Follow') && !line.includes('Following')) {
- const match = regex.exec(line);
- if (match && match[1]) {
- values.push(match[1]);
- }
- }
- });
-
- // Join the extracted values into a comma-separated string
- return values.join(', ');
-}
-
-// Read data from the text file
-fs.readFile('IN.txt', 'utf8', (err, rawData) => {
- if (err) {
- console.error('Error reading file:', err);
- return;
- }
- const result = extractStringValues(rawData);
- console.log(result); // Output the result to the console
-
- // Save the result to a new text file
- fs.writeFile('IN_csv.txt', result, (err) => {
- if (err) {
- console.error('Error writing file:', err);
- } else {
- console.log('Extracted values have been saved to output.txt');
- }
- });
-});