Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
= 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.