Open zeerorg opened 8 years ago
This is a great idea. The .pysorter file would work well. I am not sure what the best format for it would be, maybe json is a good pick here. Please look at the comments in PR #20, which will be merged soon. Another related feature which is almost done is #14.
Thanks for your support!
I was thinking we could have json with something like
{
date:"current_date",
time:"current_time",
src:["path/to/file1", "path/to/dir"],
dest:["newpath/to/file1", "newpath/to/dir"]
}
That looks good for now.
sorry for a lame question but I wanted to ask how can I run pysorter after git cloning. I basically do
python __main__.py "path/to/directory"
and it gives me an error
File "__main__.py", line 3, in <module>
from .core import pysorter
SystemError: Parent module '' not loaded, cannot perform relative import
python -m pysorter should do the trick. Here we run the pysorter package as if it was a program.
I'd recommend creating a virtualenv
and installing all the requirements
in there.
Then you can install it in editable mode with pip install -e .
To quote the documentation:
-e, --editable <path/url> Install a project in editable mode (i.e.
setuptools "develop mode") from a local project path or a VCS url.
Can we create a '.pysorter' file in the directory so that we store changes done. and later on maybe revert back to the previous directory state using a '--revert' flag?
This can also be done while logging to standard output.