
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
= Bibi CLI
= {doctitle}
== Description
Bibi CLI is a command-line tools to work with https://github.com/satorumurmur/bibi[Bibi], an EPUB reader application. Currently, it provides only bibi publish
command.
bibi publish a command line tool that uploads EPUB files to S3 and make them readable via web using Bibi.
== Features
== Examples
% bibi publish moby-dick.epub
% bibi publish moby-dick.epub moby-dick-book
% bibi publish --bibi=s3://yourbucket/subdir/bibi moby-dick.epub moby-dick-book
== Requirements
== Install
% gem install bibi-publish
== Synopsis
=== Dry run
bibi publish supports --dry-run
option that shows file to upload but doesn't do it actually.
% bibi publish --bibi=s3://yourbucket/subdir/bibi path/to/moby-dick.epub moby-dick-book --dry-run
=== Uploading to given bucket and path
% bibi publish --bibi=s3://yourbucket/subdir/bibi path/to/moby-dick.epub
does:
moby-dick.epub
to s3://yourbucket/subdir/bibi-bookshelf/moby-dick
s3://yourbucket/subdir/bibi/moby-dick.html
Note that:
bibi-bookshelf
is automatically determined by bibi publishmoby-dick
is automatically determined by bibi publish according to the basename of given EPUB file moby-dick.epub
=== Specifying directory name under Bibi bookshelf
% bibi publish --bibi=s3://yourbucket/subdir/bibi path/to/moby-dick.epub moby-dick-book
The second argument page-blanch-book
is used for subdirectory and HTML file name on S3, which means it uses:
s3://yourbucket/subdir/bibi-bookshelf/moby-dick-book
instead of s3://yourbucket/subdir/bibi-bookshelf/moby-dick
s3://yourbucket/subdir/bibi/moby-dick-book.html
instead of s3://yourbucket/subdir/bibi/moby-dick.html
=== Not generating HTML file
% bibi publish --bibi=s3://yourbucket/subdir/bibi --no-page path/to/moby-dick.epub moby-dick-book
Pass --no-page
option to the command.
Note that you can read EPUB by visiting Bibi's usual URI \https://s3.your-region.amazonaws.com/yourbucket/subdir/bibi/?book=moby-dick-book
.
=== Inserting arbitrary fragments to generated HTML
bibi publish inserts HTML fragments from given files to at the end of <head>
and <body>
by --head-end
and --body-end
options respectively.
Assume we want to insert generator name in head element of Bibi HTML:
% cat ./generator.html
<meta name="generator" content="bibi publish">
Specify path to the the file by --head-end
option:
% bibi publish --bibi=s3://yourbucket/subdir/bibi --head-end=./generator.html path/to/moby-dick.epub
Now the HTML fragment is inserted into HTML file:
% curl -s https://s3.your-region.amazonaws.com/yourbucket/subdir/bibi/moby-dick.html | rg -B3 -A3 ''
</head>
<body data-bibi-book="moby-dick">
--body-end
option inserts HTML fragment in given file at just before </body>
in HTML.
== Configuration
You can configure bibi publish by the file ~/.config/bibi/publish.toml
in https://toml.io/[TOML] format. This is especially useful for avoiding to specify options such as --bibi
and --bookshelf
each time.
Example is here:
default
table is used by defaultThis is equivalent to pass command-line options --bibi=s3://yourbucket/subdir/bibi
, --bookshelf=s3://yourbucket/epubs
and --page
.
If you want to switch set of configuration depending on situation, add another table and specify it by --profile
option.
[production] bibi = "s3://your-production-bucket/bibi"
[staging] bibi = "s3://your-staging-bucket/bibi"
% bibi publish --profile=staging moby-dick.epub
Currently supported keys are bibi
, bookshelf
, page
, head_end
and body_end
.
=== AWS profile
Use environment variable AWS_PROFILE
:
% AWS_PROFILE=publicbibi bibi publish path/to/doc.epub
== See also
== Copyright
Copyright (c) 2020 Kitaiti Makoto
See {file:COPYING.txt} for details.
FAQs
Unknown package
We found that bibi-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.