Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Commit

Permalink
Add --license and --copyright args.
Browse files Browse the repository at this point in the history
  • Loading branch information
PJB3005 committed Sep 18, 2018
1 parent 39e8ef4 commit 6eb09ce
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[*.py]
insert_final_newline = true
indent_size = 4
indent_style = 4
indent_style = space
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dist/
.mypy_cache
files.txt
.vscode
.idea
11 changes: 9 additions & 2 deletions scripts/RSI.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import argparse
from pathlib import Path
from rsi import Rsi
from typing import Optional


def main() -> None:
Expand All @@ -12,18 +13,24 @@ def main() -> None:
_from_dmi = subparser.add_parser("from_dmi", help="Will create an RSI from a BYOND DMI file.")
_from_dmi.add_argument("input", help="The DMI file to read from.", type=Path)
_from_dmi.add_argument("output", help="The RSI to output to.", type=Path)
_from_dmi.add_argument("--license", help="Specifies the license of the new RSI file.")
_from_dmi.add_argument("--copyright", help="Specifies the copyright of the new RSI file.")

args = parser.parse_args()

if args.command == "from_dmi":
from_dmi(args.input, args.output)
from_dmi(args.input, args.output, args.license, args.copyright)
return

print("No command specified!")


def from_dmi(inputf: Path, output: Path) -> None:
def from_dmi(inputf: Path, output: Path, new_license: Optional[str], new_copyright: Optional[str]) -> None:
rsi = Rsi.from_dmi(inputf)
if new_license:
rsi.license = new_license
if new_copyright:
rsi.copyright = new_copyright
rsi.write(output)


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name="RSI.py",
version="1.1.4",
version="1.1.5",
description="A library for manipulation of the RSI format used in Space Station 14.",
url="https://github.com/space-wizards/RSI.py",
author="Pieter-Jan Briers",
Expand Down

0 comments on commit 6eb09ce

Please sign in to comment.