39050 Commits

Author SHA1 Message Date
Kovid Goyal
4fe9fe2974
Viewer Ask AI: Option to have the AI respond in the current user interface language instead of English 2025-09-20 06:05:01 +05:30
Kovid Goyal
1f6afb8e63
Bump preview version 2025-09-19 22:44:19 +05:30
Kovid Goyal
c8ef39009f
Fix bugs with custom Ask AI actions 2025-09-19 22:43:43 +05:30
Kovid Goyal
748e9e270c
Fix incorrect default value for llm_quick_actions
Guess I forgot to remove that from the original PR
2025-09-19 17:01:24 +05:30
Kovid Goyal
243cf03deb
Bump version for beta release 2025-09-19 09:22:31 +05:30
Kovid Goyal
460bef6487
string changes 2025-09-19 08:10:37 +05:30
Charles Haley
4887d6990b Add the function "f_string()", similar to python's 'f strings', to the template language. 2025-09-18 17:38:15 +01:00
Kovid Goyal
622c6eb09b
Increase timeout for all other backends to 120 secs 2025-09-17 08:02:22 +05:30
Kovid Goyal
f87e6f574d
Ollama backend: Add configurable timeout 2025-09-17 07:58:31 +05:30
Kovid Goyal
4b07fe00c9
Have the default AI provider for text to text be Google 2025-09-16 08:20:41 +05:30
Kovid Goyal
edf73c2118
Make CodeQL happy 2025-09-15 19:16:21 +05:30
Kovid Goyal
e8868c8e83
certgen: Use AES 256 as the CBC when serializing RSA keys
That is the current standard recommendation
2025-09-15 19:03:43 +05:30
Kovid Goyal
57dc9a0bcb
Make CodeQL happy 2025-09-15 18:54:19 +05:30
Kovid Goyal
d1ec4a2b91
PDB Input: Ignore malformed ExceptioNCharSets headers in plucker files. Fixes #2123829 [PDB to EPUB conversion Python error](https://bugs.launchpad.net/calibre/+bug/2123829)
The data from the header was unused anyway
2025-09-15 17:10:59 +05:30
Kovid Goyal
5c1f96269d
Fix NYTimes
Avoid double cleaning of JSON
2025-09-15 17:05:38 +05:30
Charles Haley
b47670d4f8 Fix the help text for --sort-by 2025-09-15 12:05:08 +01:00
Charles Haley
8b2ae35fae Fix for problem described in https://www.mobileread.com/forums/showthread.php?t=369898, can't sort by custom columns 2025-09-15 11:54:22 +01:00
Kovid Goyal
60eb111ef4
Make CodeQL happy
Tighten up a few regexes
2025-09-15 15:00:17 +05:30
Kovid Goyal
cb3ae447dc
Make CodeQL happy
Dont output github token to stdout during build
2025-09-15 14:47:46 +05:30
Kovid Goyal
4252c0c1cc
... 2025-09-15 14:38:37 +05:30
Kovid Goyal
4727e4b9e1
Annotate that currently all search engine backends are non functional due to CAPTCHAs 2025-09-15 14:36:36 +05:30
Kovid Goyal
bfb2f527f9
Make CodeQL happy 2025-09-15 14:00:31 +05:30
Kovid Goyal
f2c8596d56
Make CodeQL happy
Update a couple of hashes from SHA1 to SHA256
These were only used as keys in caches but try explaining
that SHA1 is perfectly safe for this use case to your typical security
person.
2025-09-15 13:32:41 +05:30
Kovid Goyal
0e1dc84203
CodeQL: Update the smtplib module to use the ssl stdlib context
This prevents usage of outdated SSL protocol versions and matches the
behavior of the python stdlib smtplib library as of python 3.13
2025-09-15 13:23:25 +05:30
Kovid Goyal
1f69ab8701
Make CodeQL happy
None of these are actual issues, as is usual for CodeQL
2025-09-15 13:16:19 +05:30
Kovid Goyal
d346c19c80
E-book viewer: Fix modifying an existing highlight causing duplicates to be created in some books. Fixes #2122747 [Private bug](https://bugs.launchpad.net/calibre/+bug/2122747)
Probably the issue manifests when using box-sizing: border-box in the
book CSS, but I didnt bother to check for the exact cause.
2025-09-15 11:13:45 +05:30
Kovid Goyal
81475dad84
E-book viewer: Fix placement of selection handles in some books when modifying an existing highlight 2025-09-15 10:14:55 +05:30
Kovid Goyal
90ab77e21a
pep8 2025-09-14 19:09:06 +05:30
Charles Haley
ed83d9eeb8 Several related changes:
* Add a "with" statement to the template language that for the duration of the code block changes the "current book" to the one specified by the book id.
* A new formatter function selected_books() that returns the book ids of the currently selected books
* A new formatter function selected_column() that returns the lookup name of the column containing the selected cell.
* A new formatter function sort_book_ids() that sorts the books specified by book_ids.
* A new formatter function show_dialog() that opens a dialog to display plain text or html.
* Add check boxes to the template tester to control "run as you type" and to restrict test runs to the first selected book.

