stagit-gopher.1 (2936B)
1 .Dd July 19, 2020 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 .Ar repodir 13 .Sh DESCRIPTION 14 .Nm 15 writes Gopher indexes for the repository 16 .Ar repodir 17 to the current directory. 18 .Pp 19 The options are as follows: 20 .Bl -tag -width Ds 21 .It Fl b Ar baseprefix 22 Use base prefix as the root. 23 By default this is "". 24 .It Fl c Ar cachefile 25 Cache the entries of the log index up to the point of 26 the last commit. 27 The 28 .Ar cachefile 29 will store the last commit id and the entries in the Gopher index. 30 It is up to the user to make sure the state of the 31 .Ar cachefile 32 is in sync with the history of the repository. 33 .It Fl l Ar commits 34 Write a maximum number of 35 .Ar commits 36 to the log.gph file only. 37 However the commit files are written as usual. 38 .El 39 .Pp 40 The options 41 .Fl c 42 and 43 .Fl l 44 cannot be used at the same time. 45 .Pp 46 The following files will be written: 47 .Bl -tag -width Ds 48 .It atom.xml 49 Atom XML feed of the last 100 commits. 50 .It tags.xml 51 Atom XML feed of the tags. 52 .It files.gph 53 List of files in the latest tree, linking to the file. 54 .It log.gph 55 List of commits in reverse chronological applied commit order, each commit 56 links to a page with a diffstat and diff of the commit. 57 .It refs.gph 58 Lists references of the repository such as branches and tags. 59 .El 60 .Pp 61 For each entry in HEAD a file will be written in the format: 62 file/filepath.gph. 63 This file will contain the textual data of the file prefixed by line numbers. 64 The file will have the string "Binary file" if the data is considered to be 65 non-textual. 66 .Pp 67 For each commit a file will be written in the format: 68 commit/commitid.gph. 69 This file will contain the diffstat and diff of the commit. 70 It will write the string "Binary files differ" if the data is considered to 71 be non-textual. 72 Too large diffs will be suppressed and a string 73 "Diff is too large, output suppressed" will be written. 74 .Pp 75 When a Gopher commit file exists it won't be overwritten again, note that if 76 you've changed 77 .Nm 78 or changed one of the metadata files of the repository it is recommended to 79 recreate all the output files because it will contain old data. 80 To do this remove the output directory and 81 .Ar cachefile , 82 then recreate the files. 83 .Pp 84 The basename of the directory is used as the repository name. 85 The suffix ".git" is removed from the basename, this suffix is commonly used 86 for "bare" repos. 87 .Pp 88 The content of the follow files specifies the metadata for each repository: 89 .Bl -tag -width Ds 90 .It .git/description or description (bare repo). 91 description 92 .It .git/url or url (bare repo). 93 primary clone url of the repository, for example: git://git.2f30.org/stagit 94 .El 95 .Pp 96 When a README or LICENSE file exists in HEAD or a .gitmodules submodules file 97 exists in HEAD a direct link in the index is made. 98 .Sh SEE ALSO 99 .Xr stagit-gopher-index 1 100 .Sh AUTHORS 101 .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org