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

office-convert

v0.2.2

Published

Wrapper for converting documents with unoconv. convert office document to other file type or html.

Downloads

9

Readme

OFFICE-CONVERTER

NPM version

use this module, you should confirm LibreOffice and Unoconv installed in your machine.

install LibreOffice

  • on OS X down dmg file from link

  • CentOS / RedHat

    CentOS and RedHat 7.2 自带 OpenOffice 4.3,如果想获得更好的体验,建议更换成LibreOffice,首先要卸载OpenOffice

    yum remove openoffice* libreoffice*

    从 RPM packages 安装LibreOffice

    wget http://download.documentfoundation.org/libreoffice/stable/5.2.5/rpm/x86_64/LibreOffice_5.2.5_Linux_x86-64_rpm.tar.gz
    
    tar -xvf LibreOffice_5.2.5_Linux_x86-64_rpm.tar.gz
    
    cd LibreOffice_5.2.5.x_Linux_x86-64_rpm/RPMS/
    
    yum localinstall *.rpm
    
    libreoffice5.2

install unoconv

  • on OS X

    通过 Homebrew 安装

    brew install unoconv
    brew install ghostscript
  • CentOS / RedHat

    从 github 下载程序包

    git clone https://github.com/dagwieers/unoconv.git
    
    # copy
    cp unoconv/unoconv /usr/bin
    # or link unoconv to /usr/bin
    ln -s unoconv/unoconv /usr/bin/unoconv

warning

unoconv start need use port 2002, so if want register unoconv as a service, should check port usage first.

Usage

var converter = require('office-convert').createConveter();
converter.generate(originFilePath, outputFileType, ouputFilePath).then(console.log).catch(console.error);

if use this module to converting documents, you can start a unoconv listener first

var converter = require('office-convert').createConveter({listener: true});

or

var converter = require('office-convert').createConveter();
converter.listen();