URI: 
       stagit-gopher.1 - stagit-gopher - A git gopher frontend. (mirror)
  HTML git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR README
   DIR LICENSE
       ---
       stagit-gopher.1 (3493B)
       ---
            1 .Dd August 2, 2021
            2 .Dt STAGIT-GOPHER 1
            3 .Os
            4 .Sh NAME
            5 .Nm stagit-gopher
            6 .Nd static git Gopher index generator
            7 .Sh SYNOPSIS
            8 .Nm
            9 .Op Fl b Ar baseprefix
           10 .Op Fl c Ar cachefile
           11 .Op Fl l Ar commits
           12 .Op Fl u Ar baseurl
           13 .Ar repodir
           14 .Sh DESCRIPTION
           15 .Nm
           16 writes Gopher indexes for the repository
           17 .Ar repodir
           18 to the current directory.
           19 .Pp
           20 The options are as follows:
           21 .Bl -tag -width Ds
           22 .It Fl b Ar baseprefix
           23 Use base prefix as the root.
           24 By default this is "".
           25 .It Fl c Ar cachefile
           26 Cache the entries of the log index up to the point of
           27 the last commit.
           28 The
           29 .Ar cachefile
           30 will store the last commit id and the entries in the Gopher index.
           31 It is up to the user to make sure the state of the
           32 .Ar cachefile
           33 is in sync with the history of the repository.
           34 .It Fl l Ar commits
           35 Write a maximum number of
           36 .Ar commits
           37 to the log.gph file only.
           38 However the commit files are written as usual.
           39 .It Fl u Ar baseurl
           40 Base URL to make links in the Atom feeds absolute.
           41 Does not use the prefix from the -b option.
           42 It should include the gopher type.
           43 For example: "gopher://codemadness.org/1/git/stagit-gopher/".
           44 .El
           45 .Pp
           46 The options
           47 .Fl c
           48 and
           49 .Fl l
           50 cannot be used at the same time.
           51 .Pp
           52 The following files will be written:
           53 .Bl -tag -width Ds
           54 .It atom.xml
           55 Atom XML feed of the last 100 commits.
           56 .It tags.xml
           57 Atom XML feed of the tags.
           58 .It files.gph
           59 List of files in the latest tree, linking to the file.
           60 .It log.gph
           61 List of commits in reverse chronological applied commit order, each commit
           62 links to a page with a diffstat and diff of the commit.
           63 .It refs.gph
           64 Lists references of the repository such as branches and tags.
           65 .El
           66 .Pp
           67 For each entry in HEAD a file will be written in the format:
           68 file/filepath.gph.
           69 This file will contain the textual data of the file prefixed by line numbers.
           70 The file will have the string "Binary file" if the data is considered to be
           71 non-textual.
           72 .Pp
           73 For each commit a file will be written in the format:
           74 commit/commitid.gph.
           75 This file will contain the diffstat and diff of the commit.
           76 It will write the string "Binary files differ" if the data is considered to
           77 be non-textual.
           78 Too large diffs will be suppressed and a string
           79 "Diff is too large, output suppressed" will be written.
           80 .Pp
           81 When a Gopher commit file exists it won't be overwritten again, note that if
           82 you've changed
           83 .Nm
           84 or changed one of the metadata files of the repository it is recommended to
           85 recreate all the output files because it will contain old data.
           86 To do this remove the output directory and
           87 .Ar cachefile ,
           88 then recreate the files.
           89 .Pp
           90 The basename of the directory is used as the repository name.
           91 The suffix ".git" is removed from the basename, this suffix is commonly used
           92 for "bare" repos.
           93 .Pp
           94 The content of the follow files specifies the metadata for each repository:
           95 .Bl -tag -width Ds
           96 .It .git/description or description (bare repo).
           97 description
           98 .It .git/url or url (bare repo).
           99 primary clone URL of the repository, for example:
          100 git://git.codemadness.org/stagit
          101 .El
          102 .Pp
          103 When a README or LICENSE file exists in HEAD or a .gitmodules submodules file
          104 exists in HEAD a direct link in the index is made.
          105 .Sh EXIT STATUS
          106 .Ex -std
          107 .Sh EXAMPLES
          108 .Bd -literal
          109 mkdir -p gphroot/gphrepo1 && cd gphroot/gphrepo1
          110 stagit-gopher path/to/gitrepo1
          111 # repeat for other repositories.
          112 .Ed
          113 .Pp
          114 To update the gph files when the repository is changed a git post-receive hook
          115 can be used, see the file example_post-receive.sh for an example.
          116 .Sh SEE ALSO
          117 .Xr stagit-gopher-index 1
          118 .Sh AUTHORS
          119 .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org