commit f5422133fb8d9e6aa60a39d828a68b58644c2528
parent 6753f2286c66e5487abd878bd8249eab525b97a1
Author: Quentin Rameau <quinq@fifth.space>
Date: Tue, 10 Nov 2015 12:32:01 +0100
Explain the new input/output file behaviour in documentation
Diffstat:
2 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
@@ -4,9 +4,10 @@ addrom
Simple tool to add a rom entry to a PB3 list.dat.
addrom lets you add a rom entry into a Pandora's Box v3 list.dat rom file.
-It reads an input file, writes rom fields according the file format, calculates
-the total number of entries and modifies that reference in the file, and writes
-the new file to another output file.
+It reads an input file or starts from scratch, writes rom fields according the
+file format, calculates the total number of entries and modifies that reference
+in the file, and writes the resulting new file to the input file or another
+output file.
Installation
------------
diff --git a/addrom.1 b/addrom.1
@@ -10,40 +10,51 @@
.Op Fl e Ar English-name
.Fl i Ar input-list
.Op Fl n Ar position
+.Op Fl o Ar output-list
+.Fl r Ar rom-name
+.Nm
+.Op Fl c Ar Chinese-name
+.Op Fl e Ar English-name
+.Op Fl i Ar input-list
+.Op Fl n Ar position
.Fl o Ar output-list
.Fl r Ar rom-name
.Ek
.Sh DESCRIPTION
.Nm
-reads a PB3
+reads a PB3 game list from an
.Ar input-list
-file, adds an entry composed of a
-.Ar Chinese-name ,
+file or starts one from scratch, adds an entry composed of a
+.Ar Chinese-name
an
-.Ar English-name ,
+.Ar English-name
and a
.Ar rom-name
at the given
-.Ar position
-to a
+.Ar position ,
+and writes the resulting list to the
.Ar output-list
+file or the
+.Ar input-list
file. It automatically adapts the number of game entries in this file.
.Sh OPTIONS
.Bl -tag -width Ds
-.It Op Fl c Ar Chinese-name
+.Bk -words
+.It Fl c Ar Chinese-name
The Chinese name of the game displayed on the arcade.
-.It Op Fl e Ar English-name
+.It Fl e Ar English-name
The English name of the game displayed on the arcade.
.It Fl i Ar input-list
-Read-only input list.dat file.
-.It Op Fl n Ar position
+Read list from input list.dat file and optionally write to it.
+.It Fl n Ar position
Placement of the new entry starting from 1. If the
.Ar position
is not given or is larger than number of games in the list, the new entry will
be appended to the end of the list.
.It Fl o Ar output-list
-Newly created output list.dat file (it must not exist and will not be
+Write new list to output list.dat file (it must not exist and will not be
overwritten).
.It Fl r Ar rom-name
The name of the rom file, without file extention (ie. "wjammers").
+.Ek
.El