giorgosxou / tuifimanager Goto Github PK
View Code? Open in Web Editor NEWA cross-platform terminal-based termux-oriented file manager (and component), meant to be used with a Uni-Curses project or as is.
License: GNU General Public License v3.0
A cross-platform terminal-based termux-oriented file manager (and component), meant to be used with a Uni-Curses project or as is.
License: GNU General Public License v3.0
Potential issue when opening files without extension and without DEFAULT_EDITOR
https://github.com/GiorgosXou/TUIFIManager/blob/master/TUIFIManager/__init__.py#L253
You said:
A bit complicated to explain here just make an issue and I will explain it there
So I did.
just a reminder to return when event
is null
0, because i forgot about it and i was wondering why i had this issue lol
just add this line, under the handle_events
function
if event == 0: return
xdg-open (or termux-open) would be a good fall back for mp3, mp4 etc.
Also the OGG profile has a typo (.ogv)
We need a Scroll sensitivity variable, maybe "smoth scrolling" with an offset too?
Hello,
I see no reason why TUIFIManager should not start in the current working directory $PWD
(os.path.curdir
in Python).
Instead, it appears the default is to always start in the user's home directory ($HOME
).
Please consider changing the behavior.
Seems to have issues with ".tar.gz" and so on extensions?
TUIFIManager/TUIFIManager/TUIFIProfile.py
Line 51 in 22be2bf
I open this issue as I would present a few design a file type i made and may post more of them in the future.
This issue is meant to collect every proposition instead of opening an issue for each
.docx
.csv
.pptx
.ppt
.odp
DUE to CRLF replacement in the, git keeps corrupting the Peek.gif
file.
From git logs:
warning: in the working copy of 'Peek.gif', CRLF will be replaced by LF the next time Git touches it
TUIFIManager/TUIFIManager/__init__.py
Line 285 in 32b59ba
Can't figure out why paths with spaces, don't start
properly even when set in double quotation marks
somewhere i did something a bit wrong and ctrl + down dows work always,i ll check it out tomorrow
Running both:
sudo pip3 install tuifimanager --upgrade
pip3 install TUIFIManager --upgrade
outputs the same error.
Defaulting to user installation because normal site-packages is not writeable
Collecting TUIFIManager
Using cached TUIFIManager-2.3.2.tar.gz (41 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
running dist_info
creating /tmp/pip-modern-metadata-ti7k196i/TUIFIManager.egg-info
writing manifest file '/tmp/pip-modern-metadata-ti7k196i/TUIFIManager.egg-info/SOURCES.txt'
listing git files failed - pretending there aren't any
writing manifest file '/tmp/pip-modern-metadata-ti7k196i/TUIFIManager.egg-info/SOURCES.txt'
error: [Errno 2] No such file or directory: 'LICENSE'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
Not sure if its a problem on my end or permission errors because sudo didn't work either. I tried updating my packages, ran pip again and got the same errors.
Platform: Pop!OS 22.04 LTS
TUIFIManager/TUIFIManager/__init__.py
Line 668 in a4fffb8
elif self.__clicked_file:
Installed via:
% pip3 install TUIFIManager --upgrade
Run as:
% tuifi
Got:
goetz@host ~ % tuifi
Traceback (most recent call last):
File "/opt/homebrew/bin/tuifi", line 5, in <module>
from TUIFIManager.__main__ import main
File "/opt/homebrew/lib/python3.10/site-packages/TUIFIManager/__init__.py", line 9, in <module>
from .TUIMenu import *
File "/opt/homebrew/lib/python3.10/site-packages/TUIFIManager/TUIMenu.py", line 2, in <module>
import unicurses
File "/opt/homebrew/lib/python3.10/site-packages/unicurses/__init__.py", line 119, in <module>
ncurses,panel = get_libncursesw_paths()
File "/opt/homebrew/lib/python3.10/site-packages/unicurses/__init__.py", line 79, in get_libncursesw_paths
raise Exception('NCursesNotFound: ' + msg)
Exception: NCursesNotFound: No version of shared-libraries of ncurses found on this system, please try `brew install ncurses` if this won't work please create an issue
goetz@host ~ % brew install ncurses
==> Auto-updated Homebrew!
[…]
Running `brew update --auto-update`...
[…]
Warning: ncurses 6.3 is already installed and up-to-date.
To reinstall 6.3, run:
brew reinstall ncurses
goetz@host ~ % sw_vers
ProductName: macOS
ProductVersion: 13.1
BuildVersion: 22C65
… on ARM64.
just realised how wrong my implementation of search + suffixes was, especially for the component side of the project.
shell=True
, make it a string and maybe remove os.system('clear')
TUIFIManager/TUIFIManager/__init__.py
Line 270 in c526026
DEFAULT_OPENER
at least on windowssubj
It would be really nice to have a separation for the ASCII files icons into their own files outside the codebase.
This would make organization easier, adding new files type an easy manner and improve the possibility for customization.
I would think of having metadata along the ascii art, such a the file extensions.
For later on it could be a way to add better / small icons too while keeping the code clean with a simple loader helper
TUIFIManager/TUIFIManager/__init__.py
Line 751 in 6efabe6
TUIFIManager/TUIFIManager/TUItilities.py
Line 115 in 6efabe6
So it seems like pdcurses having issues with returning the position when (and only when) scrolling is performed
I noticed that the setup process is pretty simple, and thus setting up a static configuration could be a nice to have.
I'm thinking of using setup.cfg as it is natively supported by setup-tools, but poetry can be a nice alternative too.
Using a dynamic approach is a bit criticized by some as it may lead to ACE at installation. Anyway, it always better to have a clean easy and standard way for the setup.
Not sure this is an issue
but displaying both hidden and non-hidden files/folders together makes it kinda messy for the user to distinguish.
Normally, non-hidden
files are displayed first and then the hidden files at last.
Also, a shortcut
can be created to unhide
hidden files and to hide
again.
symlinks
Just wanted to point out that for a terminal based utility, the default keybinding CTRL +S
is highly problematic,
as for most environments it means freeze / don't update / stop scrolling the terminal.
(with CTRL + Q
meaning continue / unfreeze / resume scrolling).
Please consider to replace this default binding with something less irritating to most users.
Thanks.
The package fail to initialize on Nix OS. As no configuration is provided, is make it hard to install properly.
Traceback (most recent call last):
File "/data/dev/GiorgosXou/TUIFIManager/venv/bin/tuifi", line 5, in <module>
from TUIFIManager.__main__ import main
File "/data/dev/GiorgosXou/TUIFIManager/TUIFIManager/__init__.py", line 12, in <module>
from .TUIMenu import TUIMenu
File "/data/dev/GiorgosXou/TUIFIManager/TUIFIManager/TUIMenu.py", line 2, in <module>
import unicurses
File "/data/dev/GiorgosXou/TUIFIManager/venv/lib/python3.10/site-packages/unicurses/__init__.py", line 124, in <module>
lib1 = ctypes.CDLL(ncurses,mode=ctypes.RTLD_GLOBAL)
File "/nix/store/hhk4wr7hwry854sq69chmrjqyi964p7y-python3-3.10.9/lib/python3.10/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libncursesw.so.6: cannot open shared object file: No such file or directory
Randomly freezes when using
python 3.9
tuifi from pipy 1.3.3
unicurses from pipy 2.1.0
ncurses6 6.3-p20220507
alacritty 0.11.0
libwhatever.so.1
.so.
+ version, not showing any profile\icon
I'll just use pathlib's glob to fix it asap, my fault
TUIFIManager/TUIFIManager/__init__.py
Line 137 in c526026
TUIFIManager/TUIFIManager/__init__.py
Line 158 in c526026
[what-ever]
I'd like to see (maybe add by myself) typing support as it is a good practice and would help to understand a bit more of what is going on, often allowing to spot more complex issues and code simplifying.
What are your thoughts about it?
Is there any benefit to using a custom variable for the editor? Using EDITOR
will use the correct editor out of the box for most users, since most people heavily using the terminal will have it set. If you want to offer the ability to use an editor other than what EDITOR is set to, perhaps you could check if tuifi_default_editor
is set, and otherwise fallback to EDITOR
?
os: Arch GNU/Linux
version: Latest commit from git
When starting TUIFIManager using the command provided from setup.py in a local installation, it crashes with the following error:
(venv) [sigmanificient@Sigmachine TUIFIManager]$ tuifi
Traceback (most recent call last):
File "/home/sigmanificient/TUIFIManager/venv/bin/tuifi", line 33, in <module>
sys.exit(load_entry_point('TUIFIManager', 'console_scripts', 'tuifi')())
File "/home/sigmanificient/TUIFIManager/venv/bin/tuifi", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/sigmanificient/TUIFIManager/TUIFIManager/__init__.py", line 11, in <module>
from .TUIMenu import *
File "/home/sigmanificient/TUIFIManager/TUIFIManager/TUIMenu.py", line 3, in <module>
from TUItilities import BEGIN_MOUSE,END_MOUSE
ModuleNotFoundError: No module named 'TUItilities'
This is caused by the line 3 from TUIFile.py
:
from TUItilities import BEGIN_MOUSE,END_MOUSE
I'm really buffled by the mouse support of PDcurses, wierd stuff happening, where if the bstate is 0 (or even quit the app with bstate 0), then real-time mouse coordinates work fine unitl I click or scroll and the bstate change then I get nothing
If you ctrl+c
and random characters appear on the side of the selected fille, it is because I forgot this line .
I'll remove it tommorow, now I'm going to sleep.
My time is so limited
As Brodie Robertson mentioned in his video, I think completely deleting files is not intuitive and makes deleting files unnecessarily stressful. I think a good solution for this would be to instead move the files to ~/.local/share/Trash/ (and the equivalent on other platforms). This way the files would be automatically removed after a certain amount of time on Windows and Mac, (and on linux if the user or another trash program configured it to do so) but if the user accidentally deleted the file they could easily recover it. This would also help when undoing is added.
TUIFIManager/TUIFIManager/TUItilities.py
Line 66 in 6efabe6
AFAICT, both are "correct" -- trying to use a color pair you haven't set up is undefined behavior.
Which means that we have to replace = (0,0)
with in ((0,0),(7,0))
( [usingin
] just in case that they change it in the future to (0,0)
and we don't relise it)
The project needs a nox CI to ensure installation is going as planned.
A GitHub action with various configuration (python version and os) would make it easy to sport potential issues.
Thinking of adding some basic motions, although this is not the priority right now.
We need to figure out, how to drop a file from terminal into GUIs (especially browsers) [...]
I noticed during my small dig into the source that the formatting is pretty unusual, making it hard to understand a lot of what is happening and how to structure the code i want to add. Moreover, my code editor is going absolutely crazy, with pretty much every line being underlined.
It would be nice to provide a configuration for your code styling via pylint to a similar tooling, or maybe use a more broad formatting like black (mostly based on python pep8) or flake. The second option would allow to use contigeous integration to insure future code to be well formatted and would keep it under close standard to python developers.
What are your thoughts about it?
Permisions are limmited in TERMUX when it comes to the access of storage, and send2trash fails to create a trash-folder in the root directory of the emulated or SD storage
I forgot to auto-disable select mode when navigating to ".." but nvm, tommorow I'll do it
TUIFIManager/TUIFIManager/__main__.py
Line 48 in 5b45e00
tuifi
calls main()
not the file __main_.py
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.