Autosave: 2024-04-29 18:00:04
This commit is contained in:
parent
a784a952d4
commit
0215854f25
2 changed files with 10 additions and 12 deletions
BIN
.zk/notebook.db
BIN
.zk/notebook.db
Binary file not shown.
|
@ -10,18 +10,16 @@ created: Monday, April 29, 2024
|
|||
```py
|
||||
import subprocess
|
||||
|
||||
|
||||
try:
|
||||
process = subprocess.run(
|
||||
["timew export"],
|
||||
shell=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
text=True,
|
||||
)
|
||||
return json.loads(process.stdout)
|
||||
except subprocess.CalledProcessError as e:
|
||||
process = subprocess.run(
|
||||
["ls", "-la"],
|
||||
shell=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
text=True,
|
||||
)
|
||||
return json.loads(process.stdout)
|
||||
|
||||
except subprocess.CalledProcessError as e:
|
||||
return e.stderr.strip()
|
||||
|
||||
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue