Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzobandini committed Dec 24, 2024
1 parent 364ed99 commit 5b3f803
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions today.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ def cache_builder(edges, comment_size, force_cache, loc_add=0, loc_del=0):
Checks each repository in edges to see if it has been updated since the last time it was cached
If it has, run recursive_loc on that repository to update the LOC count
"""
cached = True # Assume all repositories are cached
filename = 'cache/'+hashlib.sha256(USER_NAME.encode('utf-8')).hexdigest()+'.txt' # Create a unique filename for each user
cached = True
filename = os.path.join('cache', hashlib.sha256(USER_NAME.encode('utf-8')).hexdigest()+'.txt') # Modificato il percorso
try:
with open(filename, 'r') as f:
data = f.readlines()
Expand Down Expand Up @@ -436,6 +436,7 @@ def formatter(query_type, difference, funct_return=False, whitespace=0):
"""
Lorenzo Bandini (lorenzobandini), 2024-2025
"""
os.makedirs('cache', exist_ok=True) # Crea la directory cache se non esiste
print('Calculation times:')
# define global variable for owner ID and calculate user's creation date
# e.g {'id': 'MDQ6VXNlcjU3MzMxMTM0'} and 2019-11-03T21:15:07Z for username 'lorenzobandini'
Expand Down

0 comments on commit 5b3f803

Please sign in to comment.