You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+74-61Lines changed: 74 additions & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,59 +2,60 @@
2
2
3
3
Nersh is a search engine designed for programmers and tech enthusiasts. It allows users to search for programming-related terms and view detailed definitions and explanations. The project is structured in a way that contributors can easily add new terms and corresponding HTML files, all while maintaining an organized and accessible search functionality.
4
4
5
-
## Features💫
6
-
-**Dynamic Search Suggestions**: As users type in the search box, suggestions are displayed based on matching terms.
7
-
-**Pre-generated HTML for Terms**: Each term has its own pre-generated HTML page, following a template.
8
-
-**JSON-based Term Storage**: Terms are stored in a JSON file for easy retrieval and dynamic search functionality.
9
-
-**Nerdy Button**: An "I'm Feeling Nerdy" button that takes users to a random tech-related term.
5
+
## Features 💫
6
+
-**Dark Theme UI**: Modern dark gradient interface with geometric pattern overlay for a true nerdy experience
7
+
-**Dynamic Search**: Real-time suggestions as users type with enhanced error handling
8
+
-**Responsive Design**: Optimized for both desktop and mobile devices
9
+
-**Pre-generated HTML for Terms**: Each term has its own styled HTML page with consistent theming
10
+
-**JSON-based Term Storage**: Terms are stored in JSON files for easy retrieval and search functionality
11
+
-**"I'm Feeling Nerdy" Button**: Takes users to a random tech-related term
10
12
11
13
## Project Structure
12
14
```
13
15
/terms
14
16
/a
15
-
- Algorithms.html
16
-
- API.html
17
-
- Asynchronous_Programming.html
18
-
- terms.json
17
+
- a_term.html
19
18
/b
20
-
- Binary_Search.html
21
-
- terms.json
22
-
/styles.css
19
+
- b_term.html
20
+
/styles
21
+
- styles.css
22
+
/scripts
23
+
- script.js
23
24
/index.html
24
-
/script.js
25
+
/AddTerm.sh
26
+
/AddTerm.java
25
27
```
26
-
-**/terms**: Contains directories for each letter of the alphabet. Each directory stores the HTML pages for terms starting with that letter as well as a `terms.json` file that lists all terms.
27
-
-**/styles.css**: The main CSS file for styling the entire project.
28
-
-**/index.html**: The homepage with the search functionality.
29
-
-**/script.js**: Contains JavaScript for dynamic search suggestions and term navigation.
30
-
-**/addterm.sh**: A shell script to automate the process of adding new terms and creating HTML files.
31
-
-**/AddTerm.java**: A Java program to update the JSON file with new terms.
28
+
-**/terms**: Contains directories for each letter of the alphabet with HTML pages and JSON files
29
+
-**/styles/styles.css**: The main CSS file for styling the entire project
30
+
-**/scripts/script.js**: Contains JavaScript for search functionality and term navigation
31
+
-**/index.html**: The homepage with the search functionality
32
+
-**/AddTerm.sh**: A shell script to automate the process of adding new terms with built-in styling
33
+
-**/AddTerm.java**: A Java program to update the JSON file with new terms
32
34
33
35
---
34
36
35
37
## How to Add New Terms
36
38
37
-
To add a new term to the search engine, you can use the provided **shell script** (`addterm.sh`) or the **Java program** (`AddTerm.java`). Both tools automate the process of adding terms and creating the required HTML files.
39
+
To add a new term to the search engine, you can use the provided **shell script** (`AddTerm.sh`) or the **Java program** (`AddTerm.java`). Both tools automate the process of adding terms and creating the required HTML files.
38
40
39
-
### **Using the Shell Script (`addterm.sh`)**
40
-
The shell script provides an interactive way to add new terms and create HTML files. It also allows you to edit the HTML file using your preferred text editor.
41
+
### **Using the Shell Script (`AddTerm.sh`)**
42
+
The shell script provides an interactive way to add new terms and create HTML files with built-in styling. It also allows you to edit the HTML file using your preferred text editor.
41
43
42
44
#### Steps:
43
45
1. Run the script:
44
46
```bash
45
-
bash addterm.sh
46
-
47
-
~Enter the term name when prompted.
48
-
49
-
Choose whether to edit the HTML file using nano, vim, or skip editing.
50
-
The script will:
51
-
- Create the HTML file in the appropriate directory.
52
-
- Update the terms.json file with the new term.
53
-
- Optionally commit the changes to Git.
47
+
bash AddTerm.sh
48
+
```
49
+
2. Enter the term name when prompted.
50
+
3. Choose whether to edit the HTML file using nano, vim, or skip editing.
51
+
4. The script will:
52
+
- Create a styled HTML file in the appropriate directory
53
+
- Update the terms.json file with the new term
54
+
- Optionally commit the changes to Git
54
55
55
56
Example:
56
57
```
57
-
$ bash addterm.sh
58
+
$ bash AddTerm.sh
58
59
Enter the term: Machine Learning
59
60
New term added successfully to JSON!
60
61
Do you want to edit the HTML file? (nano/vim/none): nano
@@ -63,41 +64,53 @@ Do you want to commit the new term added? (yes/no): yes
63
64
Changes committed.
64
65
Done!
65
66
```
66
-
## Using the Java Program `(AddTerm.java)`
67
+
68
+
### **Using the Java Program (`AddTerm.java`)**
67
69
68
70
The Java program updates the JSON file with new terms, ensuring no duplicates and maintaining alphabetical order.
69
-
Steps:
70
71
71
-
1. Compile the Java program:
72
-
```
73
-
javac AddTerm.java
72
+
#### Steps:
73
+
1. Compile the Java program:
74
+
```
75
+
javac AddTerm.java
74
76
```
75
77
76
-
2. Run the program with the term name as an argument:
77
-
```
78
-
java AddTerm <TERM_NAME>
79
-
```
80
-
3. The program will:
81
-
Update the `terms.json` file in the appropriate directory.
82
-
Print a success message if the term is added.
83
-
84
-
Example:
85
-
```
86
-
$ java AddTerm "Artificial Intelligence"
87
-
New term added successfully to JSON!
78
+
2. Run the program with the term name as an argument:
79
+
```
80
+
java AddTerm <TERM_NAME>
88
81
```
82
+
83
+
3. The program will:
84
+
- Update the `terms.json` file in the appropriate directory
85
+
- Print a success message if the term is added
86
+
87
+
Example:
88
+
```
89
+
$ java AddTerm "Artificial Intelligence"
90
+
New term added successfully to JSON!
91
+
```
92
+
93
+
## Search Functionality
94
+
95
+
The search function provides real-time suggestions as you type:
96
+
1. Enter a term in the search box
97
+
2. Select from the dropdown of suggestions or press Enter
98
+
3. If the term exists, you'll be redirected to the term's page
99
+
4. Use the "I'm Feeling Nerdy" button to discover random tech terms
100
+
89
101
## How to Contribute
90
-
Fork this repository.
91
-
Clone your forked repository to your local machine.
92
-
Create a new branch for your feature or bug fix.
93
-
Implement your changes and commit them to your branch.
94
-
Push your changes to your forked repository.
95
-
Create a pull request to the main repository.
96
-
97
-
## Contribution Guidelines:
98
-
Follow the existing structure and style conventions in both HTML and CSS.
99
-
Ensure that all terms added to the JSON file are unique and properly formatted.
100
-
101
-
Use the provided tools (`addterm.sh` or `AddTerm.java`) to add new terms.
102
+
1. Fork this repository
103
+
2. Clone your forked repository to your local machine
104
+
3. Create a new branch for your feature or bug fix
105
+
4. Implement your changes and commit them to your branch
106
+
5. Push your changes to your forked repository
107
+
6. Create a pull request to the main repository
108
+
109
+
### Contribution Guidelines:
110
+
- Follow the existing structure and style conventions
111
+
- Ensure that all terms added to the JSON file are unique and properly formatted
112
+
- Use the provided tools (`AddTerm.sh` or `AddTerm.java`) to add new terms
113
+
- Test your changes locally before submitting a pull request
114
+
102
115
## License
103
116
This project is open-source under the MIT License.
0 commit comments