The script hasn't been simple enough to make sense having nameless arguments that you need to look up documentation to understand.
That's fine for running epadmin on a repository by epadmin repository_name_goes_here but with changename requiring four arguments, it's dumb to have these required in a specific order, and for you to learn the order off by heart, etc.
Plus, generally, it's considered good practice to name all your arguments.
So let's remove support for arguments,
and convert the four arguments to named options.
Presently arguments are:
Repository/Archive ID,
Search term,
Replace term,
given or family name,
Very odd find is not an argument.
Should that be another issue?
So probably the named options should be:
--archive
--eprints_search
--find
--replace
--given_or_family
That last name seems clumsy.
Alternatives could be:
--name_part
--name_type
With names in place, commandline arguments are clearer and can be given in any order.
Of course, this is all b*ll*cks.
We're not living in MS DOS days.
The future is not the commandline,
and not even an OS GUI.
The future is the web browser, =).
So we'll move on from a script, to a Perl Module for EPrints that lets you change names from your web browser.
Like a mini Batch Edit ingredient.
That of course, may be another repository.
This one is just for a script.
And this issue suggests we need to move away from un-named arguments, and have all arguments as named options.
The script hasn't been simple enough to make sense having nameless arguments that you need to look up documentation to understand.
That's fine for running epadmin on a repository by
epadmin repository_name_goes_herebut with changename requiring four arguments, it's dumb to have these required in a specific order, and for you to learn the order off by heart, etc.Plus, generally, it's considered good practice to name all your arguments.
So let's remove support for arguments,
and convert the four arguments to named options.
Presently arguments are:
Repository/Archive ID,
Search term,
Replace term,
given or family name,
Very odd find is not an argument.
Should that be another issue?
So probably the named options should be:
--archive
--eprints_search
--find
--replace
--given_or_family
That last name seems clumsy.
Alternatives could be:
--name_part
--name_type
With names in place, commandline arguments are clearer and can be given in any order.
Of course, this is all
b*ll*cks.We're not living in MS DOS days.
The future is not the commandline,
and not even an OS GUI.
The future is the web browser, =).
So we'll move on from a script, to a Perl Module for EPrints that lets you change names from your web browser.
Like a mini Batch Edit ingredient.
That of course, may be another repository.
This one is just for a script.
And this issue suggests we need to move away from un-named arguments, and have all arguments as named options.