slice2html(1)

πŸ“¦
version 3.7.10 Β· 2 versions
, in arch rolling, debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute

πŸ’– slice2html β€” the Slice to HTML documentation tool πŸ’–

okay bestie, listen. you know how slice2html(1) lives in the General Commands Manual section? yeah. that's the one. she's a compiler, she's a doc generator, she's that girl, and she's lowkey retired but we still stan. let's get into it 🫢


✨ NAME ✨

slice2html β€” the Slice to HTML documentation tool. that's it. that's the name. iconic.


πŸŽ€ SYNOPSIS πŸŽ€

slice2html [options] [files]

so you give her some options, you give her some files, she does her thing. simple as. πŸ’…


🌸 DESCRIPTION 🌸

okay so here's the tea: slice2html generates HTML documentation from Slice files. and get this β€” the macro __SLICE2HTML__ is defined during this compilation. not optional, not conditional, it's just there. periodt.

full documentation for slice2html is available online at:

https://doc.zeroc.com/ice/3.7/the-slice-language/generating-slice-
documentation
πŸ’€ real talk though, bestie: slice2html is deprecated. Doxygen is now the preferred way to generate Slice API reference. no cap. if you're starting something new, look here instead:
https://doc.zeroc.com/api/ice/3.7/slice/

like she still works, she's still serving, but she's giving legacy energy and we gotta be honest about it. πŸ™ˆ


πŸ’… OPTIONS πŸ’…

okay this is the part where we go through every single flag because we don't skip, we don't summarise, we are thorough in this house. let's go. πŸ”₯

  • -h, --help β€” displays the help message. when in doubt, ask for help. main character self-care.
  • -v, --version β€” displays the compiler version. so you know exactly which era of slice2html you're dealing with.
  • -DNAME β€” defines the preprocessor symbol NAME. boom, defined.
  • -DNAME=DEF β€” defines the preprocessor symbol NAME with the value DEF. now she has a value, look at her go ✨
  • -UNAME β€” undefines the preprocessor symbol NAME. it's giving "we don't know her". πŸ’€
  • -IDIR β€” add the directory DIR to the search path for #include directives. classic. you know this one, you've typed it a million times.
  • -E β€” print the preprocessor output on stdout. raw, unfiltered, preprocessed.
  • --output-dir DIR β€” place the generated files into directory DIR. where the magic lands, bestie.
  • -d, --debug β€” print debug information showing the operation of the Slice parser. she's telling you everything she's doing. oversharing? maybe. useful? yes.
  • --hdr FILE β€” prepend FILE to each generated HTML file (except for _sindex.html). this lets you replace the HTML header and other preamble information with a custom version, so you can connect style sheets to the generated pages. the specified file must include the <body> tag (but need not end with a <body> tag). FILE is expected to contain the string TITLE on a line by itself, starting in column one. slice2html replaces the TITLE string with the fully-scoped name of the Slice symbol that is documented on the corresponding page. okay so that's a whole thing but it's a good thing β€” custom headers, custom style, custom vibe. πŸŽ€
  • --ftr FILE β€” append FILE to each generated HTML file (except for _sindex.html). this allows you to add, for example, a custom footer to each generated page. FILE must end with a </body> tag. so you can sign your work, basically. cute.
  • --indexhdr FILE β€” slice2html generates a file _sindex.html that contains a table of contents of all Slice symbols that hyperlink to the corresponding page. this option allows you to replace the standard header with a custom header, for example, to attach a JavaScript. the specified file must include the <body> tag (but need not end with a <body> tag). the default value is the setting of --hdr (if any). so like, inherits from her sister option. we love a family dynamic. 🫢
  • --indexftr FILE β€” append FILE to the generated sindex.html page. this allows you to add, for example, a custom footer to the table of contents, or to invoke a JavaScript. FILE is must end with a </body> tag. (yes, that's exactly how the original says it, we're keeping it.) the default value is the setting of --ftr (if any). again β€” inheritance. slay. ✨
  • --image-dir DIR β€” with this option, slice2html looks in the specified directory for images to use for the generated navigation hyperlinks. (without this option, text links are used instead.) please see the generated HTML for the names of the various image files. (they can easily be found by looking for img elements.) iykyk πŸ”
  • --logo-url URL β€” use the specified URL as a hyperlink for the company logo that is added to each page (if --image-dir is specified). the company logo is expected to be in <image_dir>/logo.gif. so the logo has to live exactly there. no improvising. πŸ’…
  • --search ACTION β€” if this option is specified, the generated pages contain a search box that allows you to connect the generated pages to a search engine. on pressing the "Search" button, the specified ACTION is carried out. search bar era, we love to see it. πŸ”₯
  • --index NUM β€” slice2html generates sub-indexes for various Slice symbols. this option controls how many entries must be present before a sub-index is generated. for example, if NUM is set to 3, a sub-index will be generated only if there are three or more symbols that appear in that index. the default settings is 1, meaning that a sub-index is always generated. to disable sub-indexes entirely, set NUM to 0. so: 0 = never, 1 = always, bigger numbers = she gets pickier. 🌈
  • --summary NUM β€” if this option is set, summary sentences that exceed NUM characters generate a warning. keep it short or she will call you out. ⭐

πŸ‘‘ SEE ALSO πŸ‘‘

her whole friend group, honestly. go say hi:

slice2cpp(1), slice2cs(1), slice2java(1), slice2js(1), slice2matlab(1), slice2objc(1), slice2php(1), slice2py(1), slice2rb(1)


and that's the whole page, bestie πŸ’– one last thing β€” this was slice2html(1) from the General Commands Manual section, and yeah the footer is literally just her own name again because she contains multitudes. go forth, generate some docs, and remember: deprecated but never forgotten. πŸ¦‹πŸŒΈπŸ’œ