ldecode - retrieve the original content encoded with lencode(1) within a open-lmake job
ldecode [OPTION]... [FILE]...
ldecode may be used to ask for a value (typically rather large, up to a few kB) associated with a short code (a few characters, typically 3 to 5). This must have been generated using the command lencode(1) with the same table and context. The value corresponding to code is output on stdout.
Usage and use cases are more extensively documented in the full open-lmake documentation.
-t table, --table=table
table may be:
|
a key |
found in lmake.config.codecs in which case it is a local source file or an external dir. |
a local source file
(symbolic links are followed) recording the association table.
In the former
case, when an external dir, it must lie within a source dir
and must contain a file LMAKE/config.py containing
definitions for:
file_sync
one of none, dir (default) or sync for choosing the method to ensure proper consistent operations.
The dir must read/write/execute access to any user needing to use the codec service, and if such accsses are at group level (but not other), it must have its setgid bit set.
It is also an
error if code cannot be found with the accompanying
context.
-x context, --context=context
specifies the context in which to find the value associated with passed code
-c code, --code=code
specifies the code to search within passed context in the passed table
ldecode exits with a status of zero if the value could be encoded. Else it exits with a non-zero status:
|
2 |
internal error, should not occur | ||
|
11 |
bad usage : command line options and arguments coul not be parsed |
See lencode(1).
|
(1) |
The same functionality is provided with the lmake.decode python function. | ||
|
(2) |
lencode(1) and ldecode,1 are useful tools when the flow implies files whose names are impractical. This is a way to transform long filenames into much shorter ones by keeping an association table to retrieve long info from short codes. | ||
|
(3) |
Using this functionality may imply git(1) conflicts on the association table (when a local source file) file when several users independently create associations in their repos. This is fully dealt with and the only thing left to the user is to accept the resolution of the conflict without any action. |
lautodep(1), lcache_repair(1), lcache_server(1), lcheck_deps(1), lcodec_repair(1), lcollect(1), ldebug(1), ldepend(1), lencode(1), lforget(1), lmake(1), lmark(1), lmake_repair(1), lmake_server(1), lrun_cc(1), lshow(1), ltarget(1), xxhsum(1)
The python module lmake.
The full open-lmake documentation in <open-lmake-installation-dir>/docs/index.html.
Copyright © 2023-2025, Doliam. This file is part of open-lmake.
open-lmake is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
open-lmake is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.