Skip to content

Commit 123420d

Browse files
committed
version 1.1.0
1 parent 8a4ca88 commit 123420d

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ For an example of how to use these, see the default format settings in the plugi
4242
---
4343

4444
Formatting options based on the [Obsidian Clipper](https://github.com/jplattel/obsidian-clipper) Chrome extension.
45+
46+
h2o-index.txt is for the [plugin index page](https://www.mobileread.com/forums/showthread.php?t=118764) on the Calibre forum.

h2o-index.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*][URL="https://www.mobileread.com/forums/showthread.php?t=351283"]Highlights to Obsidian[/URL]
2+
[I]Sends calibre highlights to Obsidian markdown editor with customizable formatting.[/I]

h2o/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class HighlightsToObsidianPlugin(InterfaceActionBase):
99
description = 'Automatically send highlights from calibre to obsidian.md'
1010
supported_platforms = ['windows', 'osx', 'linux'] # only tested on windows
1111
author = 'jm289765'
12-
version = (1, 0, 0)
12+
version = (1, 1, 0)
1313
actual_plugin = 'calibre_plugins.highlights_to_obsidian.menu_button:MenuButton'
1414
minimum_calibre_version = (6, 10, 0) # this plugin probably works on earlier versions, i haven't tested
1515

h2o/button_actions.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,15 @@ def send_all_selected_highlights(parent, db):
141141
:param db: calibre database: Cache().new_api
142142
"""
143143

144+
confirm = QMessageBox()
145+
confirm.setText("Are you sure you want to send ALL highlights of the selected books to obsidian? This cannot be undone.")
146+
confirm.setStandardButtons(QMessageBox.Yes | QMessageBox.No)
147+
confirm.setIcon(QMessageBox.Question)
148+
confirmed = confirm.exec()
149+
150+
if confirmed != QMessageBox.Yes:
151+
return
152+
144153
try:
145154
parent.library_view # check if this exists
146155
gui = parent

h2o/config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,13 @@ def __init__(self):
102102
# 'Recommended: "timestamp" or "location"'
103103

104104
# time setting
105-
self.time_label = QLabel('Last time highlights were sent (highlights made after this are considered new):', self)
105+
self.time_label = QLabel('Last time highlights were sent (highlights made after this are considered new)', self)
106106
self.l.addWidget(self.time_label)
107107

108+
# time format info
109+
self.time_format_label = QLabel("Time must be formatted: \"YYYY-MM-DD hh:mm:ss\"")
110+
self.l.addWidget(self.time_format_label)
111+
108112
self.time_input = QLineEdit(self)
109113
self.time_input.setText(prefs['last_send_time'])
110114
self.l.addWidget(self.time_input)
@@ -115,10 +119,6 @@ def __init__(self):
115119
self.set_time_now_button.clicked.connect(self.set_time_now)
116120
self.l.addWidget(self.set_time_now_button)
117121

118-
# time format info
119-
self.time_format_label = QLabel("Time must be formatted: \"YYYY-MM-DD hh:mm:ss\"")
120-
self.l.addWidget(self.time_format_label)
121-
122122
def make_format_info_labels(self):
123123
format_info = "Notes sent to obsidian have the following formatting options. " + \
124124
"To use one, put it in curly brackets, as in {title} or {blockquote}."
25.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)