bookmarks manipulation library
This commit is contained in:
parent
67a44bd7e9
commit
0fe87b68e8
11
bookmarks/bookmarks.py
Normal file
11
bookmarks/bookmarks.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
from json import dumps, loads
|
||||||
|
|
||||||
|
bookmarks = "bookmarks.json"
|
||||||
|
|
||||||
|
def load():
|
||||||
|
with open(bookmarks) as f:
|
||||||
|
return loads(f.read())
|
||||||
|
|
||||||
|
def store(b):
|
||||||
|
with open(bookmarks + ".new", 'w') as f:
|
||||||
|
return f.write(dumps(b))
|
Loading…
Reference in New Issue
Block a user