scottchiefbaker / dool

Python3 compatible fork of dstat
GNU General Public License v3.0
332 stars 64 forks source link

Fix rename in docs #30

Closed tq-steina closed 1 year ago

tq-steina commented 1 year ago

The content of dool.1.adoc is completly unchanged from dstat.1.adoc. Unfortunately the 'NAME' specifies the created file name. So building/cleaning docs is currently broken

ISSUE TYPE
DSTAT VERSION
Dool 1.1.0
Written by Scott Baker <scott@perturb.org>
Forked from Dstat written by Dag Wieers <dag@wieers.com>
Homepage at https://github.com/scottchiefbaker/dool/

Platform posix/linux
Kernel 5.15.0-56-generic
Python 3.10.6 (main, Nov  2 2022, 18:53:38) [GCC 11.3.0]

Terminal type: xterm-256color (color support)
Terminal size: 30 lines, 211 columns

Processors: 12
Pagesize: 4096
Clock ticks per secs: 100

internal:
        aio,cpu,cpu-adv,cpu-use,cpu24,disk,disk24,disk24-old,epoch,fs,int,int24,io,ipc,load,lock,mem,mem-adv,net,page,page24,proc,raw,socket,swap,swap-old,sys,tcp,time,udp,unix,
        vm,vm-adv,zones
/home/steina/repo/dool/plugins:
        battery,battery-remain,condor-queue,cpufreq,dbus,disk-avgqu,disk-avgrq,disk-svctm,disk-tps,disk-util,disk-wait,dool,dool-cpu,dool-ctxt,dool-mem,fan,freespace,fuse,gpfs,gpfs-ops,
        helloworld,ib,innodb-buffer,innodb-io,innodb-ops,jvm-full,jvm-vm,lustre,md-status,memcache-hits,mongodb-conn,mongodb-mem,mongodb-opcount,mongodb-queue,mongodb-stats,mysql-io,mysql-keys,
        mysql5-cmds,mysql5-conn,mysql5-innodb,mysql5-innodb-basic,mysql5-innodb-extra,mysql5-io,mysql5-keys,net-packets,nfs3,nfs3-ops,nfsd3,nfsd3-ops,nfsd4-ops,nfsstat4,ntp,postfix,power,
        proc-count,qmail,redis,rpc,rpcd,sendmail,snmp-cpu,snmp-load,snmp-mem,snmp-net,snmp-net-err,snmp-sys,snooze,squid,test,thermal,top-bio,top-bio-adv,top-childwait,top-cpu,top-cpu-adv,
        top-cputime,top-cputime-avg,top-int,top-io,top-io-adv,top-latency,top-latency-avg,top-mem,top-oom,utmp,vm-cpu,vm-mem,vm-mem-adv,vmk-hba,vmk-int,vmk-nic,vz-cpu,vz-io,vz-ubc,wifi,
        zfs-arc,zfs-l2arc,zfs-zil
SUMMARY

The (generated) man page dool.1 has been modified manually, while ignoering the actual source file dool.1.adoc.

This PR renames remaining dstat names to dool, which fixes also the name of the generated man page file, which depends on the NAME tag.

This is essentially a follow-up to #28, allowing build systems do clean and generate docs at least

scottchiefbaker commented 1 year ago

Apologies... Github was not sending me alerts for issues and pull requests on this repo. I did not see this until just now.

Is this still relevant? I'm working through some backlog.

tq-steina commented 1 year ago

Yes, it is. Without this patch. Docs are creating dstat.1, but not dool.1. But make docs are only creating dstat.1. name is taken from dool.1.adoc headers, not file name!

See also https://github.com/openembedded/meta-openembedded/commit/a8055484f2829e8dfd03d5c8520b2c611aa7ebd2 which has this patch included to fix the build there.

scottchiefbaker commented 1 year ago

Interesting... I inherited this codebase, so I'm not even familiar with .adoc. I assume it's a markup language like markdown that used to generation documentation? make understands how to read .adoc files? It's not a separate tool I need to install?

tq-steina commented 1 year ago

Interesting... I inherited this codebase, so I'm not even familiar with .adoc. I assume it's a markup language like markdown that used to generation documentation? make understands how to read .adoc files? It's not a separate tool I need to install?

FTR: I'm by no means an expert to .adoc myself. I just noticed the clean/(re)build failure in yocto. make doesn't know anything about .adoc, that's asciidoc.

If running the commands insode doc/ manually, you'll get dool.1.xml, but dstat.1 later on:

xmlto man dool.1.xml
Warn: AUTHOR sect.: no personblurb|contrib for Dag Wieers          dstat
Note: AUTHOR sect.: see http://www.docbook.org/tdg5/en/html/contr  dstat
Note: AUTHOR sect.: see http://www.docbook.org/tdg5/en/html/perso  dstat
Note: Writing dstat.1

No wonder, as dool.1.xml contains the line <title>dstat(1)</title>, caused by the (wrong) document title set in .adoc