Project Description

Scope of this project is to implement a simple include feature (similar to #include <lib> of the C-precompiler or import <lib> of python), for generic text files. See below section Additional improvements too, on ifdef define .

A command based not on programming languages, but shell script, able to "insert" in specific lines of text files another needed text saved in external files, kept in separated files/folders, so improving critical values confidentiality or improving reusability of text, centralizing the changes in those separated files, that can be then reintegrated/expanded with the full text just before the use or at runtime.

As use case i.e., this could be used in pure yaml files (not accompanied by any standard include feature) to separate from a text body some secret values or some code lines equally repeated in many text-bodies.

Similarly for JSON or a Dockerfile or Markdown or any text or source code file.

Interest for this project is the need to improve text files management in Linux also with no language installed and when not allowed by the text-type standar syntax, making easier reusability of repeated groups of lines and/or reducing eventual exposure of specific values, centralizing the updates in separated files and folders.

Goal for this Hackweek

Main goal is to implement as Linux shell script a draft first verion of such feature and provide some examples.

Additional improvements while hacking

The full project has been renamed from "import in a text file..." to the current title, having been improved with DEFINE IFDEF ENDIF INCLUDE verbs preprocessing, in the cpp style, able to implement text changes based on expressions other than include external text files, now much more being a Generic Text Preprocessor.
INCLUDE works also with files from http urls.
Pls in Resources, see prepro folder and README documentation descriptions.

Resources

Code, documentation and tests, see in:

This project is part of:

Hack Week 23

Activity

  • 6 months ago: mdati added keyword "ifdef" to this project.
  • 6 months ago: mdati added keyword "preprocessor" to this project.
  • 6 months ago: AZhou liked this project.
  • 6 months ago: mdati liked this project.
  • 6 months ago: mdati started this project.
  • 6 months ago: mdati removed keyword #confidentiality from this project.
  • 6 months ago: mdati removed keyword #reusability from this project.
  • 6 months ago: mdati removed keyword #import from this project.
  • 6 months ago: mdati removed keyword #include from this project.
  • 6 months ago: mdati added keyword "include" to this project.
  • 6 months ago: mdati added keyword "import" to this project.
  • 6 months ago: mdati added keyword "reusability" to this project.
  • 6 months ago: mdati added keyword "confidentiality" to this project.
  • 6 months ago: mdati added keyword "textfile" to this project.
  • 6 months ago: mdati added keyword "asciidoc" to this project.
  • 6 months ago: mdati added keyword "linux" to this project.
  • 6 months ago: mdati added keyword "bash" to this project.
  • 6 months ago: mdati added keyword "#include" to this project.
  • 6 months ago: mdati added keyword "#import" to this project.
  • 6 months ago: mdati added keyword "#reusability" to this project.
  • 6 months ago: mdati added keyword "#confidentiality" to this project.
  • 6 months ago: mdati originated this project.

  • Comments

    • mdati
      5 months ago by mdati | Reply

      The version 1 of the preprocessor with documentation, validation and examples is ready available in the named gitlab repo. Consider that, on the contrary of cpp expecting C syntax, with warnings when used for non-C types, this tool is generic-text oriented, with other features and could still be customized/extended more (e.g. import from remote URL)

    Similar Projects

    Grab precise changes in log file/s between system events by smhalas

    [comment]: # (Please use the project descriptio...


    Deep clean-up of the Uyuni documentation files by omaric

    Project Description

    This project is plann...


    Authenticated hashes for BTRFS by dsterba

    Project Description

    Implement a checksum ...


    Extract generic testing framework from Linux Test Project code base by acervesato

    Project Description

    The Linux Test Projec...


    Avahi Integration and Network Connection by vojha

    Avahi Integration and Network Connection

    ...


    Linux incarnation of the Party Parrot by rsimai

    Project Description

    Lesser on the coding s...


    Testing and adding GNU/Linux distributions on Uyuni by juliogonzalezgil

    Join the Gitter channel! [https://gitter.im/uy...