Giter Site home page Giter Site logo

haikuarchives / filer Goto Github PK

View Code? Open in Web Editor NEW
12.0 8.0 11.0 853 KB

The Filer is a powerful, flexible automatic file organizer. It is an implementation of the Sorting Chute idea conceived on the Glass Elevator mailing list for Haiku.

C++ 76.48% C 21.71% Makefile 1.81%
haiku hacktoberfest

filer's Introduction

Filer

Filer Screenshot

Filer is an automatic file organizer. It takes the files it's opened with or that are dropped on it and moves, renames, copies or does all sorts of other things with them according to rules created by the user.

Filer is accompanied by AutoFiler. Instead of working on a set of files provided by the user, it can be started (automatically with Haiku) to monitor certain folders and deal with new files appearing there according to the user-defined rules.

For more information, see the accompanying documentation and rule making reference in the documentation folder.

filer's People

Contributors

bradle-coding avatar jadedctrl avatar janus2 avatar owenca avatar puckipedia avatar scottmc avatar waddlesplash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filer's Issues

Make conditions/actions' text control drag&drop aware

Conditions and actions could be aware of dropped files onto their path/file text control.
E.g., a folder/file dropped on the text control of

  • When|Type inserts its MIME type
  • When|Name inserts its name
  • When|Location inserts its path
  • Do|Move to folder... inserts its path
  • Do|Rename to... inserts its name
    etc.

The checkbox in the "Filer: Conflict" window does not always work.

With the checkbox selected, the window will occasionally pop up again for the next conflict.

The cause: sometimes AutoFiler gets a B_BAD_PORT_ID error after Filer has successfully sent AutoFiler a reply.

The explanation in BeBook for B_BAD_PORT_ID: "the reply port was deleted while waiting for a reply"

"Filer" silently overwrite/replace existing files.

I have a rule called "Store pictures in my Pictures folder"; so eg, when I take a screenshot named "Screenshot1.png" which is saved on the Desktop, this file will be automatically moved in my pics folder by Autofiler.
Then, If i take another different file called "Screenshot1.png" and I place it on my Desktop, AutoFiler will move this file inside the pics folder, overwriting the "Screenshot1.png" which was previously present inside the pics folder.

Enhancement: add the ability to export/import rules

I had this idea since I have a lot of rules (some of them are also complex), and I'd like to import them in another Haiku's installation where Filer is present. Ok, I can made them again, but the ability to save/import a rule (some of them or all) would be definitely useful also because can save time; I also imagine the ability to share Filer's rules between users.

RuleEditWindow: re-arrange tests/actions

It'd be nice to be able to re-arrange test views and action views via drag&drop. Currently you'll have to remove all the tests/actions one by one from the bottom up, and recreate them in the new order...

Add support for archiving a single file with its own archive file.

From humdingerb:

I see a valid use case for providing a folder where archives are stored: Say you wait for a log file to grow to 5 MiB, then zip it up and put it in a folder. The user generally might want to just have single files archived as single-file-name.zip.

Here is a proposed specification:

  • If the user enters (manually or using drag&drop) the path name of an existing folder, the path name of the archive file passed to the zip command will be the path name of the folder + "/" + the name of the file processed by Filer.

  • Otherwise, the path name of the archive file passed to zip will be exactly as what the user enters.

Automatically convert pre-locale-aware rules for non-English Haiku.

The previous version of Filer doesn't support locale and saves rules that assume the English locale. It'd be handy to automatically convert them for non-English Haiku so that the user wouldn't have to recreate existing, locale-insensitive rules for a different language.

The "Filer" executable won't run

I'm building Filer time after time, to check the various improvements which are made.
Until last week everything worked fine. Now, since the commit 3e99669 when I attempt to launch the "Filer" executable, it doesn't start. If i launch it from a terminal window, all that i see is:

[baron@haikubox] # Filer
Abort
Abort
[baron@haikubox] #

Please notice that I'm running the executable which is builded with the debug flag (the one which is 6.02 MiB in size), but I don't see any debug message in the output.

I miss something?

Enhancement: add "also check subfolders" checkbox to the folder list of Autofiler

I have added a folder to monitor, under the option "automatically run autofiler on the contents of these folder", but AutoFiler will only monitor the root of these folders.

Eg: I added /boot/home/Downloads but would be nice have Autofiler also watch for subfolders of /boot/home/Downloads (eg /boot/home/Downloads/foo1, /boot/home/Downloads/foo2 and so on).

I was thinking to implement this feature by adding a checkbox called "also check subfolders" in the "AutoFiler" tab.

Crash in AutoTextControl

This is with the latest merged PR #46.
Open Filer, either add a new rule, or open an existing one. Press TAB twice to move the widget focus. And BANG!

Web+ won't let me attach the debug.report, therefore: http://sprunge.us/XMgS

Change file panel titles

The file panel titles of the rules edit window should be changed:

Test:
"Filer: Choose file with same: {test-pop-up-label}"

Action:
"Filer: {action-pop-up-label}

Lose the Edit button in the AutoFiler tab?

