dtsrhan(user)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

🌸 NAME 🌸

okay bestie, meet dtsrhan β€” she creates a DtSearch fzk file, and she's lowkey iconic for it πŸ’…βœ¨ This is the dtsrhan(user) manual page, btw. (The raw page also has a random cmd" line hanging out near the top like a sticker nobody asked for 😭 β€” we're keeping the detail, but it's not part of the actual sections.)


✨ SYNOPSIS ✨

dtsrhan [-m]  [-oo]  [-oa]  [-wscreensz] hanfile textfile  [fzkfile]

πŸ¦‹ DESCRIPTION πŸ¦‹

dtsrhan is a filter utility πŸ”₯ She creates a correctly formatted fzk file from a file of unformatted input text documents using a user-written profile called a han file. The han file identifies specific data fields in the input text from which the fzk fields can be generated.

She makes a single forward pass through the text file. Her profiling ability is limited to line number, column number, and simple string pattern matching. She is usable only for ASCII text input files and ASCII fzk output files; nonASCII languages are not supported 😭

dtsrhan is a convenience utility only; its use is optional. Canonical fzk files for input to dtsrload and dtsrindex may be generated in any other desirable way. No gatekeeping, bestie 🫢


πŸ’… OPTIONS πŸ’…

The following options are available:

Note, bestie: if an option takes a value, the value must be directly appended to the option name without white space. No space, no gap, no vibes in between πŸ’…
  • -m β€” switches off all messages except error messages. Quiet queen behavior, but she'll still yell if something's wrong.
  • -oo β€” overwrite a preexisting fzk file. If -oo and -oa are both omitted and the output fzk file already exists, dtsrhan prompts you for which option to use.
  • -oa β€” append new output to a preexisting fzk file. If -oa and -oo are both omitted and the output fzk file already exists, dtsrhan prompts you for which option to use.
  • -wscreensz β€” sets the target screen width to screensz characters. dtsrhan wraps long text lines at the nearest whitespace to ensure that no text line in the fzk file is longer than screensz characters. This option is typically used to ensure that output lines are not wider than the anticipated end user screen width. The default value is 79.

πŸŽ€ OPERANDS πŸŽ€

dtsrhan takes the following operands:

  • hanfile β€” specifies the name of the profile han file. If the base file name does not include an extension, dtsrhan assumes an extension of .han. The argument may include a fully qualified path prefix or a prefix relative to the current working directory. See dtsrhanfile(4) for the format of a han file.
  • textfile β€” specifies the name of the input text file. dtsrhan does not assume any extension. The input file may contain text that will be mapped to a single database object or document, or it may contain multiple documents separated by the end-of-record markers specified in the han file. No assumptions are made concerning the format of the input file other than the fact that it consists of ASCII text with line feeds at reasonable lengths.
  • fzkfile β€” specifies the name of the output fzk file. If this option is omitted, dtsrhan constructs the fzk file name from the name of the input file, including the path prefix if any, with an .fzk suffix appended. See dtsrfzkfiles(4) for the format of a fzk file.

🌈 ENVIRONMENT VARIABLES 🌈

None. Zero. Nada. No env vars to memorize, bestie πŸ’–


πŸ“ RESOURCES πŸ“

None β€” no resources-section drama here πŸŽ€


🧚 ACTIONS/MESSAGES 🧚

None. No actions/messages tea today 🫢


πŸ‘‘ RETURN VALUES πŸ‘‘

The return values are as follows:

  • 0 β€” dtsrhan completed successfully.
  • non-zero β€” dtsrhan encountered an error.

πŸ’œ FILES πŸ’œ

dtsrhan reads the specified text file and the specified han file, and writes to the specified fzk file.


πŸ”₯ EXAMPLES πŸ”₯

Convert the documents in the ASCII text file docs.txt to an fzk file named docs.fzk using the profile myprofile.han, all in the current working directory.

dtsrhan myprofile docs.txt

Convert the documents in the ASCII text file myin in the current working directory, to an fzk file named myout.fzk in the fzkdir subdirectory of the current working directory, using the han file located at /u/dtsearch/mypro.han3. If myout.fzk already exists, the fzk records for the document(s) in myin will be appended to it. If any lines in myin have more than 132 characters, they will be wrapped at the nearest whitespace less than 132 characters.

dtsrhan -oa -w132 /u/dtsearch/mypro.han3 myin fzkdir/myout

⭐ SEE ALSO ⭐

okay byeee bestie β€” source/version label: dtsrhan(user); date: not listed on the page, so no date drama, just vibes πŸ’…βœ¨

πŸ“¦ where this page comes from