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

Add config for easier command line usage #2

Merged
merged 3 commits into from
Apr 19, 2021
Merged

Add config for easier command line usage #2

merged 3 commits into from
Apr 19, 2021

Conversation

lokijuhy
Copy link
Owner

@lokijuhy lokijuhy commented Apr 7, 2021

You can now run:
code_sync --register <project> # prompts for configuration and saves to config file
code_sync <project>

code_sync --list # lists registered projects

You can also still run code_sync the old way, specifying the local_dir, remote_dir, etc manually.

@lokijuhy lokijuhy requested review from togop and matteobe April 7, 2021 20:12
togop
togop previously approved these changes Apr 8, 2021
parser.add_argument('--remote_dir', help='the remote directory you want to sync', required=True)
parser.add_argument('--target', help='specify which remote machine to connect to', required=True)
parser.add_argument('project', nargs='?', default=None)
parser.add_argument('--register', help='Register a new project to code_sync', required=False)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could add at parser.add_argument('--register': , action='store_true' and in this way, the check could be just if args.register

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I did it the way I have it is so that you call code_sync -- register <project name> and that starts registering the <project name> project. Do you think it is a better interface to instead to code_sync --register and then code_sync asks for the name of the project?

code_sync/code_sync.py Show resolved Hide resolved
setup.py Show resolved Hide resolved
code_sync/code_sync.py Outdated Show resolved Hide resolved
code_sync/code_sync.py Show resolved Hide resolved
code_sync/code_sync.py Show resolved Hide resolved
code_sync/code_sync.py Outdated Show resolved Hide resolved
code_sync/code_sync.py Outdated Show resolved Hide resolved
@lokijuhy
Copy link
Owner Author

Hi @togop- Would you like to respond to my replies to your comments, or should I go ahead and merge this as is?

@lokijuhy lokijuhy merged commit b095e78 into master Apr 19, 2021
@lokijuhy lokijuhy deleted the config branch April 19, 2021 16:21
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 this pull request may close these issues.

3 participants