Commit Graph

51879 Commits

Author SHA1 Message Date
Kovid Goyal 1acde49ce5 Merge branch 'master' of https://github.com/cbhaley/calibre 2025-09-15 18:41:11 +05:30
Charles Haley dd880c8dea Update the template language documentation to include the new 'with' statement 2025-09-15 13:20:35 +01:00
Kovid Goyal 9622ce41a8 Turn on scanning of C code in CodeQL
Because I want to spend the next half a day of my life swatting false
positives.
2025-09-15 17:21:03 +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
Kovid Goyal bb605226e7 Merge branch 'master' of https://github.com/cbhaley/calibre 2025-09-15 16:53:25 +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 85ece7d311 Try enbling CodeQL for python 2025-09-15 12:20:39 +05:30
Kovid Goyal cbf39025f7 Move dependabot scans to weekly from monthly 2025-09-15 11:25: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 8db3e0f996 ... 2025-09-14 21:31:51 +05:30
Kovid Goyal ecacc3b9d4 ... 2025-09-14 21:28:13 +05:30
Kovid Goyal ce333c9de4 Add a note about typical timelines for security incident responses 2025-09-14 21:13:58 +05:30
Kovid Goyal 5ef384300d Dont ignore removed ruff linting rule 2025-09-14 19:09:44 +05:30
Kovid Goyal 90ab77e21a pep8 2025-09-14 19:09:06 +05:30
Kovid Goyal 09abf38d1e Merge branch 'master' of https://github.com/cbhaley/calibre 2025-09-14 19:08:28 +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
Kovid Goyal e848948301 Merge branch 'master' of https://github.com/unkn0w7n/calibre 2025-09-13 19:27:06 +05:30
unkn0w7n c973a2afec Update econ recipes 2025-09-13 14:31:07 +05:30
Kovid Goyal bbd776c959 Merge branch 'master' of https://github.com/unkn0w7n/calibre 2025-09-13 14:28:41 +05:30
unkn0w7n 49a866846c Update economist_free.recipe 2025-09-13 14:27:22 +05:30
unkn0w7n 060e3ae3ce Update economist.recipe
Refactor link parsing
2025-09-13 14:26:33 +05:30
Kovid Goyal 9287ca7ee6 Merge branch 'master' of https://github.com/unkn0w7n/calibre 2025-09-13 14:16:18 +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 05bc5e5bee Add licensing and dep type info to sources.json 2025-09-10 07:51:12 +05:30
Kovid Goyal 0d9627879b Update security.md to call out github private security advisories 2025-09-09 22:45:56 +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