| 142 | |
| 143 | # Get the hash of a entry |
| 144 | def hash(): |
| 145 | console.print("Enter A Key and Value to get Hash") |
| 146 | record_key = str( |
| 147 | Prompt.ask( |
| 148 | "Enter a Key", |
| 149 | choices=["name", "url", "author", "hash", "date"], |
| 150 | default="name", |
| 151 | ) |
| 152 | ) |
| 153 | record_value = str(Prompt.ask("Enter a Value")) |
| 154 | cursor.execute(f"SELECT * from dnview WHERE {record_key}='{record_value}'") |
| 155 | records = cursor.fetchone() |
| 156 | console.print(f"The Hash is {records[3]}") |
| 157 | |
| 158 | # Delete a entry from the table |
| 159 | def delete(key, value): |