mirror of
https://github.com/Xevion/bulk-reminders.git
synced 2025-12-07 01:14:34 -06:00
21 lines
386 B
Python
21 lines
386 B
Python
import json
|
|
import os
|
|
|
|
stages = []
|
|
|
|
|
|
def load() -> None:
|
|
"""Load data from the undo history file"""
|
|
with open('history.json', 'r') as history:
|
|
stages = json.load(history)
|
|
|
|
|
|
def save() -> None:
|
|
"""Save data to the undo history file."""
|
|
with open('history.json', 'w') as history:
|
|
stages = json.dump(history)
|
|
|
|
|
|
if os.path.exists('history.json'):
|
|
load()
|