nyre221 / dolphin-quick-view Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
/home/guido/.config/quick_view/dolphin_quick_view_shortcut.sh Pasolini\ Hostia\ elenco\ opere\ assicurazione\ con\ ritorni.xlsx method return time=1695136919.170724 sender=:1.19 -> destination=:1.815 serial=6095 reply_serial=2 method return time=1695136919.188539 sender=:1.190 -> destination=:1.818 serial=698 reply_serial=2 method return time=1695136919.302900 sender=:1.19 -> destination=:1.820 serial=6097 reply_serial=2 Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/home/guido/.config/quick_view/quick_view.pyz/__main__.py", line 4, in <module> File "/home/guido/.config/quick_view/quick_view.pyz/quick_view.py", line 307, in launch File "/home/guido/.config/quick_view/quick_view.pyz/quick_view.py", line 59, in __init__ File "/home/guido/.config/quick_view/quick_view.pyz/quick_view.py", line 150, in load_file_at_index File "/home/guido/.config/quick_view/quick_view.pyz/quick_view.py", line 191, in load_table_viewer File "/home/guido/.config/quick_view/quick_view.pyz/table_viewer.py", line 11, in load_file File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel/core.py", line 37, in get_sheet File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel/internal/core.py", line 21, in get_sheet_stream File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel/plugins/sources/file_input.py", line 38, in get_data File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel/plugins/parsers/excel.py", line 19, in parse_file File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel/plugins/parsers/excel.py", line 40, in _parse_any File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel_io/io.py", line 86, in get_data # version however. ^^^^ File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel_io/io.py", line 105, in _get_data for klass in (StringIO, TextIOWrapper): ^^^^^^^^^^^^^^^^^^^^^ File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel_io/io.py", line 191, in load_data File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel_io/reader.py", line 47, in open File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel_xls/xlsr.py", line 179, in __init__ File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel_xls/xlsr.py", line 146, in __init__ File "/home/guido/.config/quick_view/quick_view.pyz/pyexcel_xls/xlsr.py", line 165, in get_xls_book File "/home/guido/.config/quick_view/quick_view.pyz/xlrd/__init__.py", line 130, in open_workbook File "/home/guido/.config/quick_view/quick_view.pyz/xlrd/xlsx.py", line 812, in open_workbook_2007_xml File "/home/guido/.config/quick_view/quick_view.pyz/xlrd/xlsx.py", line 266, in process_stream AttributeError: 'ElementTree' object has no attribute 'getiterator'
New to this program (it's nice, thanks!).
Issue I'm having is that the aspect ratio isn't respected for media (PDF, Images, videos) and is always stretched too wide.
This is on the new 1.2.3 release (I've not had experience with the older ones).
Operating System: Manjaro Linux
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.5.3-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1130G7 @ 1.10GHz
Memory: 15,4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Krita's native file format is a zip file under the hood. It contains a preview.png for small thumbnails and a mergedimage.png for high resolution full size image of the file inside. So we can use this mergedimage.png file to get the file preview of kra files.
So I request you to add support for kra file preview it will be good to see kra document preview when browing large folder of artworks.
This is a thread for discussing getting Quick View to work with its dependencies installed in a Python virtual environment.
Re: issues with Python interpreter claiming it can't find PyQt5.QtWidgets
in a virtual environment
In my experience, I can only activate the virtual environment by using a shell script that sources the bin/activate
script inside the venv
, and then I can actually run the main Python module and have it start up with the proper environment so that it finds everything installed in the venv
location. Is that how you're doing it?
Hi there! I recently came across your dolphin-quick-view project and was eager to try it out on my Pop_OS system. Unfortunately, I've encountered some challenges during the installation process, and it seems that the application may not be compatible with Pop_OS.
Thanks
FYI:
On a Fedora 38 KDE spin in a Boxes virtual machine, I needed to install libjpeg-devel
, which actually installed libjpeg-turbo-devel
, to get past an error building the wheel for Pillow, during the pip install textract
step of the instructions from the Pling page for setting up requirements.
Also, if this works well and it looks like you're going to maintain it, I may integrate the installation of this into the optional steps taken by my own project when installing on KDE:
https://github.com/RedBearAK/toshy
The purpose of Toshy is to make it easy to install a keymapper setup to make the keyboard in Linux work like macOS, so having a Quick Look option for KDE would be fantastic.
For my own project I had to move to using a full Python virtual environment to make it compatible with more distros, and you might want to look into that. Some distros have recently moved to using a "managed" Python environment, which means they discourage the use of pip
to install packages, both at the system and the user level. And pipx
kind of works to get around that, but is not necessarily a replacement for a project with numerous Python dependencies.
KDE is in the process of migrating (along with many other FLOSS projects) to Qt6. Is that on the roadmap ?
Hi, there. 👋
First, thank you Nyre221 for the nice plugin. 🥳
Sorry to silly ask...
Could you tell me how can I uninstall your plugin, please? In order to reinstall the plugin, if it for need.
Thank you in advance. ❤️
The following error shows in the terminal:
method return time=1699972409.109006 sender=:1.51 -> destination=:1.773 serial=12539 reply_serial=2
Error org.freedesktop.DBus.Error.UnknownObject: No such object path '/dolphin/Dolphin_1'
Menu items in general are Title Case, so when you get a chance please change "Quick view" in the menu to "Quick View".
Obviously low priority. 👍🏽
Hi,
For Archlinux based distros (Manjaro), why are you overriding the system-managed environment to install textract?
pip install textract --break-system-packages
The pip warning seems pretty alarming imo
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
python-textract exists in the AUR
Installing from the AUR worked fine for me.
rm -rf ~/.local/lib/python3.11
removes anything added if the --break-system-packages command was run
I use Garuda but I think it is the same, the qpageview package does not exist and is called python-qpageview.
Hi, thank you for Quick View, lo aspettavo da anni!
I would suggest, for Office documents (both libreoffice and MS Office) to convert them to PDF and display them. unoconv can be useful for this.
In any case, I cannot get the display of xls(x) files, ods, ppt etc. to work while doc(x) files are displayed as plain text.
Hey, I just saw that you responded to a comment on Reddit asking about what the previewer does when no file is selected. And I confirmed that when a folder is selected, or if no file or folder is selected, the preview window will just show a random file (or the last file it viewed, maybe?).
I'd like to ask that you have it do something more logical and useful. In Apple's Quick Look, if you have a folder selected it will show you some basic info about the folder, like the number of files inside, a modification date, and the size (might want to restrict that to only local folders where it can calculate the size quickly, or have a reasonable timeout or a "Calculating..." on display). On the other hand, if you have no files or folders selected, QL will show you the info for the parent folder. In other words, it shows you info about the folder that is open and showing its files in the files pane. If you think about it, that's the thing that is always "selected" in a file manager, even when nothing is technically "selected".
GNOME Sushi doesn't show anything at all when nothing is selected. In my opinion this is a design bug, that can lead the user to wonder if the previewer is working. Something should always appear when the previewer is activated, whether it is by keyboard shortcut or from the context menu. Sushi at least shows info on the folder if you have a folder selected.
Pretty sure the Windows Explorer plugin also shows info about selected folders, but I'm not sure if it will show the parent folder info if nothing is selected.
Oh, and closely related to this, when I have multiple files and/or folders selected I get the same result as when nothing is selected (I think it's the last file that was previewed). For the case of having multiple files selected, the logical choice would probably to be to present some info about the group of files, like you would for a folder. A file count, total size of all selected files. Perhaps a list of file types among the selected files. But that last one might be more complicated to implement.
Basically, just show a simple version of what you'd see in a "Properties" dialog.
Note: You might want to tweak a setting to have yourself assigned to new issues automatically. I always forget where it is, maybe in issue templates.
No hurry on addressing anything in this issue. Just presenting ideas.
In my project, while trying to make it as widely compatible as possible, I ran into at least one Linux distro where the qdbus
command was not found, and instead was available as qdbus-qt5
.
I ended up having to use shutil.which()
to check whether either was available, and set a variable to use as an abstraction so the correct command name would be used.
This is from a class init
method where I set up the class attribute to use in other places in the installer script:
self.qdbus = 'qdbus-qt5' if shutil.which('qdbus-qt5') else 'qdbus'
My installer has been okay ever since I implemented that.
Might want to keep this on the back burner to work on at some point.
whatever the shortcut assigned to the qview or not, the plugin create crashes with dolphin.
(you can activate the shortcut as you want)
In Dolphin,the "Space" shortcut is assigned by default to the folder/file selection function.
since installing qview, the "Space" shortcut is confused with that of the plugin.
i do not have any logs to provide to you.
line 24
parameter = ""
should be
parameter=""
./INSTALL.sh: line 20: kdialog: command not found
I manually installed it, everything else worked fine.
Due to the shortcut script written in bash and the way the subprocesses were called in python, QuickView is probably susceptible to command injection via file name.
Nyre221/Kiview#5
QuickView doesn't appear to be affected by the same command as Kiview but is likely affected in other ways.
I have no intention of keeping the python version updated since I released the C++ version.
I am making this report to warn users of this possible vulnerability.
Hello!
I would like to know if there is a way for this add-on to work directly on the Plasma desktop. Or using the "Folder View" plasmoid. Because the shortcut in the context menu exists, however, when I click on it nothing happens. But if I do the same thing within the Dolphin application, then it works normally.
How do I get this to work on the Plasma desktop?
Not sure where else to go with this myself.
What happens in the journal when I open a Dolphin window:
Sep 10 16:07:22 fedora systemd[225583]: Started app-org.kde.dolphin-280b186f483449d7894f9410c83c0f6c.scope - Dolphin - File Manager.
Sep 10 16:07:22 fedora dolphin[228700]: kf.config.core: Access to ' "/home/testuser/Downloads/dolphin_quick_view/quick_view.desktop" ' denied, not owned by root and executable flag not set.
What happens when I try to Quick View a file:
Sep 10 16:13:59 fedora dolphin[228700]: Cannot initialize model with data QJsonObject(). missing: QJsonValue(string, "urls")
Sep 10 16:14:13 fedora systemd[225583]: Started app-quick_view-1b9ab765583c42a29a4a67d607c0a91d.scope - Quick view.
Sep 10 16:14:13 fedora python3[230910]: detected unhandled Python exception in '/home/testuser/.config/quick_view/quick_view.pyz'
Sep 10 16:14:13 fedora plasmashell[230910]: Traceback (most recent call last):
Sep 10 16:14:13 fedora plasmashell[230910]: File "<frozen runpy>", line 198, in _run_module_as_main
Sep 10 16:14:13 fedora plasmashell[230910]: File "<frozen runpy>", line 88, in _run_code
Sep 10 16:14:13 fedora plasmashell[230910]: File "/home/testuser/.config/quick_view/quick_view.pyz/__main__.py", line 1, in <module>
Sep 10 16:14:13 fedora plasmashell[230910]: File "/home/testuser/.config/quick_view/quick_view.pyz/quick_view.py", line 8, in <module>
Sep 10 16:14:13 fedora plasmashell[230910]: File "/home/testuser/.config/quick_view/quick_view.pyz/Page_viewer.py", line 1, in <module>
Sep 10 16:14:13 fedora plasmashell[230910]: ModuleNotFoundError: No module named 'qpageview'
Problem trying to install qpageview
with pip
:
pip install qpageview PyQt5
Defaulting to user installation because normal site-packages is not writeable
Collecting qpageview
Using cached qpageview-0.6.2.tar.gz (162 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-1kl9jjpa/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-1kl9jjpa/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-1kl9jjpa/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-1kl9jjpa/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 32, in <module>
File "/tmp/pip-install-6afp_seo/qpageview_26a27545f6b24413a6e729d07f96fb80/qpageview/__init__.py", line 65, in <module>
from . import link
File "/tmp/pip-install-6afp_seo/qpageview_26a27545f6b24413a6e729d07f96fb80/qpageview/link.py", line 34, in <module>
from PyQt5.QtCore import pyqtSignal, QEvent, QRectF, Qt
ModuleNotFoundError: No module named 'PyQt5'
And PyQt5 is already installed:
pip install PyQt5
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PyQt5 in /usr/lib64/python3.12/site-packages (5.15.9)
Requirement already satisfied: PyQt5-sip<13,>=12.11 in /usr/lib64/python3.12/site-packages (from PyQt5) (12.12.2)
DEPRECATION: textract 1.6.5 has a non-standard dependency specifier extract-msg<=0.29.*. pip 23.3 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of textract or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
I have a suggested rework of the installer script, not really to change what it does but mainly to change how it presents itself and handles errors. One reason is to have it integrate fairly cleanly with my own project, as an optional install component on KDE.
Take a look and if you like it I can submit it as a PR. But I thought I'd ask you first if you are good with the style changes I did, or if you want to do something more minimal.
Would love to see this available as a Flatpak to make installation and updates simple.
First, thank you for this awesome project!
A small issue that I encountered when installing this project: Apparently, I was missing certain apt packages of python3-pyqt5*
. In particular, it was complaining when I was missing to install python3-pyqt5.multimedia
. Maybe the required pyqt5 modules could be added to the Kubuntu requirements? This might be an oversight from my side that I simply didn't see those packages when I was following the requirement instructions. I'm on Kubuntu 23.10.
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.