plainbook 0.0.6__py3-none-any.whl → 0.0.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plainbook/js/nb.js +9 -0
- plainbook/views/index.html +1 -1
- {plainbook-0.0.6.dist-info → plainbook-0.0.7.dist-info}/METADATA +2 -2
- {plainbook-0.0.6.dist-info → plainbook-0.0.7.dist-info}/RECORD +8 -8
- {plainbook-0.0.6.dist-info → plainbook-0.0.7.dist-info}/WHEEL +0 -0
- {plainbook-0.0.6.dist-info → plainbook-0.0.7.dist-info}/entry_points.txt +0 -0
- {plainbook-0.0.6.dist-info → plainbook-0.0.7.dist-info}/licenses/LICENSE.md +0 -0
- {plainbook-0.0.6.dist-info → plainbook-0.0.7.dist-info}/top_level.txt +0 -0
plainbook/js/nb.js
CHANGED
|
@@ -152,6 +152,9 @@ createApp({
|
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
const generateCode = async (cellIndex) => {
|
|
155
|
+
if (!geminiApiKey.value) {
|
|
156
|
+
throw new Error('Gemini API key is not set. Please set it in the settings.');
|
|
157
|
+
};
|
|
155
158
|
asRead.value = false;
|
|
156
159
|
try {
|
|
157
160
|
const response = await fetch(`/generate_code?token=${authToken}`, {
|
|
@@ -172,6 +175,9 @@ createApp({
|
|
|
172
175
|
};
|
|
173
176
|
|
|
174
177
|
const regenerateAllCode = async () => {
|
|
178
|
+
if (!geminiApiKey.value) {
|
|
179
|
+
throw new Error('Gemini API key is not set. Please set it in the settings.');
|
|
180
|
+
};
|
|
175
181
|
for (let i = 0; i < notebook.value.cells.length; i++) {
|
|
176
182
|
if (notebook.value.cells[i].cell_type === 'code') {
|
|
177
183
|
await generateCode(i);
|
|
@@ -185,6 +191,9 @@ createApp({
|
|
|
185
191
|
};
|
|
186
192
|
|
|
187
193
|
const validateCode = async (cellIndex) => {
|
|
194
|
+
if (!geminiApiKey.value) {
|
|
195
|
+
throw new Error('Gemini API key is not set. Please set it in the settings.');
|
|
196
|
+
};
|
|
188
197
|
asRead.value = false;
|
|
189
198
|
try {
|
|
190
199
|
const response = await fetch(`/validate_code?token=${authToken}`, {
|
plainbook/views/index.html
CHANGED
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
<button id="btn-info" class="button is-light" @click="openInfo" title="About Plainbook">
|
|
100
100
|
<span class="icon"><i class="fa fa-info"></i></span>
|
|
101
101
|
</button>
|
|
102
|
-
<button id="btn-settings" class="button is-light" @click="openSettings" title="Settings">
|
|
102
|
+
<button id="btn-settings" class="button" :class="geminiApiKey ? 'is-light' : 'is-warning'" @click="openSettings" title="Settings">
|
|
103
103
|
<span class="icon"><i :class="geminiApiKey ? 'fa fa-cog' : 'fa fa-warning'"></i></span>
|
|
104
104
|
<span>Settings</span>
|
|
105
105
|
</button>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plainbook
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: Plain Language Notebooks
|
|
5
5
|
Author-email: Luca de Alfaro <dealfaro@acm.org>
|
|
6
|
-
License: BSD-3-Clause
|
|
6
|
+
License-Expression: BSD-3-Clause
|
|
7
7
|
Project-URL: Homepage, https://github.com/lucadealfaro/plainbook
|
|
8
8
|
Project-URL: Issues, https://github.com/lucadealfaro/plainbook/issues
|
|
9
9
|
Keywords: notebook,jupyter,natural language,data science
|
|
@@ -18,14 +18,14 @@ plainbook/js/MarkdownCell.js,sha256=NGDAGpb0FkTZ-wh-izYKlQ7ZkcdfQAX4GBc_x45ormQ,
|
|
|
18
18
|
plainbook/js/OutputRenderer.js,sha256=KXECI2xd0Sk_TnZnAfqfhL0dEIT9pjZZTXo6Qdiw0o4,2981
|
|
19
19
|
plainbook/js/ValidationCell.js,sha256=iVwISyGa1owLNakit-M4PXapNkC1C2rsLXEJLK_Cdhs,1617
|
|
20
20
|
plainbook/js/markdown-it.min.js,sha256=hNyljag6giCsjv_yKmxK8_VeHzvMDvc5u8AzmRvm1BI,103012
|
|
21
|
-
plainbook/js/nb.js,sha256=
|
|
21
|
+
plainbook/js/nb.js,sha256=DADOQR7vjoUTsoCJ4KbqdYiRMyBqQ4L6ZEK1MKj4oSk,23028
|
|
22
22
|
plainbook/js/prism-python.min.js,sha256=7UOFaFvPLUk1yNu6tL3hZgPaEyngktK_NsPa3WfpqFw,2113
|
|
23
23
|
plainbook/js/prism.min.js,sha256=57iL3cbHV7L8jLET4kaYAasUp47BqPraTWOR41c_X58,18997
|
|
24
24
|
plainbook/js/vue.esm-browser.js,sha256=75FuLhUTPk19sncwNIrm0BGEL0_Qw298-_v01fPWYoI,542872
|
|
25
|
-
plainbook/views/index.html,sha256=
|
|
26
|
-
plainbook-0.0.
|
|
27
|
-
plainbook-0.0.
|
|
28
|
-
plainbook-0.0.
|
|
29
|
-
plainbook-0.0.
|
|
30
|
-
plainbook-0.0.
|
|
31
|
-
plainbook-0.0.
|
|
25
|
+
plainbook/views/index.html,sha256=nG-hAHKlmy8W5eCcnHqktjvvaqlCHjk3F2O7ZhXV6Ig,15261
|
|
26
|
+
plainbook-0.0.7.dist-info/licenses/LICENSE.md,sha256=JW6Hp9mBeCkRkCSeiT2KmIU3XA5mJorjcIlM2cOOxyU,1462
|
|
27
|
+
plainbook-0.0.7.dist-info/METADATA,sha256=k6OFCYgwDiPSSCa0XBxzeUe2ewLnCHluQXadAsdnkU0,3023
|
|
28
|
+
plainbook-0.0.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
plainbook-0.0.7.dist-info/entry_points.txt,sha256=fktud-zRh9ZZ4rXv5w6kW-78u44lSYklXY1ttMTB9k8,50
|
|
30
|
+
plainbook-0.0.7.dist-info/top_level.txt,sha256=Y3jOV2n79dczNw9tJ7acufz3y3ns2pWw8b06sIN4ltc,10
|
|
31
|
+
plainbook-0.0.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|