Code Monkey home page Code Monkey logo

tools's People

Contributors

fbolton avatar jkonecny12 avatar jldohmann avatar msuchane avatar ncbaratta avatar pwright avatar rolfedh avatar vladimirslavik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tools's Issues

[RFE] [newdoc] Add a command line option to not have filename prefixes

Since redhat-documentation/modular-docs#61 was merged, the guideline is NOT to use proc, con, ref and assembly as part of the filenames. I understand some teams want to still use that, and that is perfectly ok. However, since most teams would be following the official guidelines, which do not recommend the use of these prefixes, it would be good if we can provide this as a command line option to include/exclude (whichever is easier).

[RFE] newdoc capability to create assemblies with include:: statements ready

It would be great if newdoc could generate assemblies populated with include:: statements based on either a series of command-line options (specifying the assembly and its modules), or an input file.

CLI options:

newdoc --populate -a assembly.adoc -c concept.adoc -p procedure.adoc -r reference.adoc

Or an input file:

$ cat input.txt
a assembly.adoc
c concept.adoc
p procedure.adoc
r reference.adoc

newdoc --populate --inputfile input.txt

Both of these examples would generate assembly.adoc with the following:

$ cat assembly.adoc
[...snip...]
include::concept.adoc[leveloffset=+1]
include::procedure.adoc[leveloffset=+1]
include::reference.adoc[leveloffset=+1]
[...snip...]

It should be possible to define multiple assemblies.

(I ended up scripting my own solution to this in Bash, so I could share if deemed useful.)

[Bug] [atree] Included file is showing errorneously up as nonexistent

Running atree on the RHEL8 docs repo, branch 8.0-GA, specifically on enterprise/titles/installing/performing-a-standard-rhel-installation/master.adoc, shows one of the included files as being nonexistent:

assemblies/assembly_installing-red-hat-enterprise-linux-on-ibm-power-system-l-server.adoc
     ...
     N! /modules/installer/con_powering-on-your-l-server-with-ipmi.adoc

The file exists, though:

$ file modules/installer/con_powering-on-your-l-server-with-ipmi.adoc
modules/installer/con_powering-on-your-l-server-with-ipmi.adoc: ASCII text

The problem is the include has a leading slash (include::/modules/installer/con_powering-on-your-l-server-with-ipmi.adoc[leveloffset=+1] in file enterprise/assemblies/assembly_installing-red-hat-enterprise-linux-on-ibm-power-system-l-server.adoc). None of the other includes in the title have a leading slash, this is likely to be the problem.

ASCIIDoctor/ccutil build the title fine.

[Bug] [newdoc] newdoc creates {context} after it has been used

On line https://github.com/redhat-documentation/tools/blame/master/newdoc/newdoc/templates/assembly_title.adoc#L34 of the template, the context variable is defined. However, it is already used before that on line 28: https://github.com/redhat-documentation/tools/blame/master/newdoc/newdoc/templates/assembly_title.adoc#L28.

This causes the build to fail as aura tries to decipher moduleid_{context} instead of the actual context value that should be substituted.

Solution would be to line 34 before line 28. That is, define the context value before using it.

The other larger issue, of course, is that the templates are out of sync with the actual templates defined in the mod docs repo. Is there a way to keep these in sync?

[Buig] [newdoc] crashes when file already exists

When running newdoc in a directory that contains a file with a name same as what newdoc is attempting to create, the script crashes. It would be nice if it instead offered to overwrite or keep the existing file. E.g.:

File called 'proc_module.adoc' already exists.
(o)verwrite, (k)eep, (O)verwrite all, (K)eep all

Or something similar.

But for starters, it could just fail gracefully, listing the offending file.

Add full path to response and in file

This is a request for an enhancement.

Please add the path of the directory to the file instead of include::<path>/assembly_test.adoc[leveloffset=+1]. Same regarding the script response in the terminal window.

I believe that most people run the script from the directory in which they want the file to be created. Therefore, the directory should be available to the script.

Add a general README

A README file needs to be added to describe the purpose and structure of the repo.

Optional step

suggested changes for the procedure template:
To align with IBM style guide, instead of (Optional) use Optional: 

Assembly include statement repeats at start and end of generated assembly file

The following block occurs twice in the assembly template file created when using this script. Is this necessary? There is one block near the start of the generated file and and another at the end of the generated file.

// The following line is necessary to allow assemblies be included in other
// assemblies. It restores the `context` variable to its previous state.
:parent-context-of-<my-assembly-name>: {context}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.