[SOLVED] Packaging Raw info Files
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,973

    Packaging Raw info Files

    The info files that are provided for coreutils (for example) are files that have been processed from a coreutils.texi file.

    I would like to be able to provide the users of my program with HTML versions of those files. These may be preprocessed, but more likely generated on demand from the coreutils.texi file.

    As far as I can tell there isn't a package containing coreutils.texi. If I include it with my program, then it won't be automatically updated.

    Any one have any suggestions on the proper way to handle this ?

    User error. Please replace user and try again

  2. #2
    Join Date
    Nov 2006
    Location
    Detroit
    Posts
    6,730

    Re: Packaging Raw info Files

    You could try info2html.

    Another possibility: your program downloads the source coreutils package, extracts the various texi files, then runs texi2any --html on the coreutils.texi file. The texinfo package in Fedora contains texi2any.

    I tried that on my F27 system, with a script that looks like this, and it worked:
    Code:
    mkdir /tmp/coreutils
    cd /tmp/coreutils
    dnf download --source coreutils --downloaddir .
    rpm2cpio coreutils-8.27-20.fc27.src.rpm | cpio -ivd
    tar xJvf coreutils-8.27.tar.xz coreutils-8.27/doc/*.texi
    texi2any --html coreutils-8.27/doc/coreutils.texi
    cp coreutils/*html <wherever_you_want>
    Obviously you could tweak the script to get the current coreutils version and use that to get the correct source package name, remove the temporary directory, etc.
    OS: Fedora 28 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 7GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N

  3. #3
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,973

    Re: Packaging Raw info Files

    Thanks. I should have realised that there would be a copy in the source repositories.

    Of course this brings its own problems as I would like the program to be as independent as possible of the distributions. But that is something for another thread, another day.

    Sadly, I am not sure about the HTML that is produced by texi2any from the texi files. Unlike the HTML version of man pages (which are a single file) texi2any creates an entire nest of HTML files. Hence they need to be viewed through a full browser, whereas the HTML version of a man page can be displayed in a simple QTextBrowser widget.

    I might do some experiments with post processing the text output from info:
    info --subnodes -o out.txt cat

    User error. Please replace user and try again

  4. #4
    Join Date
    Nov 2006
    Location
    Detroit
    Posts
    6,730

    Re: Packaging Raw info Files

    Quote Originally Posted by ocratato
    Sadly, I am not sure about the HTML that is produced by texi2any from the texi files. Unlike the HTML version of man pages (which are a single file) texi2any creates an entire nest of HTML files.
    You can add the --no-split option in the texi2any command to produce a single giant HTML file.
    OS: Fedora 28 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 7GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N

  5. #5
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,973

    Re: Packaging Raw info Files

    I was aware that I could create one large file, but I was worried about how to then navigate to the entry for a particular command.
    However it turns out that by adding "-invocation" to the command name and using QTextEdit::scrollToAnchor() it all works as I want.

    It looks like VICI might have some reasonable on-line help - well as good as I can get without rewriting it all.

    I think this one is now solved - much thanks.

    User error. Please replace user and try again

Similar Threads

  1. RPM packaging a directory of files
    By hcclnoodles in forum Programming & Packaging
    Replies: 1
    Last Post: 6th February 2014, 08:51 PM
  2. packaging multilib and lang files
    By FunkyRes in forum Programming & Packaging
    Replies: 3
    Last Post: 25th April 2013, 01:18 PM
  3. KDE meta info for audio & video files
    By cazo in forum Using Fedora
    Replies: 0
    Last Post: 3rd December 2005, 07:05 AM
  4. Get info from mp3 files
    By fred_m in forum Using Fedora
    Replies: 4
    Last Post: 27th August 2005, 09:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •