bbkane/fling

[feature request] implement '--no-folding' option

imkerberos opened this issue · 8 comments

Thank you for this awesome tool. Can implement the '--no-folding' feature just like stow?

@imkerberos , I only build features I'm personally interested in, but if you want to make a PR with this, I'll review it

I can't write golang codes. I think I should write it using python. :) Thank you.

darnit , replied with my work account. I'll respond with my personal account after work

Ok, happy to review your Python code if you decide to put it on GitHub :)

OK, I have put the python codes to my repository: https://github.com/imkerberos/dotlink

Nice work!!! Things I really like:

  • stdlib only! Makes it easy to install
  • clean symlinking functions. I like the action_func and run_func's being reused

Suggestions:

  • it looks like dotlink always creates parent directories instead of symlinking them? You should probably note that in --help, along with any other filesystem modifications you plan on doing.
  • targetname.replace('_', '.', 1) might mess with someone's _vimrc on Windows. IT looks like WIndows also checks for a .vimrc though so it might still work.
  • you might look into using pathlib from the stdlib.
  • Add more comments and/or type hints. For example, you might want to document (in --help or elsewhere) what the @<platform> suffix does - it skips non-platform-specific code, correct?
  • Consider using more specific exception types other than Exception. This is an app, not a library, so this probably isn't too important, but figured I'd mention it.
  • I feel like --unlink, --relink, and the default link action are more readable as commands, not flags, but GNU stow does it your way, so eh :)

Anyway, looks super good. Great job!!

Also tests would be nice. Fling really needs tests too....

Thank you for your suggestions. I made some mistakes and will correct it in the future. Now, it just works for my personal dotfiles. :)