Skip to content

Commit b4cb511

Browse files
committed
u
1 parent 68cd850 commit b4cb511

File tree

5 files changed

+302
-255
lines changed

5 files changed

+302
-255
lines changed

books/kitabulEman.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

js/json/kitabulEman.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/json/raw/kitabulEman.json

Lines changed: 245 additions & 245 deletions
Large diffs are not rendered by default.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
using js:
3+
4+
i have a csv file called "input"
5+
6+
it has numbers within square brackets like so
7+
[1]
8+
9+
i want you to increment each such number by 5
10+
11+
for example
12+
[1]
13+
14+
becomes
15+
[6]
16+
17+
and so on
18+
19+
output file should be called "output"
20+
*/
21+
const fs = require("fs");
22+
23+
// Read the input CSV file
24+
fs.readFile("input.csv", "utf8", (err, data) => {
25+
if (err) {
26+
console.error("Error reading the file:", err);
27+
return;
28+
}
29+
30+
// Regular expression to match numbers within square brackets
31+
const regex = /\[(\d+)\]/g;
32+
33+
// Replace function to increment the number by 5
34+
const updatedData = data.replace(regex, (match, number) => {
35+
const incrementedNumber = parseInt(number, 10) + 5;
36+
return `[${incrementedNumber}]`;
37+
});
38+
39+
// Write the updated content to the output CSV file
40+
fs.writeFile("output.csv", updatedData, "utf8", (err) => {
41+
if (err) {
42+
console.error("Error writing the file:", err);
43+
return;
44+
}
45+
console.log("File has been processed and saved as output.csv");
46+
});
47+
});

uc/kitabulEman.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="dv">
33
<!-- prevent translate popup -->
44

@@ -341,7 +341,7 @@
341341
>
342342
|
343343
<a
344-
href="https://archive.org/details/kitabul-eman-harawi-albaitar"
344+
href="https://archive.org/details/kitabul-eman-abu-ubaid-albaitar"
345345
rel="noopener noreferrer"
346346
target="_blank"
347347
>ޕީޑީއެފް</a
@@ -351,7 +351,7 @@
351351
<p>
352352
ދާރު ފިތްޔަތިލް ކަހްފިގެ ދިވެހި ތަރުޖަމާގެ
353353
<a
354-
href="https://archive.org/details/kitabul-eman-harawi-dv-kahf"
354+
href="https://archive.org/details/kitabul-eman-abu-ubaid-dv-kahf"
355355
rel="noopener noreferrer"
356356
target="_blank"
357357
>ޕީޑީއެފް</a
@@ -363,7 +363,7 @@
363363
<p>
364364
تحقيق ربيع بن زكريا أبو هرجة | އަބޫ ހަރްޖާގެ ތަހްގީގުގެ އަރަބި
365365
<a
366-
href="https://archive.org/details/kitabul-eman-harawi-abu-harjah"
366+
href="https://archive.org/details/kitabul-eman-abu-ubaid-abu-harjah"
367367
rel="noopener noreferrer"
368368
target="_blank"
369369
>ޕީޑީއެފް</a
@@ -374,7 +374,7 @@
374374
تحقيق عادل بن عبد الله آل حمدان | ޢާދިލު އާލްޙަމްދާނުގެ ތަހްގީގުގެ
375375
އަރަބި
376376
<a
377-
href="https://archive.org/details/kitabul-eman-harawi-aal-hamdan"
377+
href="https://archive.org/details/kitabul-eman-abu-ubaid-aal-hamdan"
378378
rel="noopener noreferrer"
379379
target="_blank"
380380
>ޕީޑީއެފް</a
@@ -384,7 +384,7 @@
384384
<p>
385385
تحقيق محمد ناصر الدين الألباني | އަލްބާނީގެ ތަހްގީގުގެ އަރަބި
386386
<a
387-
href="https://archive.org/details/kitabul-eman-harawi-albani"
387+
href="https://archive.org/details/kitabul-eman-abu-ubaid-albani"
388388
rel="noopener noreferrer"
389389
target="_blank"
390390
>ޕީޑީއެފް</a
@@ -395,7 +395,7 @@
395395
فتح المنان في شرح كتاب الإيمان - لعارف بن مزيد السحيمي | ޢާރިފު
396396
އައްސުޙައިމީގެ ޝަރަހައިގެ އަރަބި
397397
<a
398-
href="https://archive.org/details/sharh-kitabul-eman-harawi-aarif-suhaimi"
398+
href="https://archive.org/details/sharh-kitabul-eman-abu-ubaid-aarif-suhaimi"
399399
rel="noopener noreferrer"
400400
target="_blank"
401401
>ޕީޑީއެފް</a
@@ -406,7 +406,7 @@
406406
شرح كتاب الإيمان - لمحمد هشام طاهري | މުޙައްމަދު ޠާހިރީގެ
407407
ޝަރަހައިގެ އަރަބި
408408
<a
409-
href="https://archive.org/details/sharh-kitabul-eman-harawi-muhammad-tahiri"
409+
href="https://archive.org/details/sharh-kitabul-eman-abu-ubaid-muhammad-tahiri"
410410
rel="noopener noreferrer"
411411
target="_blank"
412412
>ޕީޑީއެފް</a

0 commit comments

Comments
 (0)