filenav - a simple file navigator
(no, I couldn't think of a more original name.)
What is there to say? It's a file navigator with UI and a few neat features:
- Quick access to a customizable list of favorite folders, including normally inaccessible ones
- Automatic file icons based on extension
- Thumbnails for most image files
- Display of basic file attributes, such as size, creation/open/modification dates, owner/group
- Analysis of file flags in a very derpy way
- Easy opening of any file in Quick Look, the Pythonista editor, or any compatible app
- Optional copying of files to a temporary folder before editing to avoid "accidents"
- Optional renaming of files after copying to allow editing of unknown text files
Contributions are, of course, always welcome.
This is quite impressive already!
Looks great. Thanks for sharing it.
But.... Is this script too powerful?
As a bonus it also seems to unlock pythonista's file browser. After running FileNav I can browse anywhere in pythonistas file viewer.
Wait, you can access other apps' data with it? Aren't they supposed to be sandboxed or something? I was aware of how to open the app bundle in Pythonista's file list (open a file outside the script library, quit the app and relaunch) but this is new to me.
@dgelessus Sorry to mislead you. It just unlocks browsing in pythonista's folders. I was unaware that was possible.
Ah okay, that makes sense.
- Added Quick Look and Open In to file actions menu
- Added option to open a folder in Shellista (most forks work)
- Added dynamic thumbnail icons for images (doesn't work with certain PNG files for unknown reasons)
- Finished flag analysis for files and folders
- Made external access easier and created a ShellistaExt plugin
- Started work on caching file properies to improve efficiency, not yet fully implemented
- Various minor additions, optimizations and fixes
As usual, the current version can be found here.
Also filenav seems to load large folders much faster than Pythonista's built-in browser. </brag>
@dgelessus you may want to hold off on the shellistaExt plugin, Transistor1 is in the process of pushing the dev branch in shellista. This has a similar plugin system that I've updated shellistaExt's plugins for.
BTW great job.
- Finished implementing file property caching system
- Large folders take noticeably longer to load the first time, but are much faster afterwards
- Fixed some PNG files not getting thumbnails
- Thumbnails are now also cached
- Added subtitles to file list entries, which contain file type and size
- Used appropriate cell styles for stat views
- Added formatting of file sizes and display of user names to stat views
- Various minor fixes and improvements
As usual, the current version can be found here.
Also filenav no longer loads large folder much faster than Pythonista's built-in browser.
By 'Preview' operation, the following error was given.
Would you confirm it?
object has no attribute 'type'.
And it is hope for 'filenav', sorry....
I want a function such as 'the open file recently'.
Thanks for telling me, will fix that now. Looks like I forgot to change a few small things.
A few commits later:
- A bunch of internal optimizations, thanks @ccc!
- Special support for opening HTML, audio and image files
- Conditional default actions depending on file type
- Activity indicator while loading folders
After five months of doing nothing with it I got around to rearranging filenav's internals into a separate module, hopefully this will make writing a full iPad version easier. Few visible changes have happened, though there are a few new things:
- The starting folder is a favorites list loaded from a JSON file, which has a few common locations in it by default.
- Favorites can be moved and deleted from the UI, new ones can currently only be added by editing the JSON directly.
- This once again makes it possible to access the Pythonista.app bundle, even in the 1.6 beta!
- Slightly better command line support.
- No more use of globals, instead a
FilenavAppobject is used to store data and is available under the
appattribute of all data sources.
FilenavAppalso serves as a common interface to the two versions of filenav (once both of them exist).
FileItemclass should be slightly cleaner, there were a few things I wrote strangely...
- And the usual uninteresting improvements and fixes here and there.
There's probably still the odd bug here and there, if you happen to find one, please report it here or on GitHub. Pull requests are also welcome, as usual.
Hi @dgelessus I put all the files in a folder called filename but when I hit play it say "ImportError: No module named filenav" when trying to import common
Hi @dgelessus forget it, I didn't import all the files
@dgelessus I don't know how the edit button works, I press it and then press a file or folder an nothing happens, i'm on an iphone 5
At the moment the edit button does nothing in folder view. In the favorites list you can use it to move and delete favorites.
Thanks @dgelessus, it would be great add the possibility of delete and move files and folders, zip and unzip files. Great software congrats
I love the full 'panel" view implementation. I would be cool if you could find a way to auto scroll to any newly opened views.
Bug: Quick Look Preview "Done" button does nothing and system is hung.
I tried switching slim over to 'panel' and it does not work the same. I got it to crash once.
Thanks also for providing litenav. This is a really great example app for the NavigationView.
I'm aware that Quick Look (or any other function that overlays a second UI) causes Pythonista to hang in panel view, but there's unfortunately nothing I can do about that. Views presented in panel mode do not respond to the close method as they should, so there is no way to hide filenav before opening the quick look sheet.
Automatic scrolling is a good idea and should be easy to add, thanks for the suggestion.