nikhil1raghav / kindle-send

Send webpages, documents and bookmarks to kindle
GNU Affero General Public License v3.0
210 stars 25 forks source link

Reintroduction of -title and -file in Version 2.0 #32

Open volkerwestphal opened 1 year ago

volkerwestphal commented 1 year ago

Is your feature request related to a problem? Please describe.

Yes, I think that Kindle-send 2.0 misses important features that makes it kind of incomplete, even in comparison to its predecessor Kindle-send 1.0.

Kindle-send 2.0 introduced actions (send, download, ...) but stripped away the old parameters -file and -title. Both parameters have been replaced by an autodetection mechanism, at least according to the documentation.

This autodetection is perfectly fine for new users or the occasional upload of a single webpage. But it is insufficient for a robust integration in scripted workflows and more advanced use cases.

For example, let's say we collected a large number of urls, sorted by topic in multiple files. Using Kindle-send 2.0, it is currently impossible ...

This is still all possible using Kindle-send 1.0.

Describe the solution you'd like

I suggest to add these optional parameters:

The strings {{title}} and {{author}} could also go into epub metadata. The cover page would ideally be linked in the epub's ToC as Cover.

The minimal cover page has advantages:

The minimal cover page has some disadvantages:

Describe alternatives you've considered

It is perfectly possible to reintroduce the formerly existing parameters without adding a cover page. However, at least for me, the additional cover page seems to fit nicely into the title-autodetection mechanism that was introduced in v2.0.

As a side note, it would probably make kindle-send even be able to send a epub that consists just of a cover page: kindle-send --title "cover only" send ... or maybe not.

Cover html draft :

<!DOCTYPE html>
<html>
<head>
  <style>
    body { font-family: Helvetica, sans-serif; }
    h1, p { text-align: center; }
    h1 { padding: 200px 0 0; }
  </style>
  <meta charset="utf-8">
  <meta name="author" content="{{param.author}}">
  <title>{{param.title}}</title>
</head>
<body>
  <h1>{{param.title}}</h1>
  <p>{{param.author}}</p>
</body>
</html>