Commit 159f549b3e
Unsigned
Layout: unified · split
search.py +2
| @@ -3,6 +3,7 @@ import sys | |||
| 3 | 3 | ||
| 4 | LOG_PATH = os.path.expanduser("~/.crumb/history.org") | 4 | LOG_PATH = os.path.expanduser("~/.crumb/history.org") |
| 5 | 5 | ||
| 6 | |||
| 6 | def search_log(query): | 7 | def search_log(query): |
| 7 | """ | 8 | """ |
| 8 | Search for a given query string within the crumb history log file and print matching entries. | 9 | Search for a given query string within the crumb history log file and print matching entries. |
| @@ -29,6 +30,7 @@ def search_log(query): | |||
| 29 | if found == 0: | 30 | if found == 0: |
| 30 | print("No matches found.") | 31 | print("No matches found.") |
| 31 | 32 | ||
| 33 | |||
| 32 | if __name__ == "__main__": | 34 | if __name__ == "__main__": |
| 33 | """ | 35 | """ |
| 34 | Entry point for the script. Parses command line arguments and calls the search function. | 36 | Entry point for the script. Parses command line arguments and calls the search function. |