Giter VIP home page Giter VIP logo

zaread's People

Contributors

alfredevol avatar alvierahman90 avatar baleksa avatar eloitor avatar hassty avatar iuliandita avatar millenito avatar mvrozanti avatar paoloap avatar rubyowo avatar theoptimal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

zaread's Issues

Rewrite makefile to allow install in $HOME

For a local install of zaread, the binary should go to $HOME/.local/bin
and the desktop file should go to $HOME/.local/share/applications

The current variables in the Makefile do not allow this.

Should Condition to check for MOBI book files be expanded?

For .mobi files, the value returned by file --mime-type could be:

  • application/octet-stream
  • application/x-mobipocket-ebook

Right now the condition to check if it's a mobi file is only searching for the first possibility:

elif [ "$file_mt" = "application/octet-stream" ] && expr "$file" : "^.*\.mobi$" 1>/dev/null  ; then

zaread/zaread

Line 98 in 86e148e

elif [ "$file_mt" = "application/octet-stream" ] && expr "$file" : "^.*\.mobi$" 1>/dev/null ; then

Just for a quick fix, I simply changed it to search for x-mobipocket-ebook and otherwise it works fine now.

Opening spreadsheets (e.g. .xlsx file) without pagination

Opening some larger spreadsheets via zaread crops them to fit printed pages making them harder to read. I wonder if it was possible to control size of pagination in zaread (for example, A4, A3 or just "fit to all" contents) to avoid this cropping?

Thank you

I spend an hour searching for something like this. As you do I hate this bloated MS Office interface, it's awesome that zathura is used as default pdf reader because all other readers suck. Anyway thank you for this wonderful script

Following links in zathura

Hi, I was trying to follow links between files in zathura.

Using zathura-pdf-poppler, zathura outputs an error if it can't find the file. I used this error to redirect zathura to the correct path (assuming the file is read from the cache).

~/.local/bin/linkzathu.sh

#! /bin/sh

zathura "$1" 2> /dev/stdout  | awk -vd=$(pwd) -vc="$HOME/.cache/zaread" -F"«|»" 'NF > 0 && !/^error/ { gsub(c, d, $2); print $2 ; system("") }' | xargs -r -n 1 zaread

Setting READER="linkzathu.sh" in zareadrc, links on pdf files are opened in zathura (converted using zaread if necessary).

Example use:
A.md: has link to B.md
zaread A.md and following the B.md link, opens B.md in zaread

I don't know if you are interested in this, or if this small script fits this project at all. Feel free to add it in a section of the README or in a scripts folder, ...

About the shell that will interpreted the script

First, thanks for your script, it has been very helpful.

One question: I use debian, in it the path /bin/sh é um atalho para /bin/dash. This interpreter is pretty short and doesn't understanding things like [[ ]], so zared doesn't work in it. Is there a way for the script to be more compatible with different distributions?

Support URL Encoded paths

Thanks for this useful script. I've installed it as a default application and when I'm opening a, for example, .docx file in a Telegram Desktop, the script does nothing. Upon further inspection, it outputs:

/home/iamnotagenius/.local/share/TelegramDesktop/file://home/iamnotagenius/Downloads/Telegram%20Desktop/awin%20%234%202022.docx
cannot open `/home/iamnotagenius/.local/share/TelegramDesktop/file://home/iamnotagenius/Downloads/Telegram%20Desktop/awin%20%234%202022.docx' (No such file or directory)
/usr/bin/zaread: line 74: cd: /home/iamnotagenius/.local/share/TelegramDesktop/file://home/iamnotagenius/Downloads/Telegram%20Desktop/: No such file or directory
/usr/bin/zaread: line 74: return: can only `return' from a function or sourced script

So, I found out that the script gets file:///home/iamnotagenius/Downloads/Telegram%20Desktop/awin%20%234%202022.docx instead of an actual path. It would be nice if the script will handle this scenario.

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.