papis / papis

Powerful and highly extensible command-line based document and bibliography manager.

Home Page:http://papis.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

init: initialize git and library directories?

kiike opened this issue · comments

During writing of the quickstart, I was trying to document how to initialize a Papis setup. So papis init creates the config, and that is super helpful. But I noticed that the library directory is not automatically created, and neither is git initialized. And then if you want to add or list the library, you'll get an error that the library dir doesn't exist.

I think that during init, Papis could check if the library dir doesn't exist, then it can be created (after prompting?). If succeeded, then initialize git. If the default library directory already exists, then warn the user.

Would this be any better than creating the library folders manually?

Yeah, that sounds like a good idea! It already asks whether to turn on use-git, so we can look at that flag and actually initialize git.

I think automatically creating the folder (and initialising git if the option is set) would be nice. I think there needn't even be a prompt for this (I don't see any reason why one wouldn't want there to be a folder if one sets the folder as the library). Maybe there could be a message (not even a warning) informing the user that the directory has been created (or not created because it already exists).

EDIT: somehow today is the day of me being sniped when commenting 😆.

Exactly. Do you have time to work on it at all? I can do it too. Right now my priority would be: this, then docs (quickstart+workflow), lastly mv.

I think automatically creating the folder (and initialising git if the option is set) would be nice. I think there needn't even be a prompt for this (I don't see any reason why one wouldn't want there to be a folder if one sets the folder as the library). Maybe there could be a message (not even a warning) informing the user that the directory has been created (or not created because it already exists).

I absolutely agree. No prompt would be even better.

Exactly. Do you have time to work on it at all? I can do it too. Right now my priority would be: this, then docs (quickstart+workflow), lastly mv.

Sure, I can work on that, but probably in the next 1-2 days.

I think 1-2 days is very reasonable. And maybe that can go to the paths module you created!

Thank you for working on this @alexfikl!