-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set per issue title #1642
Set per issue title #1642
Conversation
Download in EPUB not MOBI and the dates will be added to the title |
Again you need to change the download format to EPUB and the output |
Indeed. By the way, it has nothing to do with EPUB as a download format - Calibre will happily add date to EPUB too. However, it adds the date of download (May 15), not the day when it was issued (May 14). This would be especially confusing if one was using the support for downloading old issues on lines 20 and 247-249. I noticed there is a function Would not some sort of API for setting the date used in the title with non-kindle-output be useful? Another thing is that non-kindle output is putting text like this:
in the ebook, which I do not want. The last time I checked, the only way around it to use a kindle output format, no? If there was a way to either turn on "date in title" for Kindle or turn off the text for non-Kindle output, I would be happy with the current functionality. |
On Sun, May 15, 2022 at 03:46:54AM -0700, Tomáš Hnyk wrote:
Indeed. By the way, it has nothing to do with EPUB as a download format - Calibre will happily add date to EPUB too.
However, it adds the date of download (May 15), not the day when it was issued (May 14). This would be especially confusing if one was using the support for downloading old issues on lines 20 and 247-249.
I noticed there is a function `publication_date()` (undocumented here: https://manual.calibre-ebook.com/news_recipe.html ) but when I tried to modify that, it only changes `<dc:date>2020-01-02T00:00:00+00:00</dc:date>` in `content.opf` in the resulting EPUB file.
Would not some sort of API for setting the date used in the title with non-kindle-output be useful?
Set timefmt in the recipe in parse_index.
Another thing is that non-kindle output is putting text like this:
This article was downloaded by calibre from https://www.economist.com/the-world-this-week/2022/05/14/politics
| [Section menu](clbr://internal.invalid/feed_0/index.html#article_0) | [Main menu](clbr://internal.invalid/index_u1.html#feed_0) |
in the ebook, which I do not want. The last time I checked, the only way around it to use a kindle output format, no?
If there was a way to either turn on "date in title" for Kindle or turn off the text for non-Kindle output, I would be happy with the current functionality.
No, there isnt. You are free to run from source with a patch.
|
I do not need to format it. I would like (and I think that should be the default anyway) the date in the title set for the date of the issue of the magazine (that is what my PR did). It would be useful especially when downloading older issues. Would you accept a patch that would modify create_opf calibre/src/calibre/web/feeds/news.py Line 1460 in ae0f3a8
Would you accept a patch that would make the navbar optional via a setting? |
On Sun, May 15, 2022 at 12:48:00PM -0700, Tomáš Hnyk wrote:
> Set timefmt in the recipe in parse_index.
I do not need to format it. I would like (and I think that should be the default anyway) the date in the title set for the date of the issue of the magazine (that is what my PR did). It would be useful especially when downloading older issues.
So you set timefmt to whatever the issue date is.
Would you accept a patch that would modify create_opf ( https://github.com/kovidgoyal/calibre/blob/ae0f3a86dbb11326ca64843ac8c79837d8b84ab6/src/calibre/web/feeds/news.py#L1460 ) to use publication_date if set byt the recipe? If publication_date is not set, it default to now in both cases anyway?
Sure.
> No, there isnt. You are free to run from source with a patch.
Would you accept a patch that would make the navbar optional via a setting?
No.
|
|
As discussed here: kovidgoyal#1642 (comment), this makes the title in a recipe use the date when a given publication was issued (if set by a recipe) instead of current time. As a proof of concept, this is implemented for the Economist recipe.
As discussed here: kovidgoyal#1642 (comment), this makes the title in a recipe use the date when a given publication was issued (if set by a recipe) instead of current time.
This modifies the title of the downloaded e-book for the economist with the date. It is useful for telling appart different issues in calibre, in the filesystem (the filename is taken from the titile) and it also makes life easier for some e-readers, like this:
https://www.mobileread.com/forums/showthread.php?t=346484
I am sure, python-wise, this can be more elegant but this seems to work. The title of the downloaded magazine is then "The Economist from 2022-05-14" or something like that.