Giter Club home page Giter Club logo

roamer's Introduction

roamer's People

Contributors

abaldwin88 avatar alex-bender avatar sujaymansingh avatar

Stargazers

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

Watchers

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

roamer's Issues

Confirmation

It would be great if there was some sort of confirmation flag, where it would output the commands it was going to run, but ask for a y/n before actually running anything.

Cannot swap two files

Bug Report Template

roamer --version:

0.2.1

OS:

mac os x 10.11.6

Python version:

2.7.10

Steps to reproduce (start with removing ~/.roamer-data):

$ mkdir test
$ cd test
$ echo "file1" > file1
$ echo "file2" > file2
$ roamer

I want to rename file1 -> file2 and file2 -> file1, so I swap the two hashes (or the two file names, the same happens)
before editing:

" pwd: /private/tmp/test
file2 | fb4274b4ca38
file1 | c5075497aa5f

after editing:

" pwd: /private/tmp/test
file2 | c5075497aa5f
file1 | fb4274b4ca38

save, quit and inspect the result

$ roamer
roamer-trash-copy /private/tmp/test/file2
roamer-trash-copy /private/tmp/test/file1
cp /private/tmp/test/file2 /private/tmp/test/file1
cp /private/tmp/test/file1 /private/tmp/test/file2
$ cat file1
file2
$ cat file2
file2

Both files now have "file2" as content.

Crash on symlink to deleted file.

roamer --version: 0.2.3 or current master (39d8b25)
OS: Linux
Python version: 3.6.2
Steps to reproduce:
Try using roamer on a directory that has a symlink to a file that no longer exists.

When I use roamer on a directory that has a symlink to file that has been deleted, it shows the directory list in my editor but instead of a digest it shows the string 'None', when I exit the editor it crashes.

I'm pretty sure that is comes down to the fact that os.path.exists returns False for broken symlinks. See here.

Traceback (most recent call last):
  File "/usr/bin/roamer", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/giodamelio/Projects/forks/roamer/bin/roamer", line 4, in <module>
    main.start(sys.argv)
  File "/home/giodamelio/Projects/forks/roamer/roamer/main.py", line 18, in start
    Session(skipapproval=skipapproval).run()
  File "/home/giodamelio/Projects/forks/roamer/roamer/session.py", line 35, in run
    self.process(output)
  File "/home/giodamelio/Projects/forks/roamer/roamer/session.py", line 40, in process
    engine.compile_commands()
  File "/home/giodamelio/Projects/forks/roamer/roamer/engine.py", line 19, in compile_commands
    self.handle_unknown_digests()
  File "/home/giodamelio/Projects/forks/roamer/roamer/engine.py", line 51, in handle_unknown_digests
    raise Exception('digest %s not found' % digest)
Exception: digest None not found

Move files to subfolders more easily?

(This is more of a question / enhancement request than a bug)

I love this tool for deleting and renaming files and had dreamed it up almost exactly as it is before finding this.

The one missing thing for me to use this religiously is to easily move files to subfolders. I know you can use multiple terminals, but what would be ideal is to be able to move dir1/file1.txt to dir1/dir2/file2.txt in a single terminal (maybe using whitespace indentation, or just renaming with a slash in the name).

Could you possibly:

  • consider adding this, or explain how difficult it would be to implement
  • suggest any other tool that does something like this

Actually I noticed rename works as long as the target subdir dir1/dir2 exists, which is great. It's still a bit much typing rather than just moving a line. Also, if the subdir dir1/dir2 doesn't exist, the file is lost. Ideally it should just reject the move.

Great work and thank you regardless.

Consider alternative hashing strategies

The current hashing strategy creates issues if a user copies a hash, edits the file and then tries to use the hash afterwards.

A potential solution to this is to keep versions for each file's usage in roamer.

Pipe commands to individual files (mv)

The tmux thing is okay, but it seems like a pain if I'm going to move a bunch of files out to different directories. Any chance of, say, writing a new path in front of the file or something?

Piping in a list of files

Would it be possible to accept a list of files to move, rather than listing the current directory?
Something like find -name '*.txt' | roamer, to list files that may be deeper than the current directory?

Would require quite a bit of code restructuring... but it sounds pretty useful.

Contributing

Hello, I'd like to contribute.
How can I help?

Cleaning up the code?

After making a quick glance at the code I think it can be improved by having it follow the PEP 8 guidelines, really simple things such as docstrings for every module/class/method/function, double blank lines before and after class/function and single blank line for methods,

roamer should never delete a file on rename error

If renaming one or more files fails, the original file should stay in the original folder; you should never have to go under .roamer-data/ to find it.

I was bitten by this issue accidentally when using a slash on a file's name (which you can't use for obvious reasons). I think it's easy to overlook an error when you are renaming multiple files, and you might not even notice, which was the case for me for quite some time until I was looking for the file and couldn't find it.

Does that sound reasonable?

not working with Pluma

Bug Report Template

roamer version: where can i find it?

OS: GNU/Linux 4.10.0-33 (distribution: Ubuntu 17.04)

Python version: 2.7.13

Steps to reproduce (start with removing ~/.roamer-data):

export ROAMER_EDITOR=pluma
run roamer on whatever directory
nothing happens

Use basename of editor path

It fails silently if your EDITOR is set to, for instance, /usr/local/bin/vim. (Setting ROAMER_EDITOR fixes it, but it took me a few minutes to debug.) You might want a warning, and/or use the basename of the path.

( This also needs to handle flags getting passed to an editor )

Individual roamer file in each directory

Option to create and load a .roamer file.

  1. Would this make interfacing with editor plugins easier?

  2. Desktop environments let you organize files using visual space. Seems like it might be a nice feature to let roamer users create white space / comments on a long standing roamer file.

.roamerrc

Hi Alex, what do you think about adding .roamerrc file to keep some options there?

No changes made to file system, no error message given

On macOS (Sierra), roamer installs successfully with sudo pip3 install roamer. Running roamer, $EDITOR properly opens with the list of files and hashes; after making any changes (renaming, copying, etc.) and saving/quitting, there is no error message given, but none of the edits has any effects, i.e., the file system is completely unchanged. Is there any way to debug this, e.g., by enabling a verbose output to see whether roamer detects the changes properly?

Bug Report Template

roamer version: 0.2.0

OS: Darwin Kernel Version 16.7.0 (macOS Sierra)

Python version: 3.6.2

Steps to reproduce (start with removing ~/.roamer-data): As described above, happens on first use after installation and afterwards.

Use mv when applicable

This...

roamer-trash-copy /Users/abaldwin/Desktop/bleh/meh.txt
cp /Users/abaldwin/Desktop/bleh/meh.txt /Users/abaldwin/Desktop/bleh/argh.txt
rm /Users/abaldwin/Desktop/bleh/meh.txt

Should instead be this...

roamer-trash-copy /Users/abaldwin/Desktop/bleh/meh.txt
mv /Users/abaldwin/Desktop/bleh/meh.txt /Users/abaldwin/Desktop/bleh/argh.txt

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.