Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 02-12-2025, 03:38 PM   #166
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post
the interpolated 'author' is already URL-encoded.
got it, thanks
Comfy.n is online now   Reply With Quote
Old 02-12-2025, 03:39 PM   #167
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
At the moment I'm trying to figure how a deepseek query could be made using just a url. Not sure it's possible. :\

This add-on works fine on browser context menu:

https://addons.mozilla.org/en-US/fir.../ask-deepseek/
Where are you trying to put that URL? In any event, I suspect that because it is interpreted by firefox, the only way it **might** work is if firefox is the system default browser. WHen I try it with Chrome as the default I get an invitation to switch to Firefox.
chaley is offline   Reply With Quote
Advert
Old 02-12-2025, 03:45 PM   #168
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post
Where are you trying to put that URL? In any event, I suspect that because it is interpreted by firefox, the only way it **might** work is if firefox is the system default browser. WHen I try it with Chrome as the default I get an invitation to switch to Firefox.
I edited my previous post to mention the add-on code and its AMO page to install it on mozilla based browsers.

Let me try to clarify: I don't see how to get a direct url to open a chat.deepseek.com query, as that add-on can do so seamlessly from selected text on any webpage.

If it was possible to find an endpoint (I think that's what devs call it), one could create a custom column to query {title} by {author} on Deepseek in order to get some blurb, or other inquiries about the title and author, via book details click
Comfy.n is online now   Reply With Quote
Old 02-12-2025, 04:00 PM   #169
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
I edited my previous post to mention the add-on code and its AMO page to install it on mozilla based browsers.

Let me try to clarify: I don't see how to get a direct url to open a chat.deepseek.com query, as that add-on can do so seamlessly from selected text on any webpage.

If it was possible to find an endpoint (I think that's what devs call it), one could create a custom column to query {title} by {author} on Deepseek in order to get some blurb, or other inquiries about the title and author, via book details click
I took a quick look at the API. It appears that you could do it by constructing POST queries and be prepared to get JSON responses, which isn't something doable with a single URL. It requires code.
chaley is offline   Reply With Quote
Old 02-12-2025, 04:04 PM   #170
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post
I took a quick look at the API. It appears that you could do it by constructing POST queries and be prepared to get JSON responses, which isn't something doable with a single URL. It requires code.
Yes, thanks for looking. Anyway, just a random idea, and this could be possible also with the Search Internet plugin if there was some direct api access... I examined the requests and it's clear it isnt doable with a single url
Comfy.n is online now   Reply With Quote
Advert
Old 02-12-2025, 04:32 PM   #171
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,975
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Was this made on a request or "just seemed like a good idea"?
ownedbycats is offline   Reply With Quote
Old 02-12-2025, 04:36 PM   #172
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Was this made on a request or "just seemed like a good idea"?
Are you talking to me? About the custom column search URL? If so then on request: https://bugs.launchpad.net/calibre/+bug/2097591
chaley is offline   Reply With Quote
Old 02-12-2025, 04:41 PM   #173
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,975
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by chaley View Post
Are you talking to me? About the custom column search URL? If so then on request: https://bugs.launchpad.net/calibre/+bug/2097591
Ahh. I was wondering,
ownedbycats is offline   Reply With Quote
Old 02-13-2025, 06:19 AM   #174
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by chaley View Post
I took a quick look at the API. It appears that you could do it by constructing POST queries and be prepared to get JSON responses, which isn't something doable with a single URL. It requires code.
Code:
program: make_url('https://chatgpt.com', 'q', $title  & ' ' & $author)
On the other hand it was easy peasy to have a clickable book details search for the much enshittificated chatgpt.
Attached Thumbnails
Click image for larger version

Name:	MWSnap 2025-02-13, 08_07_47.png
Views:	313
Size:	307.9 KB
ID:	213630   Click image for larger version

Name:	2025-02-13 08_03_44-Edit custom column.png
Views:	281
Size:	22.1 KB
ID:	213631  
Comfy.n is online now   Reply With Quote
Old 02-16-2025, 06:52 AM   #175
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Code:
program: make_url('https://phind.com/search', 'q', $title  & ' by ' & $author)
https://www.phind.com/search?q=The+P...B2+Machiavelli

I've found Phind to be a much better alternative for this purpose, so I changed my template.
Comfy.n is online now   Reply With Quote
Old 06-26-2025, 06:55 AM   #176
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
26 June 2025 - (in calibre preview 8.5.100 and subsequent releases)
  • Remove the GUI-only restriction from check_yes_no(). The function will now work in device templates.

Last edited by chaley; 06-29-2025 at 02:02 PM.
chaley is offline   Reply With Quote
Old 07-08-2025, 07:57 AM   #177
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
08 July 2025 - (in calibre 8.6.0)
  • In GPM, allow comment lines to start with blanks or tabs before the '#' instead of only allowing the '#' in the first column.

Last edited by chaley; 07-10-2025 at 10:42 PM.
chaley is offline   Reply With Quote
Old 07-09-2025, 08:12 AM   #178
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
09 July 2025 - (in calibre 8.6.0)
  • format_duration(value, template, [largest_unit])
    Format the value, a number of seconds, into a string showing weeks, days, hours, minutes, and seconds. If the value is a float then it is rounded to the nearest integer. You choose how to format the value using a template consisting of value selectors surrounded by [ and ] characters. The selectors are:
    Code:
    [w]: weeks 
    [d]: days 
    [h]: hours 
    [m]: minutes 
    [s]: seconds
    You can put arbitrary text between selectors.

    The optional largest_unit parameter specifies the largest of weeks, days, hours, minutes, and seconds that will be produced by the template. If provided it must be one of the
    value selectors.

    The following examples use a duration of 2 days (172,800 seconds) 1 hour (3,600 seconds) and 20 seconds, which totals to 176,420 seconds.
    • format_duration(176420, '[d][h][m][s]') will return the value 2d 1h 0m 20s.
    • format_duration(176420, '[h][m][s]') will return the value 49h 0m 20s.
    • format_duration(176420, 'Your reading time is [d][h][m][s]', 'h') returns the value Your reading time is 49h 0m 20s.
    • format_duration(176420, '[w][d][h][m][s]') returns the value 2d 1h 0m 20s. Note that the zero weeks value is not returned.
    More functionality is documented in calibre.

Last edited by chaley; 07-13-2025 at 06:49 AM.
chaley is offline   Reply With Quote
Old 07-13-2025, 06:52 AM   #179
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
12 July 2025 - (in calibre 8.7.0)
  • formats_path_segments(with_author, with_title, with_format, with_ext, sep)
    return parts of the path to a book format in the calibre library separated by ``sep``. The parameter ``sep`` should usually be a slash (``'/'``). One use is to be sure that paths generated in Save to disk and Send to device templates are shortened consistently. Another is to be sure the paths on the device match the paths in the calibre library.

    See the manual for full documentation.

Last edited by chaley; 07-18-2025 at 10:06 AM.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A few questions... (template language, mainly) Clem2605 Library Management 2 12-30-2020 03:25 AM
Template Language phossler Calibre 8 01-12-2016 04:37 PM
Help needed with template language Mamaijee Devices 12 02-19-2013 01:52 AM
Help with template language Pepin33 Calibre 8 11-11-2012 08:32 AM
Template language question BookJunkieLI Library Management 7 02-02-2012 06:55 PM


All times are GMT -4. The time now is 06:58 PM.


MobileRead.com is a privately owned, operated and funded community.