redhat-documentation / tools

Tools for making writers' lives easier.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add full path to response and in file

yzimmerm opened this issue · comments

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.

Which tool is this in reference to?

I guess that Yehuda filed an issue against newdoc.

Suppose I have these paths as example:

  • /home/vslavik/docs/rhel/rhel-8-docs/enterprise/titles/whatever/something/assemblies/
  • /home/vslavik/docs/rhel/rhel-8-docs/enterprise/assemblies
  • ~/my-best-guide/chapters

What algorithm should be used to determine the part of path to display? Personally I don't see one.

Or is the idea that the path will be shown there as-is, whole, and you'll just delete the parts you don't need?

Can we figure out the repos root directory and pick up the correct path from there? For assemblies they all seem to start **assemblies**. For modules: **modules/**<_sst_>.
If not, then put in the entire path. Easier to delete than insert.

That would work, though it wouldn't get the path always right. I'm not sure how many teams outside RHEL use newdoc, so how much "overshoot" they'd have to live with is an unknown...

Now all you need is to get @mrksu attention ;-)

Hi @yzimmerm, thanks for the feature suggestion. I don't like manually editing the placeholders either, and this is something that would make newdoc both easier to use and more reliable.

The question is, as @VladimirSlavik pointed out, how to decide the correct directory.

It's probably true that most people run newdoc in the directory where the module will be placed, so newdoc can use the current repository as a heuristic. But that doesn't have to be always the case. Also, I'm not too familiar with the layout of other repositories that teams outside of RHEL use, and i don't know what properties I can assume.

I'm consider adding a non-default command-line option that tries to determine the module path. I'll experiment with the approach and we'll see.

Also, newdoc now has its own repo, so I'll track this issue there: redhat-documentation/newdoc#16.