diff options
Diffstat (limited to '')
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | db.py | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -16,7 +16,7 @@ Fonctionalities: [X] Get all articles [ ] Get `n` articles from a range [ ] Add an article - [ ] Delete an article + [X] Delete an article [ ] Edit an article [X] Import from shaarli 0.11 [ ] Search @@ -99,3 +99,12 @@ def bookmarks(path): for name in files: bookmarks.append(bookmark(path / Path(name))) return bookmarks + + +def remove(path): + path = Path(path) + try: + os.remove(path) + logging.info("{} removed".format(path.name)) + except FileNotFoundError: + logging.warning("{} doesn't exist!".format(path.name)) |