paoloap / zaread Goto Github PK
View Code? Open in Web Editor NEWA (very) lightweight MS Office file reader
License: GNU General Public License v3.0
A (very) lightweight MS Office file reader
License: GNU General Public License v3.0
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.
For .mobi files, the value returned by file --mime-type
could be:
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
Line 98 in 86e148e
Just for a quick fix, I simply changed it to search for x-mobipocket-ebook
and otherwise it works fine now.
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?
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
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, ...
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?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.