Skip to content

Commit

Permalink
Added IVS (Adobe-Japan1) support.
Browse files Browse the repository at this point in the history
README.md still yet to be updated. -I or --ivs will do the job.
  • Loading branch information
haydenwong7bm committed Dec 27, 2022
1 parent aabbc7e commit bdb7008
Show file tree
Hide file tree
Showing 3 changed files with 1,251 additions and 2 deletions.
4 changes: 3 additions & 1 deletion __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
parser.add_argument('-t', action='store_true')
parser.add_argument('-s', '--supp', default=False)
parser.add_argument('-i', '--inherited', action='store_true')
parser.add_argument('-I', '--ivs', action='store_true')

args = parser.parse_args()

Expand All @@ -21,11 +22,12 @@
args.t = True
args.supp = 'c'
args.inherited = True
args.ivs = False

compatibility_args = 'j' * args.j + 'k' * args.k + 't' * args.t

filename, file_ext = path.splitext(path.basename(args.file))
with open(args.file, 'rt') as input_file, open(f'{filename}-converted{file_ext}', 'wt') as output_file:
contents = input_file.read()
converted = convert(contents, use_supp_planes=args.supp, use_compatibility=compatibility_args, convert_inherited=args.inherited)
converted = convert(contents, use_supp_planes=args.supp, use_compatibility=compatibility_args, convert_inherited=args.inherited, use_ivs=args.ivs)
output_file.write(converted)
Loading

0 comments on commit bdb7008

Please sign in to comment.