Nies221

joined 1 year ago
[–] Nies221@lemmy.world 1 points 11 months ago

To get the size of archives and folders:
os.stat(filename).st_size # for folders you have to use it together with os.walk()

To get the list of files inside an archive I use the zipfile, rarfile and tarfile modules.
For the file type, I either extract the extension from the name or I use a bash command via subprocess:file --mime-type filepath
subprocess is used if there is no extension (as often happens with text files).

I preferred to use subprocess to avoid having to increase the number of dependencies needed.

[–] Nies221@lemmy.world 1 points 11 months ago (3 children)

.txt or plain text files without extension are supported.

 

What has changed:
1: Added preview of folders and archives (zip, tar.gz, tar.xz, rar)
2: Now the documents (odt,xlsx,odp and others) are converted to pdf and then shown.
3: Added support for .odp,.ppt,.pptx,.tar.gz,.tar.xz,.zip, and .rar files
4: It is now possible to scroll through the video timeline with the arrow keys.
5: The keyboard shortcuts have been changed.

Many previously required dependencies are no longer needed.
To preview documents (optional) you need to install LibreOffice.

If you want to support me you can find the donations link on the github page: https://github.com/Nyre221/dolphin-quick-view

download: https://www.pling.com/p/2083711/
github: https://github.com/Nyre221/dolphin-quick-view

[–] Nies221@lemmy.world 1 points 1 year ago

instructions reference INSTALL.sh but that’s not in the source? Maybe only in the release tarball?

I added it to the repository: https://github.com/Nyre221/dolphin-quick-view/tree/main/package%20creation

does it clear the user’s entire clipboard history each time it’s run?

I made some changes and now it doesn't delete all the history, only the last thing copied (afterwards try to restore it but it doesn't work if you copied a folder or file): https://github.com/Nyre221/dolphin-quick-view/blob/main/package%20creation/quick_view_package/dolphin_quick_view_shortcut.sh

this is caused by dolphin's limitations and there's not much I can do about it.

would it make sense to package this up for PyPI, with system deps being checked for and reported from within python? If so, are you interested in pull requests?

I don't think it makes much sense for this application.
For now I'm trying to integrate the modules inside a .pyz and eliminate the use of pip: https://github.com/Nyre221/dolphin-quick-view/issues/10

 

It is a very simple program that allows you to have a quick overview of the contents of some files.

The program requires some python libraries and I have made a list of those needed for some distributions. they are generally always the same, just the names change a little.

Video: https://www.youtube.com/watch?v=AB1SRV1ldnw

Github: https://github.com/Nyre221/dolphin-quick-view

Download: https://www.pling.com/p/2083711/

[–] Nies221@lemmy.world 17 points 1 year ago (1 children)

Still better than the official reddit app.

 

I was wondering if anyone was present on this community.