-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple fixes, feature adds, cleanup. Also partially completes issue…
… 44… (#48) * Multiple fixes, feature adds, cleanup. Also partially completes issue #44 Fixes: Renamed upload function to do_upload as we use the option 'upload' as a boolean elsewhere. Confusing. Fixed a missing default for 'upload' in multiparser class that wasn't allowing 'upload' to be used as a config file option. Cleanup/Housekeeping: Changed some errors handling from 'raise error' to simple print error message and exit with a exit code of one (1). Some errors such as invalid extension or file not found don't need the traceback code, they just need to output notification to the user and set the shell exit code are user errors, not code errors. Moved a some variables to upload since they are only needed there. Moved the story builder inside a conditional to add ability to skip story generation via command line switch (--nostory), or individual story option. Will allow you to temporarily turn off a particulary story without removing it from your config. New features: * Added --nostory option. Allows you to skip all the story generation and process an upload only. In this case the 'output' file is used as the file to upload directly. * Added '--noreplace' and '--noupload' as command line only options to allow overriding config file settings (for testing (or other uses ?)) without having to constantly edit config files. * Added 'upload' specified in config or global * Added 'output' can be specified in config, global, or command line. * Added sanity checking if you provide more than one 'output'. * Created default config files * Added replace to default options as 'False' * Added cleanup option (delete target goosepaper after upload success) * Added formatter class to allow newlines used in help for command line options. Makes for cleaner reading on some help text (IMO). Mostly mine since my default setting is --verbose --verbose. :) * Added a per story 'skip' option (similar to nostory global option but per story source) which will allow you to skip processing a particular story provider without having to remove your entire config. Useful for if the source is having issues but you don't want to remove your entire entry from that Goosepaper. * Added an entry to examples to show use of 'skip' * Added checks to make sure that either default config files exist or you specified one on the command line. * Added global config preference files in order of precedence. Command line options superseded all config file settings. ~/.goosepaper.json (HOME environment from os) ./goosepaper.json (current working directory when goosepaper called) --config <configfile.json> (specified as argument) * Added '--showconfig' command line switch to allow both user and dev debugging of config file and command line options since there are four ways to pass settings and options. Shows each file in order parsed as well as the final config * Added default goosepaper.json containing all the (current) operational variables set to operate with the least impact to any existing workflow process (i.e. no change to current behavior as of 0.3.1). * Left in debug code that failed on 3.8 test. Removed * Removed nneeded module import left over from debugging * Code format cleanup * Remove two unimplemented options pending rethink Co-authored-by: Jordan Matelsky <j6k4m8@users.noreply.github.com>
- Loading branch information
Showing
10 changed files
with
304 additions
and
87 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
from rmapy.api import Client | ||
from rmapy.exceptions import AuthError | ||
|
||
|
||
def auth_client(): | ||
client = Client() | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"font-size": "14", | ||
"replace": false, | ||
"nocase": false, | ||
"strictlysane": false, | ||
"upload": false, | ||
"output": null, | ||
"folder": null, | ||
"nostory": false, | ||
"replace": false, | ||
"cleanup": false | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.