LENCODE

NAME
SYNOPSYS
DESCRIPTION
NOTES
SEE ALSO
COPYRIGHT

NAME

lencode - encode a (long) value into a (short) code for retrieval with ldecode(1) within a open-lmake job

SYNOPSYS

lencode association_file context [min_length]

DESCRIPTION

lencode may be used to create (or retrieve if already present) an association between a value (typically rather large) and a short code. This association must be done before ldecode(1) is called with the code (with same assocation_file and context) to retrieve the corresponding value.

The value must be passed to stdin. The generated (or retrieved) code corresponding to the value is output on stdout.

If generated, the code is generated after a checksum computed on the passed value in hexadecimal, with a length at least min_length (default is 1), but may be longer in case of conflict.

It is an error if association_file is not a source (symbolic links are followed, though).

Usage and use cases are more extensively documented the full open-lmake documentation.

NOTES

(1)

The same functionality is provided with the lmake.encode python function.

(2)

lencode and ldecode(1) are useful tools when the flow implies file names whose names are impractical. This is a way to transform long file names into much shorter ones by keeping an association file to retrieve long info from short codes.

(3)

Using this functionality may imply git(1) conflicts on the association 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.

SEE ALSO

lautodep(1), lcheck_deps(1), ldebug(1), ldecode(1), ldepend(1), lforget(1), lmake(1), lmark(1), lrepair(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

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/.