Skip to content

Commit 1425308

Browse files
committed
Updated readme and commands
1 parent 841e703 commit 1425308

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Use
22
The executable can either be called from the command line, have a file or directory dragged onto it, or run in a folder containing .bytes of .json files from Sunless Skies. Command line arguments are enumerated below.
33

4-
If dragging files onto the executable, either an individual file or a directory can be passed. When a single file is passed, the program will encrypt or decrypt it based on its file extension. Otherwise, it will encrypt or decrypt files in the passed directory according to the file extension of whichever file it sees first.
4+
If dragging files onto the executable, either an individual file or a directory can be passed. When a single file is passed, the program will serialize or deserialize it based on its file extension. Otherwise, it will serialize or deserialize files in the passed directory according to the file extension of whichever file it sees first.
55

6-
If run inside a directory containing .bytes or.json files, it will encrypt or decrypt files in the directory according to the file extension of whichever file it sees first. Resulting files will be created inside a new directory next to the executable.
6+
If run inside a directory containing .bytes or.json files, it will serialize or deserialize files in the directory according to the file extension of whichever file it sees first. Resulting files will be created inside a new directory next to the executable.
77

88
# Arguments
9-
`--decrypt=<path_to_file>` - Accepts as input either a single .bytes file or a directory containing .bytes files. If a single file is passed, converts it to the corresponding .json file and creates said file next to the executable. If a directory is passed, the resulting .json files will be created in a new directory next to the executable.
9+
`--deserialize=<path_to_file>` - Accepts as input either a single .bytes file or a directory containing .bytes files. If a single file is passed, deserializes it to the corresponding .json file and creates said file next to the executable. If a directory is passed, the resulting .json files will be created in a new directory next to the executable.
1010

11-
`--encrypt=<path_to_file>` - Accepts as input either a single .json file or a directory containing .json files. If a single file is passed, converts it to the corresponding .bytes file and creates said file next to the executable. If a directory is passed, the resulting .bytes files will be created in a new directory next to the executable.
11+
`--serialize=<path_to_file>` - Accepts as input either a single .json file or a directory containing .json files. If a single file is passed, serializes it to the corresponding .bytes file and creates said file next to the executable. If a directory is passed, the resulting .bytes files will be created in a new directory next to the executable.

SunlessByteDecoder/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ public static void Main(string[] args)
2323
{
2424
if (args.Length == 1)
2525
{
26-
if (args[0].StartsWith("--decrypt="))
26+
if (args[0].StartsWith("--deserialize="))
2727
{
28-
if (args[0].EndsWith(".bytes")) BytesToJsonFile(args[0][10..]);
28+
if (args[0].EndsWith(".bytes")) BytesToJsonFile(args[0][14..]);
2929
else if (args[0].EndsWith(".json"))
3030
{
3131
Console.WriteLine("Wrong file extension!");
3232
success = false;
3333
}
34-
else BytesToJsonDirectory(args[0][10..]);
34+
else BytesToJsonDirectory(args[0][14..]);
3535
}
36-
else if (args[0].StartsWith("--encrypt="))
36+
else if (args[0].StartsWith("--serialize="))
3737
{
3838
if (args[0].EndsWith(".json")) { }
3939
else if (args[0].EndsWith(".bytes"))

0 commit comments

Comments
 (0)