-
Notifications
You must be signed in to change notification settings - Fork 322
Team FAULT #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Team FAULT #5
Changes from all commits
02485d6
63bcd99
7505586
5974009
66bcb24
c14615a
1d1b1e2
eb2cf6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -1,95 +1,83 @@ | ||||||||||
<img width="1280" alt="readme-banner" src="https://github.com/user-attachments/assets/35332e92-44cb-425b-9dff-27bcf1023c6c"> | ||||||||||
|
||||||||||
# [Project Name] 🎯 | ||||||||||
### 🎯AURA CALCULATOR!🗿 | ||||||||||
[Demo Video](https://www.youtube.com/watch?v=25jjvBbx4Mw&ab_channel=POKER) | ||||||||||
|
||||||||||
|
||||||||||
## Basic Details | ||||||||||
### Team Name: [Name] | ||||||||||
### Team Name: FAULT | ||||||||||
|
||||||||||
|
||||||||||
### Team Members | ||||||||||
- Team Lead: [Name] - [College] | ||||||||||
- Member 2: [Name] - [College] | ||||||||||
- Member 3: [Name] - [College] | ||||||||||
- Team Lead: Abhishek Sunil - Government College of Engineering,Parassinikadavu | ||||||||||
- Member 2: Richard Reji - Government College of Engineering,Parassinikadavu | ||||||||||
- Member 3: Gourav K - Government College of Engineering,Parassinikadavu | ||||||||||
|
||||||||||
### Project Description | ||||||||||
[2-3 lines about what your project does] | ||||||||||
wanna find your "തേജസ്"!?,Here we introduce our AURA CALCULATOR to calculate your daily life Aura | ||||||||||
|
||||||||||
### The Problem (that doesn't exist) | ||||||||||
[What ridiculous problem are you solving?] | ||||||||||
Ever feel like your vibe could use a little more... vibe? Or maybe you're just curious if helping that old lady cross the street earns you more cosmic points than that time you totally nailed a backflip in front of your friends. In a world where good deeds and cringe moments fly by unnoticed, there's no fun way to keep track of how our actions add up. Sure, we all want to be good people (most of the time), but where’s the scoreboard? How do you know if spilling coffee on your shirt knocked down your cool factor or if saving your friend from a bad joke earned you bonus points? | ||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
### The Solution (that nobody asked for) | ||||||||||
[How are you solving it? Keep it fun!] | ||||||||||
Enter the Aura Calculator: the fun and quirky way to measure the ups and downs of your daily actions. It's like a karma meter, but with a twist—now you can see how your good deeds, awkward mishaps, and epic wins shape your aura score, all while having a good laugh along the way. | ||||||||||
|
||||||||||
## Technical Details | ||||||||||
### Technologies/Components Used | ||||||||||
For Software: | ||||||||||
- [Languages used] | ||||||||||
- [Frameworks used] | ||||||||||
- [Libraries used] | ||||||||||
- [Tools used] | ||||||||||
- Python | ||||||||||
- CustomTkinter | ||||||||||
- Tkinter | ||||||||||
|
||||||||||
For Hardware: | ||||||||||
- [List main components] | ||||||||||
- [List specifications] | ||||||||||
- [List tools required] | ||||||||||
|
||||||||||
### Implementation | ||||||||||
For Software: | ||||||||||
# Installation | ||||||||||
[commands] | ||||||||||
|
||||||||||
To run this project, follow these steps: | ||||||||||
|
||||||||||
1. **Clone the Repository**: | ||||||||||
```bash | ||||||||||
git clone https://github.com/yourusername/aura-calculator.git | ||||||||||
cd aura-calculator | ||||||||||
2.install CTKinter | ||||||||||
```bash | ||||||||||
pip install customtkinter | ||||||||||
``` | ||||||||||
# Run | ||||||||||
[commands] | ||||||||||
|
||||||||||
### Project Documentation | ||||||||||
For Software: | ||||||||||
1.in terminal type | ||||||||||
```bash | ||||||||||
python aura_calculator.py | ||||||||||
``` | ||||||||||
|
||||||||||
# Screenshots (Add at least 3) | ||||||||||
 | ||||||||||
*Add caption explaining what this shows* | ||||||||||
|
||||||||||
 | ||||||||||
*Add caption explaining what this shows* | ||||||||||
|
||||||||||
 | ||||||||||
*Add caption explaining what this shows* | ||||||||||
 | ||||||||||
*home interfce* | ||||||||||
|
||||||||||
# Diagrams | ||||||||||
 | ||||||||||
*Add caption explaining your workflow* | ||||||||||
 | ||||||||||
*User 1 with his/her aura balance* | ||||||||||
|
||||||||||
For Hardware: | ||||||||||
|
||||||||||
# Schematic & Circuit | ||||||||||
 | ||||||||||
*Add caption explaining connections* | ||||||||||
 | ||||||||||
|
||||||||||
 | ||||||||||
*Add caption explaining the schematic* | ||||||||||
*User 2 with his/her aura balance* | ||||||||||
|
||||||||||
# Build Photos | ||||||||||
 | ||||||||||
*List out all components shown* | ||||||||||
|
||||||||||
 | ||||||||||
*Explain the build steps* | ||||||||||
 | ||||||||||
|
||||||||||
 | ||||||||||
*Explain the final build* | ||||||||||
|
||||||||||
### Project Demo | ||||||||||
# Video | ||||||||||
[Add your demo video link here] | ||||||||||
*Explain what the video demonstrates* | ||||||||||
[demo video link](https://youtu.be/25jjvBbx4Mw) | ||||||||||
*The video demonstrate the user inputing ones actions and calculating his aura blance* | ||||||||||
Comment on lines
+56
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix documentation structure and grammar in demo section. Please address the following:
🧰 Tools🪛 LanguageTool
🪛 Markdownlint
Comment on lines
+73
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix grammar in video description. - *The video demonstrate the user inputing ones actions and calculating his aura blance*
+ *The video demonstrates a user inputting actions and calculating their aura balance* 📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[uncategorized] ~74-~74: This verb does not appear to agree with the subject. Consider using a different form. (AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT) |
||||||||||
|
||||||||||
# Additional Demos | ||||||||||
[Add any extra demo materials/links] | ||||||||||
|
||||||||||
## Team Contributions | ||||||||||
- [Name 1]: [Specific contributions] | ||||||||||
- [Name 2]: [Specific contributions] | ||||||||||
- [Name 3]: [Specific contributions] | ||||||||||
- Richard Reji: Thought on god level and found the bomblastic idea! [+10,000 aura] | ||||||||||
- Abhishek Sunil: Used his gifted coding skills and found the algorthim.coded using tkinter[+16,269 aura] | ||||||||||
- Gourav K: Bro watched and chilled(ha ha jk!)....bro modified the code using Customtkinter and made the UI more modern[+6969 aura] | ||||||||||
|
||||||||||
--- | ||||||||||
Made with ❤️ at TinkerHub Useless Projects | ||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,149 @@ | ||||||||||||||||||
import customtkinter as ctk | ||||||||||||||||||
from tkinter import messagebox | ||||||||||||||||||
|
||||||||||||||||||
class AuraCalculator: | ||||||||||||||||||
def __init__(self, root): | ||||||||||||||||||
self.root = root | ||||||||||||||||||
self.root.title("Aura Calculator") | ||||||||||||||||||
ctk.set_appearance_mode("dark") # Use dark mode for a modern look | ||||||||||||||||||
ctk.set_default_color_theme("green") # Change the theme to your liking | ||||||||||||||||||
|
||||||||||||||||||
self.users = {} | ||||||||||||||||||
self.current_user = None | ||||||||||||||||||
|
||||||||||||||||||
# Predefined actions with points | ||||||||||||||||||
self.actions = { | ||||||||||||||||||
"Backflip in front of a crowd": 1000, | ||||||||||||||||||
"Helping an elderly person cross the street": 500, | ||||||||||||||||||
"Winning a local talent show": 800, | ||||||||||||||||||
"Making a perfect joke at the right moment": 300, | ||||||||||||||||||
"Successfully organizing a group event": 600, | ||||||||||||||||||
"Dressing in a unique, stylish outfit": 400, | ||||||||||||||||||
"Winning a challenging game of chess": 200, | ||||||||||||||||||
"Volunteering at a charity event": 700, | ||||||||||||||||||
"Saving a friend from an embarrassing situation": 400, | ||||||||||||||||||
"Completing a marathon": 1000, | ||||||||||||||||||
"Slipping and falling in public": -1000, | ||||||||||||||||||
"Failing to show up for a friend’s party": -500, | ||||||||||||||||||
"Making a joke that falls flat": -300, | ||||||||||||||||||
"Getting caught cheating in a game": -800, | ||||||||||||||||||
"Arguing loudly with someone in public": -600, | ||||||||||||||||||
"Showing up late to an important event": -400, | ||||||||||||||||||
"Spilling coffee on your shirt before a meeting": -200, | ||||||||||||||||||
"Interrupting someone during a conversation": -300, | ||||||||||||||||||
"Bragging too much about your achievements": -400, | ||||||||||||||||||
"Forgetting a close friend's birthday": -600, | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
self.filtered_actions = list(self.actions.keys()) | ||||||||||||||||||
|
||||||||||||||||||
# Add a logo (replace with your own path if you have a logo image) | ||||||||||||||||||
self.logo = ctk.CTkLabel(root, text=" 🗿Aura Calculator ✨", font=("Helvetica", 24, "bold")) | ||||||||||||||||||
self.logo.grid(row=0, column=0, columnspan=3, pady=10) | ||||||||||||||||||
|
||||||||||||||||||
# UI Elements | ||||||||||||||||||
self.username_entry = ctk.CTkEntry(root, placeholder_text="Enter Username", width=300) | ||||||||||||||||||
self.username_entry.grid(row=1, column=1, padx=10, pady=5) | ||||||||||||||||||
ctk.CTkLabel(root, text="Username:", font=("Helvetica", 14)).grid(row=1, column=0) | ||||||||||||||||||
|
||||||||||||||||||
self.register_button = ctk.CTkButton(root, text="Register", command=self.register_user, width=120) | ||||||||||||||||||
self.register_button.grid(row=1, column=2) | ||||||||||||||||||
|
||||||||||||||||||
# Search bar for actions | ||||||||||||||||||
self.search_entry = ctk.CTkEntry(root, placeholder_text="Search Action", width=300) | ||||||||||||||||||
self.search_entry.grid(row=2, column=1, padx=10, pady=5) | ||||||||||||||||||
self.search_entry.bind("<KeyRelease>", self.filter_actions) | ||||||||||||||||||
ctk.CTkLabel(root, text="Search Action:", font=("Helvetica", 14)).grid(row=2, column=0) | ||||||||||||||||||
|
||||||||||||||||||
# Dropdown for selecting actions | ||||||||||||||||||
self.selected_action = ctk.StringVar() | ||||||||||||||||||
self.action_menu = ctk.CTkOptionMenu(root, variable=self.selected_action, values=self.filtered_actions, width=300) | ||||||||||||||||||
self.selected_action.set("Select an action") | ||||||||||||||||||
self.action_menu.grid(row=3, column=1, padx=10, pady=5) | ||||||||||||||||||
ctk.CTkLabel(root, text="Action:", font=("Helvetica", 14)).grid(row=3, column=0) | ||||||||||||||||||
|
||||||||||||||||||
self.add_action_button = ctk.CTkButton(root, text="Add Action", command=self.add_action, width=120) | ||||||||||||||||||
self.add_action_button.grid(row=3, column=2) | ||||||||||||||||||
|
||||||||||||||||||
self.balance_label = ctk.CTkLabel(root, text="Aura Balance: N/A", font=("Helvetica", 16)) | ||||||||||||||||||
self.balance_label.grid(row=4, columnspan=3, pady=10) | ||||||||||||||||||
|
||||||||||||||||||
# Action History Listbox | ||||||||||||||||||
self.history_listbox = ctk.CTkTextbox(root, width=500, height=200, font=("Helvetica", 12)) | ||||||||||||||||||
self.history_listbox.grid(row=5, column=0, columnspan=2, padx=10, pady=5) | ||||||||||||||||||
|
||||||||||||||||||
# Delete Action Button | ||||||||||||||||||
self.delete_action_button = ctk.CTkButton(root, text="Delete Selected Action", command=self.delete_action, width=200) | ||||||||||||||||||
self.delete_action_button.grid(row=5, column=2) | ||||||||||||||||||
|
||||||||||||||||||
def register_user(self): | ||||||||||||||||||
username = self.username_entry.get().strip() | ||||||||||||||||||
if username in self.users: | ||||||||||||||||||
messagebox.showerror("Error", "User already exists!") | ||||||||||||||||||
elif not username: | ||||||||||||||||||
messagebox.showerror("Error", "Username cannot be empty!") | ||||||||||||||||||
else: | ||||||||||||||||||
self.users[username] = {'balance': 0, 'actions': []} | ||||||||||||||||||
self.current_user = username | ||||||||||||||||||
messagebox.showinfo("Success", f"User {username} registered!") | ||||||||||||||||||
self.update_balance_label() | ||||||||||||||||||
self.update_action_history() | ||||||||||||||||||
|
||||||||||||||||||
def add_action(self): | ||||||||||||||||||
if not self.current_user: | ||||||||||||||||||
messagebox.showerror("Error", "No user registered or selected!") | ||||||||||||||||||
return | ||||||||||||||||||
|
||||||||||||||||||
action = self.selected_action.get() | ||||||||||||||||||
if action == "Select an action": | ||||||||||||||||||
messagebox.showerror("Error", "Please select a valid action!") | ||||||||||||||||||
return | ||||||||||||||||||
Comment on lines
+97
to
+100
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Handle invalid action selection in When no actions match the search term, the action menu displays "No actions found". If the user attempts to add an action at this point, the application may not handle this scenario properly. Consider updating the condition in - if action == "Select an action":
+ if action == "Select an action" or action == "No actions found": Alternatively, disable the 📝 Committable suggestion
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
points = self.actions[action] | ||||||||||||||||||
user_data = self.users[self.current_user] | ||||||||||||||||||
user_data['actions'].append({'action': action, 'points': points}) | ||||||||||||||||||
user_data['balance'] += points | ||||||||||||||||||
self.update_balance_label() | ||||||||||||||||||
self.update_action_history() | ||||||||||||||||||
messagebox.showinfo("Success", f"Action added: {action} ({points} points)") | ||||||||||||||||||
|
||||||||||||||||||
def delete_action(self): | ||||||||||||||||||
selected_text = self.history_listbox.get("1.0", "end").splitlines() | ||||||||||||||||||
if not selected_text or selected_text[0] == "": | ||||||||||||||||||
messagebox.showerror("Error", "No action selected for deletion!") | ||||||||||||||||||
return | ||||||||||||||||||
|
||||||||||||||||||
user_data = self.users[self.current_user] | ||||||||||||||||||
action_text = selected_text.pop(0) | ||||||||||||||||||
action_to_delete = user_data['actions'].pop(0) | ||||||||||||||||||
user_data['balance'] -= action_to_delete['points'] | ||||||||||||||||||
self.update_balance_label() | ||||||||||||||||||
self.update_action_history() | ||||||||||||||||||
messagebox.showinfo("Success", f"Deleted action: {action_to_delete['action']} ({action_to_delete['points']} points)") | ||||||||||||||||||
|
||||||||||||||||||
Comment on lines
+110
to
+123
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Refactor The current implementation of the To fix this issue, consider the following:
Here's a possible modification: - selected_text = self.history_listbox.get("1.0", "end").splitlines()
- if not selected_text or selected_text[0] == "":
+ selected_indices = self.history_listbox.curselection()
+ if not selected_indices:
messagebox.showerror("Error", "No action selected for deletion!")
return
user_data = self.users[self.current_user]
- action_text = selected_text.pop(0)
- action_to_delete = user_data['actions'].pop(0)
+ index = selected_indices[0]
+ action_to_delete = user_data['actions'].pop(index)
+ self.history_listbox.delete(index)
user_data['balance'] -= action_to_delete['points']
self.update_balance_label()
self.update_action_history()
messagebox.showinfo("Success", f"Deleted action: {action_to_delete['action']} ({action_to_delete['points']} points)") Note: Adjust the code to match the appropriate methods and widgets available in
🧰 Tools🪛 Ruff
|
||||||||||||||||||
def update_balance_label(self): | ||||||||||||||||||
if self.current_user: | ||||||||||||||||||
balance = self.users[self.current_user]['balance'] | ||||||||||||||||||
self.balance_label.configure(text=f"Aura Balance: {balance}") | ||||||||||||||||||
|
||||||||||||||||||
def update_action_history(self): | ||||||||||||||||||
self.history_listbox.delete("1.0", "end") | ||||||||||||||||||
if self.current_user: | ||||||||||||||||||
for action in self.users[self.current_user]['actions']: | ||||||||||||||||||
action_text = f"{action['action']} ({action['points']} points)\n" | ||||||||||||||||||
self.history_listbox.insert("end", action_text) | ||||||||||||||||||
|
||||||||||||||||||
def filter_actions(self, event): | ||||||||||||||||||
search_term = self.search_entry.get().lower() | ||||||||||||||||||
self.filtered_actions = [action for action in self.actions if search_term in action.lower()] | ||||||||||||||||||
self.update_action_menu() | ||||||||||||||||||
|
||||||||||||||||||
def update_action_menu(self): | ||||||||||||||||||
self.action_menu.set(self.filtered_actions[0] if self.filtered_actions else "No actions found") | ||||||||||||||||||
self.action_menu.configure(values=self.filtered_actions) | ||||||||||||||||||
|
||||||||||||||||||
if __name__ == "__main__": | ||||||||||||||||||
|
||||||||||||||||||
root = ctk.CTk() | ||||||||||||||||||
app = AuraCalculator(root) | ||||||||||||||||||
root.mainloop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhance technical documentation for better setup guidance.
Please consider these improvements:
yourusername/aura-calculator
with the actual repository URL