1
0

fmt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. .TH FMT 1
  2. .SH NAME
  3. fmt, htmlfmt \- simple text formatters
  4. .SH SYNOPSIS
  5. .B fmt
  6. [
  7. .I option ...
  8. ]
  9. [
  10. .I file ...
  11. ]
  12. .PP
  13. .B htmlfmt
  14. [
  15. .B -a
  16. ] [
  17. .B -c
  18. .I charset
  19. ] [
  20. .B -u
  21. .I url
  22. ] [
  23. .I file ...
  24. ]
  25. .SH DESCRIPTION
  26. .I Fmt
  27. copies the given
  28. .I files
  29. (standard input by default)
  30. to its standard output, filling and indenting lines.
  31. The options are
  32. .TP
  33. .BI -l " n
  34. Output line length is
  35. .IR n ,
  36. including indent (default 70).
  37. .TP
  38. .BI -w " n
  39. A synonym for
  40. .BR -l .
  41. .TP
  42. .BI -i " n
  43. Indent
  44. .I n
  45. spaces (default 0).
  46. .PP
  47. Empty lines and initial white space in input lines are preserved.
  48. Empty lines are inserted between input files.
  49. .PP
  50. .I Fmt
  51. is idempotent: it leaves already formatted text unchanged.
  52. .PP
  53. .I Htmlfmt
  54. performs a similar service, but accepts as input text formatted with
  55. HTML tags.
  56. It accepts
  57. .IR fmt 's
  58. .B -l
  59. and
  60. .B -w
  61. flags and also:
  62. .TP
  63. .BI -a
  64. Normally
  65. .I htmlfmt
  66. suppresses the contents of form fields and anchors (URLs and image files); this flag
  67. causes it to print them, in square brackets.
  68. .TP
  69. .BI -c " charset
  70. change the default character set from iso-8859-1 to
  71. .IR charset .
  72. This is the character set assumed if there isn't one
  73. specified by the html itself in a <meta> directive.
  74. .TP
  75. .BI -u " url
  76. Use
  77. .I url
  78. as the base URL for the document when displaying anchors; sets
  79. .BI -a .
  80. .SH SOURCE
  81. .B /sys/src/cmd/fmt.c
  82. .SH BUGS
  83. .I Htmlfmt
  84. makes no attempt to render the two-dimensional geometry of tables;
  85. it just treats the table entries as plain, to-be-formatted text.