Skip to content

Commit

Permalink
chore: merge branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mhucka committed May 31, 2023
2 parents 96cc2ac + 53c6938 commit 1e1028f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ The `--mode` option can be used to change the run mode. Four run modes are avail
By default, informational output is sent to the standard output (normally the terminal console). The option `--log-dest` can be used to send the output to the given destination instead. The value can be `-` (i.e., a dash) to indicate console output, or it can be a file path to send the output to the file. A special exception is that even if a log destination is given, IGA will still print the final record URL to stdout. This makes it possible to invoke IGA from scripts that capture the record URL while still saving diagnostic output in case debugging is needed.
By default, IGA prints only the record URL when done. The option `--print-doi` will make it also print the DOI of the record. (Note that this only works when publishing records; if options `--draft` or `--community` are used, then there will be no DOI. In those case, only the URL will be printed.)
Reading and writing large files may take a long time; on the other hand, IGA should not wait forever on network operations before reporting an error if a server or network becomes unresponsive. To balance these conflicting needs, IGA automatically scales its network timeout based on file sizes. To override its adaptive algorithm and set an explicit timeout value, use the option `--timeout` with a value in seconds.
If given the `--version` option, this program will print its version and other information, and exit without doing anything else.
Expand All @@ -356,14 +358,14 @@ As explain above, IGA takes one required argument on the command line: either (1
| `--github-repo` _R_ | `-r` _R_ | Look in GitHub repository _R_ of account _A_ | Get repo name from release URL | ✯ |
| `--github-token` _T_ | `-t` _T_ | Use GitHub access token _T_| Use value in env. var. `GITHUB_TOKEN` | |
| `--help` | `-h` | Print help info and exit | | |
| `--print-doi` | `-i` | Print both the DOI & record URL when done | Print only the record URL | |
| `--invenio-server` _S_ | `-s` _S_ | Send record to InvenioRDM server at address _S_ | Use value in env. var. `INVENIO_SERVER` | |
| `--invenio-token` _K_ | `-k` _K_ | Use InvenioRDM access token _K_ | Use value in env. var. `INVENIO_TOKEN` | |
| `--list-communities` | `-L` | List communities available for use with `--community` | | |
| `--log-dest` _L_ | `-l` _L_ | Write log output to destination _L_ | Write to terminal | ⚐ |
| `--mode` _M_ | `-m` _M_ | Run in mode `quiet`, `normal`, `verbose`, or `debug` | `normal` | |
| `--open` | `-o` | Open record's web page in a browser when done | Do nothing when done | |
| `--parent-record` _N_ | `-p` _N_ | Make this a new version of existing record _N_ | New record is unrelated to other records | ❖ |
| `--print-doi` | `-i` | Print both the DOI & record URL when done | Print only the record URL | |
| `--read-metadata` _R_ | `-R` _R_ | Read metadata record from file _R_; don\'t build one | Build metadata record | |
| `--save-metadata` _D_ | `-S` _D_ | Save metadata record to file _D_; don\'t upload it | Upload to InvenioRDM server | |
| `--timeout` _X_ | `-T` _X_ | Wait on network operations a max of _X_ seconds | Auto-adjusted based on file size | |
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ runs:
- name: Install IGA.
shell: bash
run: |
python -m pip install https://github.com/caltechlibrary/iga/archive/develop.zip
python -m pip install iga
- name: Find out the latest release tag for this repo.
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion docs/cli-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ As explain above, IGA takes one required argument on the command line: either (1
| `--github-repo` _R_ | `-r` _R_ | Look in GitHub repository _R_ of account _A_ | Get repo name from release URL ||
| `--github-token` _T_ | `-t` _T_ | Use GitHub access token _T_| Use value in env. var. `GITHUB_TOKEN` | |
| `--help` | `-h` | Print help info and exit | | |
| `--print-doi` | `-i` | Print both the DOI & record URL when done | Print only the record URL | |
| `--invenio-server` _S_ | `-s` _S_ | Send record to InvenioRDM server at address _S_ | Use value in env. var. `INVENIO_SERVER` | |
| `--invenio-token` _K_ | `-k` _K_ | Use InvenioRDM access token _K_ | Use value in env. var. `INVENIO_TOKEN` | |
| `--list-communities` | `-L` | List communities available for use with `--community` | | |
| `--log-dest` _L_ | `-l` _L_ | Write log output to destination _L_ | Write to terminal ||
| `--mode` _M_ | `-m` _M_ | Run in mode `quiet`, `normal`, `verbose`, or `debug` | `normal` | |
| `--open` | `-o` | Open record's web page in a browser when done | Do nothing when done | |
| `--parent-record` _N_ | `-p` _N_ | Make this a new version of existing record _N_ | New record is unrelated to other records ||
| `--print-doi` | `-i` | Print both the DOI & record URL when done | Print only the record URL | |
| `--read-metadata` _R_ | `-R` _R_ | Read metadata record from file _R_; don\'t build one | Build metadata record | |
| `--save-metadata` _D_ | `-S` _D_ | Save metadata record to file _D_; don\'t upload it | Upload to InvenioRDM server | |
| `--timeout` _X_ | `-T` _X_ | Wait on network operations a max of _X_ seconds | Auto-adjusted based on file size | |
Expand Down
6 changes: 3 additions & 3 deletions iga/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,6 @@ def _list_communities(ctx, param, value):
#
@click.help_option('--help', '-h', help='Show this help message and exit')
#
@click.option('--print-doi', '-i', 'print_doi', is_flag=True,
help='Print the DOI in addition to the record URL')
#
@click.option('--invenio-server', '-s', 'server', metavar='STR', callback=_read_server,
help='InvenioRDM server address', is_eager=True)
#
Expand All @@ -403,6 +400,9 @@ def _list_communities(ctx, param, value):
@click.option('--parent-record', '-p', 'parent_id', metavar='STR',
help='Make this a new version of an existing record')
#
@click.option('--print-doi', '-i', 'print_doi', is_flag=True,
help='Print the DOI in addition to the record URL')
#
@click.option('--read-metadata', '-R', 'source', metavar='FILE', type=File('r'),
help='Read metadata record from _FILE_; don\'t build one')
#
Expand Down

0 comments on commit 1e1028f

Please sign in to comment.