npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

comic-info

v0.0.4

Published

Get info from comic book file e.g. cbz

Downloads

30

Readme

comic-info

Build Status

Gets information for comic-book files e.g. pages, size, meta data. Currently supports PDF, CBZ, CBR, CB7 and CBT.

Prerequisites

Several tools are required to open up all functionality. You can install everything or just those you need.

  • p7zip - to install 7z command, required for archive based file support e.g. CBZ, CBR.
  • poppler - to install pdfinfo command, required PDF support.
# OSX
$ brew update && brew doctor && brew install p7zip && brew install poppler
# Ubuntu
$ sudo apt-get install poppler-utils && sudo apt-get install p7zip-full

Install

npm install comic-info --save

Usage

To see info on a CBZ file.

'use strict';

const path = require('path'),
    comic = require('comic-info'),
    filePath = path.join(__dirname, 'BusterBear10.cbz');

new comic({ path: filePath })
    .then(res => { if (res){ console.log('Success!', res); } })
    .catch(err => { if (err){ console.log('Failed!', err); } });

/*
// res = ...
{ dir: '/Users/lee/Projects/misc/comic-info/examples',
  filename: 'BusterBear10.cbz',
  ext: '.cbz',
  name: 'BusterBear10',
  size: 2349084,
  created: Sun May 29 2016 20:13:11 GMT+0100 (BST),
  modified: Sun May 29 2016 20:13:11 GMT+0100 (BST),
  pages: 3,
  encrypted: false,
  files:
   [ { date: '2016-05-29',
       time: '20:13:10',
       attr: 'D....',
       size: 0,
       compressed: 0,
       name: 'BusterBear10' },
     { date: '2016-05-16',
       time: '22:27:46',
       attr: '.....',
       size: 812820,
       compressed: 796005,
       name: 'BusterBear10/CCI05162016_0002.jpg' },
     { date: '2016-05-16',
       time: '22:28:00',
       attr: '.....',
       size: 786033,
       compressed: 769174,
       name: 'BusterBear10/CCI05162016_0003.jpg' },
     { date: '2016-05-16',
       time: '22:28:34',
       attr: '.....',
       size: 799701,
       compressed: 782887,
       name: 'BusterBear10/CCI05162016_0004.jpg' } ],
  meta:
   { Path: '/Users/lee/Projects/misc/comic-info/examples/BusterBear10.cbz',
     Type: 'zip',
     'Physical Size': '2349084' } } */

To see info on a PDF file.

'use strict';

const path = require('path'),
    comic = require('comic-info'),
    filePath = path.join(__dirname, 'ChillingTales013.pdf');

new comic({ path: filePath })
    .then(res => { if (res){ console.log('Success!', res); } })
    .catch(err => { if (err){ console.log('Failed!', err); } });

/*
// res = ...
{ dir: '/Users/lee/Projects/misc/comic-info/examples',
  filename: 'ChillingTales013.pdf',
  ext: '.pdf',
  name: 'ChillingTales013',
  size: 4167051,
  created: Sun May 29 2016 20:14:51 GMT+0100 (BST),
  modified: Sun May 29 2016 20:14:37 GMT+0100 (BST),
  pages: 5,
  encrypted: false,
  files: [],
  meta:
   { root: '/',
     dev: 16777217,
     mode: 33188,
     nlink: 1,
     uid: 501,
     gid: 20,
     rdev: 0,
     blksize: 4096,
     ino: 18290377,
     blocks: 8144,
     atime: Sun May 29 2016 20:16:01 GMT+0100 (BST),
     birthtime: Sun May 29 2016 20:14:36 GMT+0100 (BST),
     Title: 'ChillingTales013\u0000',
     Producer: 'ImageMagick 6.9.3-6 Q16 x86_64 2016-03-13 http',
     CreationDate: 1590706800000,
     ModDate: 1590706800000,
     Tagged: false,
     UserProperties: false,
     Suspects: false,
     Form: 'none',
     JavaScript: false,
     PageSize: '264 x 371.04 pts',
     PageRot: 0,
     FileSize: '4167051 bytes',
     Optimized: false,
     PDFVersion: 1.3 } } */