We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e45fe1 commit 30a3f22Copy full SHA for 30a3f22
notebooks/toggl-to-harvest.ipynb
@@ -6,6 +6,7 @@
6
"metadata": {},
7
"outputs": [],
8
"source": [
9
+ "import json\n",
10
"import os\n",
11
"from pathlib import Path\n",
12
"import pandas as pd\n",
@@ -24,7 +25,16 @@
24
25
" Convert a string formatted duration (e.g. 01:30) to a timedelta.\n",
26
" \"\"\"\n",
27
" return pd.to_timedelta(pd.to_datetime(td, format=\"%H:%M:%S\").strftime(\"%H:%M:%S\"))\n",
- "\n"
28
+ "\n",
29
30
+ "def read_user_info():\n",
31
+ " with open(USER_INFO_FILE, \"r\") as ui:\n",
32
+ " return json.load(ui)\n",
33
34
35
+ "def write_user_info(info):\n",
36
+ " with open(USER_INFO_FILE, \"w\") as ui:\n",
37
+ " json.dump(info, ui, indent=2)"
38
]
39
},
40
{
0 commit comments