The Edit button in the AutoFiler tab is superfluous and problematic. It opens a file panel that asks me to "choose" a subfolder of the folder that is being "edited". If the folder has no subfolders, I am given an empty (sub)folder list with nothing to choose from.

"Edit" right now actually means "Choose" another folder instead. Why not just remove the folder and then add a new one (or ones)?

RulesTab: Use -/+ buttons

As there are + and - buttons in the "Edit rule" window, we could exchange the "Add..." and "Remove" buttons in the RuleTab for "-" and "+". That visually compacts the widgets as there's be only 3 rows of buttons beside the list.

Theoretically, it could even cut down the minimal window height, were it not for the problematic text view in the HelpTab...

"Size" test could be more sophisticated

Currently the user has to enter the file size in bytes. It'd be nice if the test could look for "k" or "K", "m" or "M" and "g" or "G" to use kilo, mega, giga bytes in its comparisson.

Until then, the "Size" test should be more specifically named "Size (in bytes)", I guess.

doesn't build on x86_64 (gcc5)

  1. AutoFilerTab.h: missing printf() and system() declarations

#include <stdio.h>
#include <stdlib.h>

are missing at top.

  1. RuleRunner.cpp, line 1105: litteral string must be split into chunk

command << tablename <<
"( .... "
" ....."
"....);" ;

  1. ObjectList.h: missing named argument item in BinaryInsertUnique() templates

  2. RuleEditWindow.cpp line 110 : BRect frame shadows the frame constructor argument.

Filer, randomly, lose the settings inside the list"Automatically run Filer on the contents of these folders:"

Is the second time that i notice this behaviour in few days:

Inside Filer, under the "Autofiler" TAB i added five folders to watch with Autofiler, then, suddenly and apparently randomly, I notice that Autofiler doesn't work anymore on certain folders: I noticed, in fact, that if I go in the Autofiler settings, some folder disappears from the list of folders to watch (I refer to the "Automatically run Filer on the contents of these folders:" list.) As I've said, sometime just one folder will disappear from the list and sometime two or more folders disappear.

Add icon-button to specific actions to open file dialogs

Certain actions could do with a file dialog to enter folder paths. It could be added in front of the text control that holds the path.

An 'Open' 'Directory' file dialog for:

  • Move to folder...
  • Copy to folder...

A 'Save' File dialog for:

  • Add to archive...

An 'Open' 'File' dialog for:

  • Shell command...

"Edit rule": some windows are narrow and cannot be horizontally resized

I built filer from the last commit (when the Layout management was introduced) and i discovered that some "edit rule" windows of some rules are narrow and cannot be horizontally resized. Eg this one, which I cannot resize horizontally:
Edit rule window narrow

I said "some rules" because not all suffer of the same issue: Seems that if in the "Do" section, the action name is shorter (like in the above case "Delete") than the "Remove" button I cannot resize the window.
Instead, ** seems** that if the action name is longer then "Remove" (eg "Move to folder") I am able to horizontally resize the edit rule window.
See:
Edit rule window OK

Enhancement: add the ability to just disable rules

Sometimes could be useful to disable some "rules", but actually is only possible by deleting them: in a case of a complex rule, we will have to reinsert again every part of a "formula" which composes the rule.
So would be nice to add a "enable/disable" option for every rule.

Localize GUI.

Localize GUI so that Filer can be used in non-English locales.

Backward compatibility of FilerRules file formats: remove SupportLocale flag?

We have the old format from v1.1.0, the newer format with the enabled/disabled flag for each rule, and the newest format that replaces string names for test (e.g., "Type"), mode (e.g., "is"), and action (e.g., "Move to folder...") with integer codes (TEST_TYPE, MODE_IS, and ACTION_MOVE, respectively). Because the newer formats are post-v1.1.0 and from unreleased versions of Filer, it's probably sufficient to make the newest format compatible with the v1.1.0 format and ignore all the other formats in between. (There were intermediate formats that only converted some of the test, mode, and action strings to integers.) If so, we need to remove the SupportLocale flag from Filer_settings file.

Use layout management for EditRuleWindow

The window to add/edit a rule is still doing manual layouting of its widgets. Since the views with buttons and textcontrols are added/removed dynamically, re-writing it isn't trivial (for me, that is...).
Layout managment is needed for font-sensitivity and localization.

File dialogs for folder-only selection should hide all files

File dialogs used to select folders-only, i.e. "move/copy to folder", should only show folders, not even the files with application/octet-stream. Those are only acceptable when allowing files and folders and filtering for specific MIME typed files, like when looking for text/plain scripts or zip-archives.

Allow factional numbers in the text control for size tests.

The decimal mark should be disallowed for the "bytes" unit and localized to either '.' or ',' depending on the current locale.

Also, dragging & dropping a file should set the text to a value and unit that makes the most sense, e.g., 1.23 MiB instead of 1259.52 KiB or even worse, 1289748 bytes.

Update and add more translations

If anyone wants to update translations with missing strings or add strings for more languages, please visit Polyglot. You can log in with your GitHub account.
Thanks!

Abstract test/action names from labels

The labels of tests/actions ("Move to..." etc.) use the strings saved into the rules.
Therefore, labels can't be renamed without the stored rules becoming outdated. This also prevents localizing Filer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.