Here is an example using several of the new features:

program:
 ids = sort_book_ids(selected_books(), 'series', 1, 'title', 1);
 res = '<style> th, td {padding: 2px;}</style> <h2>Book Size Report</h2><p><table>';
 total = 0;

 def table_row(title, series, size):
  return strcat('<tr><td>', title, '</td>',
       '<td>', series, '</td>',
       '<td>', if size !=# 0 then human_readable(size) else '0' fi, '</td>',
       '</tr>', character('newline'))
 fed;

 for id in ids:
  with id:
   s = booksize();
   total = total + s;
   res = strcat(res, table_row($title, $series, s))
  htiw
 rof;
 res = strcat(res, table_row('TOTAL', '', total));
 res = strcat(res, '</table>');
 show_dialog(res)
2025-09-14 14:26:35 +01:00
Kovid Goyal
91216de5f3
When exporting annotations as markdown, format the date as italics to serve as a visual marker separating the highlighted text from its notes 2025-09-14 11:27:50 +05:30
unkn0w7n
882b2dd517 Update nytimes.py
fix JSON decode error
2025-09-13 11:38:44 +05:30
Kovid Goyal
3b036b4853
DRYer 2025-09-13 08:50:35 +05:30
Kovid Goyal
817f936a56
Add support for reasoning to Ollama backend 2025-09-13 08:38:44 +05:30
Kovid Goyal
9a43f11b2b
Basic Ollama interaction works 2025-09-12 07:17:27 +05:30
Kovid Goyal
5d7e967f83
... 2025-09-12 07:14:38 +05:30
Kovid Goyal
f0fcb84234
... 2025-09-11 17:29:41 +05:30
Kovid Goyal
f9914da65f
Start work on Ollama backend 2025-09-11 09:42:53 +05:30
Kovid Goyal
2be1c4d276
Add web searches to OpenRouter
Defaults to disable as unlike Gemini, where the first 1500 are free,
they cost approx two cents per request.
2025-09-10 12:24:37 +05:30
Kovid Goyal
de5c0c91f8
Remove OpenAI as it requires waay too many hoops to jump through to get access to its models
They currently require you to take selfies and upload a governemnt ID.
For crying out loud, are they insane?
2025-09-10 11:25:42 +05:30
Kovid Goyal
8292ae9e6f
Start work on OpenAI backend 2025-09-10 10:43:06 +05:30
Kovid Goyal
a4938b6465
DRYer 2025-09-10 09:41:21 +05:30
Kovid Goyal
275c3c3918
GitHub AI backend working apart from costing 2025-09-09 18:42:42 +05:30
Kovid Goyal
e8712f26f1
Start work on GitHub AI backend 2025-09-09 09:26:49 +05:30
Kovid Goyal
c6cf94f0a3
Open external http links in chat responses 2025-09-09 09:02:53 +05:30
Kovid Goyal
33f5d00252
Gemini: Add support for RAG with google searches 2025-09-09 06:49:02 +05:30
Kovid Goyal
b013beec19
pep8 2025-09-08 21:26:28 +05:30
Charles Haley
5fd445c656 Add ability to open a dialog box containing the cell's tooltip. This makes tooltips more accessible to people who primarily use the keyboard. A shortcut can be defined but none is set by default.
Also a few string changes.
2025-09-08 16:49:59 +01:00
Charles Haley
6ec119a537 Fix tooltips for non-string objects throwing exceptions when custom tooltip templates are used. This happens because idx.data(Qt.ItemDataRole.ToolTipRole) can return a bool, QDateTime, float, or int instead of the string representation for these objects.
pep8 will "fix" the Qt imports list.
2025-09-08 16:48:19 +01:00
Kovid Goyal
8c22882248
string changes 2025-09-08 20:46:36 +05:30
Kovid Goyal
ed3336dab2
Sort provider plugins by name only 2025-09-08 17:39:04 +05:30