View Single Post
Old 10-29-2024, 09:03 AM   #10
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 207
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
I don't know how man manages documents.

Is there a list somewhere to know in which file a given man page is located?

Code:
:~# dpkg -L samba | grep man
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/log2pcap.1.gz
/usr/share/man/man1/mvxattr.1.gz
/usr/share/man/man1/oLschema2ldif.1.gz
/usr/share/man/man1/profiles.1.gz
/usr/share/man/man1/sharesec.1.gz
/usr/share/man/man1/smbcontrol.1.gz
/usr/share/man/man1/smbstatus.1.gz
/usr/share/man/man8
/usr/share/man/man8/eventlogadm.8.gz
/usr/share/man/man8/nmbd.8.gz
/usr/share/man/man8/pdbedit.8.gz
/usr/share/man/man8/samba-bgqd.8.gz
/usr/share/man/man8/samba-gpupdate.8.gz
/usr/share/man/man8/samba.8.gz
/usr/share/man/man8/samba_downgrade_db.8.gz
/usr/share/man/man8/smbd.8.gz
--
Edit: Almost there

Code:
"man smb.conf" says "SMB.CONF(5)"
ll /usr/share/man/man5
→ smb.conf.5.gz
 
cd ~/man-to-md-master
cp /usr/share/man/man5/smb.conf.5.gz .
gunzip smb.conf.5.gz
./man-to-md.pl < smb.conf.5 > smb.conf.epub
first line does not contain '.TH' macro at ./man-to-md.pl line 660, <> line 1.
--
Edit:

Code:
:~# apt-get install groff
(120MB worth of it)

:~# zcat /usr/share/man/man5/smb.conf.5.gz | groff -mandoc -Thtml > smb.conf.html
troff: stdin:5521: warning [p 64, 1.7i]: can't break line
troff: stdin:5639: warning [p 65, 1.5i]: can't break line
troff: stdin:5521: warning [p 1, 739.2i]: can't break line
troff: stdin:5639: warning [p 1, 750.5i]: can't break line

"c:\Program Files\Calibre2\ebook-convert.exe" smb.conf.html smb.conf.epub --authors "Samba" --title "smb.conf"
For some reason, Calibre increase the font size halfway through and it only increases till the end (see attachment).

--
Edit:

Code:
pandoc.exe --metadata author="Samba" --metadata title="smb.conf" -f html -t epub -o "smb.conf.epub" "smb.conf.html"
Perfect! Thanks all.
Attached Thumbnails
Click image for larger version

Name:	153B42B6-338E-4785-8C25-CFB31AB19522.png
Views:	289
Size:	75.6 KB
ID:	211732  

Last edited by Shohreh; 10-29-2024 at 09:30 AM.
Shohreh is offline   Reply With Quote