Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass import --clean is missleading #56

Closed
christian-weiss opened this issue Nov 21, 2018 · 3 comments · Fixed by #53
Closed

pass import --clean is missleading #56

christian-weiss opened this issue Nov 21, 2018 · 3 comments · Fixed by #53

Comments

@christian-weiss
Copy link

christian-weiss commented Nov 21, 2018

Description of "-c" and " --clean" command line option is "Clean data before import.".

I thought this will clean-up my password store (~/.password-store/) and removes everything except:
~/.password-store/.git
~/.password-store/.gpg-id

I learned by issue #55 that this is not the meaning for that option.

I recommend to (long-term) remove "-c" and "--clean" (depricated it in next release) and to add new option:

--replace-path-separators 
# (default "/"-->"-" and "\"-->"-")
--replace-path-separators="_" 
# ( "_" or any other allowed character)
--replace-path-separators="" 
# (to delete it; replace it with nothing)

As i am working in teams and git repo is team-shared (using .gpg-id for access management), i recommend to add a .pass-import file to the root to share pass-import config settings with the team. Pass-import should pick it from .pass-import first and should allow overriding via command line options.
Config file should contain a setting if this option should be active and with charater so use.

@roddhjav
Copy link
Owner

It's an interesting proposal, I am going to implement it

@roddhjav roddhjav mentioned this issue Nov 25, 2018
roddhjav added a commit that referenced this issue Nov 26, 2018
List of notable changes
- Move lib/import.py to pass_import.py
- Add setup.py and install pass_import with it.
- Add Gitlab CI
- Use prospector to lint the python code
- Simplify the bash tests
- Multiple fixes linked to the structure changes
- Add .import config file. Fix #56
- Add convert and separator options. Fix #55
- Improve the duplicate system:
- Create sub-folder if title identical. Fix #41 and #49
- Use the separator to duplicate paths. Fix #43
@roddhjav
Copy link
Owner

I added a config file its a ini file that works as follow:

$ cat ./password-store/<root>/.import
[convert]
separator = -

If you have better ideas regarding this file (including its format) you are welcome to propose.

The separator can also be set by the --separator option.

@christian-weiss
Copy link
Author

good.

Would be cool if you can add invalids and cleans, too:

$ cat ./password-store/<root>/.import
[convert]
separator = -
cleans = " ": "_", "&": "and", "@": "At", "'": "", "[": "", "]": ""
invalids = '<', '>', ':', '"', '/', '\\', '|', '?', '*', '\0'

or similar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants