Giter VIP home page Giter VIP logo

bookmark_trim's Introduction

A bunch of command-line helper functions for pdf and djvu files (possibly the whole files in a directory). It can:

  • Trim and collapse the bookmarks of the files in the directory.

  • Compress the pdf files in the directory, using ghostscript.

  • The 'trim', washes the redundant words, i.g., 'Chapter', 'Section', 'Appendix', ... from the bookmark titles. You can have your own collection of stop-words. (See more about this in help: pdf.sh -h). You can disable the trimming.

    Usage:

  • First git clone the repository, cd to the cloned directory make pdfb.sh file executable: cmod +x pdfb.sh (For your convenience make a smylink to pdfb.sh on your environmet path). Now, for example:

    pdfb.sh pdf-dir -so

    will trim the bookmarks, without optimizing the pdf file. This requires jpdfbookmarks on your machine.

  • To Compress and trim the pdf files with default stop_words. This needs ghostscript on your machine (which by default is available on almost all distributions):

    pdfb.sh pdf-dir

  • To trim the word "dummy" from the beginging of bookmark titles:

    pdfb.sh pdf-dir -w dummy

  • To use optimization without trimming bookmarks:

    pdfb.sh pdf-dir -s

  • Pdf2djvu for all the files of a directory (this is just a wrapper for the pdf2djvu utility for LizardTech (so, it should be available on your machine). Also it picks some very specific parameters for pdf2djvu utility which I found generally useful for converting black-white pdfs to djvu, so use at your own risk.

    python djvub.py pdf-dir

  • To just trim the word "dummy" without optimization:

    pdfb.sh pdf-dir -so -w dummy

bookmark_trim's People

Contributors

mohammad22 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.