Coder Social home page Coder Social logo

yyy33 / ctpv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nikitaivanovv/ctpv

0.0 0.0 0.0 2.25 MB

Terminal previewer

Home Page: https://nikitaivanovv.github.io/ctpv/

License: MIT License

Shell 6.92% C 88.64% Awk 1.35% Makefile 2.62% sed 0.46%

ctpv's Introduction

ctpv

Terminal previewer

showcase


ctpv is a previewer utility for terminals.

It supports previews for source code, archives, PDF files, images and videos (see Previews).

Image previews are powered by one of these:

ctpv is a remake of an awesome program named stpv written in C. stpv worked perfectly for me, except it was kinda sluggish because it was written in POSIX shell. ctpv is an attempt to make a faster version of stpv and add some new features.

Originally it was made for lf file manager but I believe that it can be easily integrated into other programs as well (either via configuration file like in lf or a simple wrapper script).

Dependencies

Libraries

  • libcrypto
  • libmagic

Previews

Previewing each file type requires specific programs. If a program is not found on the system, ctpv will try to use another one. Only one program is required for each file type. For example, you only need either elinks, lynx or w3m installed on your system to view HTML files.

File types Programs
any exiftool cat
archive atool
diff colordiff delta diff-so-fancy
directory ls
font fontimage
gpg-encrypted gpg
html elinks lynx w3m
image ueberzug chafa
json jq
markdown mdcat
office libreoffice
pdf pdftoppm
text bat cat highlight source-highlight
torrent transmission-show
video ffmpegthumbnailer

Installation

Manual

git clone https://github.com/NikitaIvanovV/ctpv
cd ctpv
sudo make install

Uninstall with sudo make uninstall

AUR

If you are an Arch Linux user, you can install ctpv-git AUR package.

yay -S ctpv-git

Integration

lf file manager

Add these lines to your lf config (usually located at ~/.config/lf/lfrc).

set previewer ctpv
set cleaner ctpvclear
&ctpv -s $id
&ctpvquit $id

Documentation

Full documentation on command line options, configuration and how to define custom previews can be found here: https://nikitaivanovv.github.io/ctpv/

ctpv's People

Contributors

nikitaivanovv 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.