Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/test.py
/piecharttest.py
/piecharttest.py
*.idea
*.vscode
*output
*.json
5 changes: 5 additions & 0 deletions Converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@

with open(fileName) as json_file:
data = json.load(json_file)
if data=={}:
print("data is empty")
exit(-1)


#0
Expand Down Expand Up @@ -67,6 +70,8 @@ def BarGraph():
what = str(input("Do you want to save this? (y/n): ")).lower()
if what == "y":
name = str(input("Enter the name for the file: "))
if not os.path.exists("./output/"):
os.mkdir("./output/")
plt.savefig("./output/" + name)
print("File saved!")
plt.show()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

## Steps
1. Export your WakaTime coding activity as json [here](https://wakatime.com/settings/account)
2. Replace the data.json file with the new json file
2. Put your json file in `/input` folder, one file per run.
3. Run Converter.py
4. Choose your option
Empty file added input/.gitkeep
Empty file.
1 change: 0 additions & 1 deletion input/data.json

This file was deleted.