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

gebo-docs

v0.0.12

Published

A gebo-server module for document-to-text conversions

Downloads

9

Readme

gebo-docs

A gebo-server module for document-to-text conversions

Third-party requirements

This package has a butt-load of dependencies. It's tested on Ubuntu 12.04. It'll probably work on other distributions, but the unit tests may break.

poppler-utils 0.24.5

This enables you to convert PDFs to plain text (with pdftotext).

Remove the current poppler-utility, if present:

sudo apt-get remove poppler-utils

Visit [http://poppler.freedesktop.org/] to get a new and stable version (the preferred version is poppler-0.24.5.tar.xz)

tar xvf poppler-0.24.5.tar.xz

Prep poppler-utils for compilation and installation:

cd poppler-0.24.5
./configure

If configure is stopped due to missing fontconfig, you need to install fontconfig:

sudo apt-get install libfontconfig1-dev
./configure

Compile the package:

sudo make

Install the programs, data files, and documentation:

sudo make install

Reboot the system:

sudo reboot

See if the programs were installed:

pdftohtml

If you see the following message:

error while loading shared libraries: libpoppler.so.44: cannot open shared object
file: No such file or directory

Run:

sudo cp /usr/local/lib/libpoppler.so.44 /usr/lib/

docx2txt

Download the source and install manually from here: [http://sourceforge.net/projects/docx2txt/]

sudo apt-get install unzip
tar xvfz docx2txt-1.2.tgz
cd docx2txt-1.2/
sudo make
cd /usr/local/bin
sudo cp docx2txt.pl docx2txt

Et al

sudo apt-get install unrtf
sudo apt-get install odt2txt
sudo apt-get install catdoc

Install

npm install gebo-docs

Usage

Do this if you're happy with the default configuration:

var doc = require('gebo-docs')();

Do this if you set your own third-party dependencies in gebo-docs.json (copy the file provided into the desired directory and modify there):

var doc = require('gebo-docs')('/directory/in/which/config/file/is/contained');

Once required,

doc.convertToText('filename').
    then(text) {
        console.log(text); 
      }).
    catch(err) {
        // Something went wrong 
      });

Contributing

Hit me with it

Licence

MIT