abaldwin88 / roamer Goto Github PK
View Code? Open in Web Editor NEWThe Plain Text File Manager
License: MIT License
The Plain Text File Manager
License: MIT License
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.
Bug Report Template
0.2.1
mac os x 10.11.6
2.7.10
$ 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.
Argument --skip-approval could be used to run roamer in a noninteractive mode.
Please indicate approval: [y/N] y^M^M^M^M^M^M
Not sure how to replicate yet.
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
(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:
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.
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.
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?
All entries inside the roamer data directory should be moved into subfolder ROAMER_DATA/archive/date
Also should be available via --archive
flag
Would it be possible to accept a list of files to move, rather than listing the current directory?
Something likefind -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.
Hello, I'd like to contribute.
How can I help?
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,
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?
Bug Report Template
Bug Report Template
export ROAMER_EDITOR=pluma
run roamer on whatever directory
nothing happens
roamer --not-a-valid-flag
currently opens a roamer session. It should instead tell the user the option is unknown and stop.
Even if changes have been made to roamer's temp file a non zero exit code should prevent roamer from making any changes. e.g. vim's :cq
command
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 )
Option to create and load a .roamer
file.
Would this make interfacing with editor plugins easier?
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.
Hi Alex, what do you think about adding .roamerrc
file to keep some options there?
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
Fix is easy... just need a chance to get it in
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
It would be nice if the video was visible in mobile screens. Recording a smaller terminal would suffice.
roamer/tests/test_integration.py
Line 114 in 40084e4
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.