This repository was archived by the owner on Nov 28, 2025. It is now read-only.
added -d for directory to output it to some other place#4
Open
TomatoCream wants to merge 1 commit intogoweiwen:masterfrom
Open
added -d for directory to output it to some other place#4TomatoCream wants to merge 1 commit intogoweiwen:masterfrom
TomatoCream wants to merge 1 commit intogoweiwen:masterfrom
Conversation
goweiwen
suggested changes
Jan 16, 2018
Owner
goweiwen
left a comment
There was a problem hiding this comment.
Looks good, just some changes. If you like to, we should add a --directory flag as an alias to -d.
| "target": "workbin" | ||
| } | ||
|
|
||
| file.path = base_dir + file.path |
Owner
There was a problem hiding this comment.
Use join(base_dir, file.path) for platform agnostic path joinng.
| # session = IVLESession(userid, password) | ||
| # if session.token != '': | ||
| # sync_announcements(session) | ||
| # exit(1) |
| exit(-1) | ||
|
|
||
| print("Usage: " + argv[0] + " [files|announcements]") | ||
| # print("Usage: " + argv[0] + " [files|announcements]") |
| print("Usage: " + argv[0] ) | ||
| print(" -f for files. ") | ||
| print(" -a for announcements. ") | ||
| print(" -d <directory> to output files to a different directory. ") |
Owner
There was a problem hiding this comment.
Use square braces to denote optional fields:
print("Usage: ")
print(" " + argv[0] + " files [-d directory]")
print(" " + argv[0] + " announcements")| if '-d' in args: | ||
| base_dir = args['-d']; | ||
| if not base_dir.endswith('/'): | ||
| base_dir = base_dir + '/' |
Owner
There was a problem hiding this comment.
If using os.path.join, we don't need to add this.
| base_dir = args['-d']; | ||
| if not base_dir.endswith('/'): | ||
| base_dir = base_dir + '/' | ||
| print("-d found, placing file in: " + base_dir + "<course code>") |
Owner
There was a problem hiding this comment.
print("Placing files in: " + base_dir + "/<course code>")
Author
|
yes boss i'll cook it right up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
added -d for directory to output it to some other place