[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[task #16365] Prefix for variables in configuration files
From: |
Mohammad Akhlaghi |
Subject: |
[task #16365] Prefix for variables in configuration files |
Date: |
Sun, 7 May 2023 08:40:24 -0400 (EDT) |
URL:
<https://savannah.gnu.org/task/?16365>
Summary: Prefix for variables in configuration files
Group: GNU Astronomy Utilities
Submitter: makhlaghi
Submitted: Sun 07 May 2023 01:40:21 PM BST
Should Start On: Sun 07 May 2023 12:00:00 AM BST
Should be Finished on: Sun 07 May 2023 12:00:00 AM BST
Category: All Gnuastro
Priority: 5 - Normal
Item Group: Configuration file
Status: None
Privacy: Public
Percent Complete: 0%
Assigned to: makhlaghi
Open/Closed: Open
Discussion Lock: Any
Effort: 0.00
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sun 07 May 2023 01:40:21 PM BST By: Mohammad Akhlaghi <makhlaghi>
With the recent
[https://git.savannah.gnu.org/cgit/gnuastro.git/commit/?id=dfa2583c6 Commit
dfa2583c6], it is now possible for users to load configuration files into
their shell or Makefiles.
However, in case they have multiple calls to a program, the names of the
options within the configuration files may conflict with each other!
We can fix this problem with a single common option to all Gnuastro programs:
'--config-prefix=STR'. When this option is given, the program will accept
option names with 'STR' as prefix, and remove 'STR' when the rest of the
option name is a standard name. For example:
$ cat nc-abc.conf
abc-tilesize=25,25
$ cat nc-def.conf
def-tilesize=25,25
$ astnoisechisel img1.fits --config=nc-abc.conf --config-prefix=abc-
$ astnoisechisel img2.fits --config=nc-def.conf --config-prefix=abc-
Later, the user can easily load both config files into their shell with
'source' and use them with the prefixed names within the shell or Makefile
:-).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/task/?16365>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [task #16365] Prefix for variables in configuration files,
Mohammad Akhlaghi <=