-
Notifications
You must be signed in to change notification settings - Fork 149
[issue-391] update readme to reflect the new usage after refactoring #495
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
Merged
armintaenzertng
merged 2 commits into
spdx:refactor-python-tools
from
armintaenzertng:updateRefactoredReadme
Feb 27, 2023
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,7 +10,7 @@ CI status (Linux, macOS and Windows): [![Install and Test][1]][2] | |||||
| # CURRENT STATE | ||||||
|
|
||||||
| A major refactoring of large parts of the codebase is currently in progress. It is expected that functionality on `main` | ||||||
| is severely limited during this process. Please check out | ||||||
| is limited during this process. Please check out | ||||||
| the [latest release](https://github.com/spdx/tools-python/releases/tag/v0.7.0) if you are looking for a working version. | ||||||
|
|
||||||
| # Information | ||||||
|
|
@@ -21,65 +21,116 @@ This library implements SPDX parsers, convertors, validators and handlers in Pyt | |||||
| - Issues: https://github.com/spdx/tools-python/issues | ||||||
| - PyPI: https://pypi.python.org/pypi/spdx-tools | ||||||
|
|
||||||
| # History | ||||||
|
|
||||||
| This is the result of an initial GSoC contribution by @[ah450](https://github.com/ah450) | ||||||
| (or https://github.com/a-h-i) and is maintained by a community of SPDX adopters and enthusiasts. | ||||||
|
|
||||||
| # License | ||||||
|
|
||||||
| [Apache-2.0](LICENSE) | ||||||
|
|
||||||
| # Features | ||||||
|
|
||||||
| * API to create and manipulate SPDX v2.3 documents. | ||||||
| * Parse, convert, create and validate Tag/Value, RDF, JSON, YAML, XML format SPDX files | ||||||
| * API to create and manipulate SPDX v2.2 and v2.3 documents. | ||||||
| * Parse, convert, create and validate SPDX files | ||||||
| * supported formats: Tag/Value, RDF, JSON, YAML, XML | ||||||
|
|
||||||
| ### Known Limitations | ||||||
| # Planned features | ||||||
|
|
||||||
| * No full 2.3 support for RDF format [#295](https://github.com/spdx/tools-python/issues/295) | ||||||
| * No full license expression support [#10](https://github.com/spdx/tools-python/issues/10) | ||||||
| * Output of the CLI parser is incomplete [#268](https://github.com/spdx/tools-python/issues/268) | ||||||
| * up-to-date support of SPDX v3.0 as soon as it releases | ||||||
meretp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| # TODOs | ||||||
| # Installation | ||||||
|
|
||||||
| * Include specialized validation for SPDX v2.2.1(ISO 5962:2021) | ||||||
| As always you should work in a virtualenv (venv). You can install a local clone | ||||||
| of this repo with `yourenv/bin/pip install .` or install it from PyPI with | ||||||
| `yourenv/bin/pip install spdx-tools`. Note that on Windows it would be `Scripts` | ||||||
| instead of `bin`. | ||||||
|
|
||||||
| # How to use | ||||||
|
|
||||||
| ## Command-line usage: | ||||||
meretp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| 1. **PARSING/VALIDATING** (for parsing any format): | ||||||
|
|
||||||
| * Use `pyspdxtools -i <filename>` where `<filename>` is the location of the file. | ||||||
| If you are using a source distribution, try running: `pyspdxtools -i tests/data/formats/SPDXJSONExample-v2.3.spdx.json`. | ||||||
| * Use `pyspdxtools -i <filename>` where `<filename>` is the location of the file. The input format is inferred automatically from the file ending. | ||||||
|
|
||||||
| * Or you can use `pyspdxtools` only, and it will automatically prompt/ask for the `input file path`. | ||||||
| * If you are using a source distribution, try running: | ||||||
| `pyspdxtools -i tests/data/formats/SPDXJSONExample-v2.3.spdx.json` | ||||||
|
|
||||||
| 2. **CONVERTING** (for converting one format to another): | ||||||
|
|
||||||
| * Use `pyspdxtools -i <input_file> -o <output_file>` where `<input_file>` is the location of the file to be converted | ||||||
| and `<output_file>` is the location of the output file. The output format is inferred automatically from the file ending. | ||||||
| If you are using a source distribution, try running : `pyspdxtools -i tests/data/formats/SPDXJSONExample-v2.3.spdx.json -o output.tag` | ||||||
| and `<output_file>` is the location of the output file. The input and output formats are inferred automatically from the file endings. | ||||||
|
|
||||||
| * If you are using a source distribution, try running: | ||||||
| `pyspdxtools -i tests/data/formats/SPDXJSONExample-v2.3.spdx.json -o output.tag` | ||||||
|
|
||||||
| * If you want to skip the validation process, provide the `--novalidation` flag, like so: | ||||||
| `pyspdxtools -i tests/data/formats/SPDXJSONExample-v2.3.spdx.json -o output.tag --novalidation` | ||||||
| `pyspdxtools -i tests/data/formats/SPDXJSONExample-v2.3.spdx.json -o output.tag --novalidation` | ||||||
| (use this with caution: note that undetected invalid documents may lead to unexpected behavior of the tool) | ||||||
|
|
||||||
| * For help use `pyspdxtools --help` | ||||||
|
|
||||||
| # Installation | ||||||
|
|
||||||
| As always you should work in a virtualenv (venv). You can install a local clone | ||||||
| of this repo with `yourenv/bin/pip install .` or install it from PyPI with | ||||||
| `yourenv/bin/pip install spdx-tools`. Note that on Windows it would be `Scripts` | ||||||
| instead of `bin`. | ||||||
| ## Library usage: | ||||||
|
||||||
| ## Library usage: | |
| ## Library usage |
Collaborator
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
meretp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
meretp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
meretp marked this conversation as resolved.
Show resolved
Hide resolved
meretp marked this conversation as resolved.
Show resolved
Hide resolved
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.
Uh oh!
There was an error while loading. Please reload this page.