4 Commits
Author SHA1 Message Date
bartal-lsn be0c761cb3 fix bugs 2026-08-28 00:06:14 +01:00
bartal-lsn 4ebf3bd60f delete redundant docs 2026-08-27 23:04:07 +01:00
bartal-lsn 63547e74c2 add how to install 2026-08-27 22:44:53 +01:00
bartal-lsn 79b630b622 add how to install 2026-08-27 22:43:22 +01:00
5 changed files with 10 additions and 37 deletions
+7
View File
@@ -17,6 +17,13 @@ Generate markdown documentation from directory structure. Optimized for LLM inge
- Frontend only mode (include only frontend files and `README.md`)
- Omit test files and inline test blocks (Go, Java, Rust)
## Installation
Only for linux.
Download binary from release page or install with go
```bash
go install git.flo.fo/FLO/dirmd@latest
```
## Use with Git Post Hook
combine with git post hook to sync with proton drive on each commit
-2
View File
@@ -173,8 +173,6 @@ func run(cmd *cobra.Command, args []string) error {
return fmt.Errorf("failed to resolve output path: %w", err)
}
absOutput = filepath.Join(filepath.Dir(absOutput), filepath.Base(absOutput)+"_dirmd")
if !appendMode {
if _, err := os.Stat(absOutput); err == nil && !force {
return fmt.Errorf("output directory %s already exists (use -f to overwrite)", absOutput)
@@ -1,24 +0,0 @@
# Automating sending files to proton drive on commits
If you add this to any repos, and have dirmd in path and logged in on proton drive cli, then after each commit the newest code is pushed to proton drive, as vertical slices. If you do not want vertical slices of the code omit --vertical-slices. Also check out the other flags of dirmd if required.
## repos-root/.git/hooks/post-commit
create this file
```sh
#!/bin/bash
set -euo pipefail
if ! command -v dirmd &>/dev/null; then
exit 0
fi
REPO_ROOT=$(git rev-parse --show-toplevel)
REPO_NAME=$(basename "$REPO_ROOT")
dirmd -o "/tmp/${REPO_NAME}_new" "$REPO_ROOT" -f --vertical-slices --proton-drive
```
and then make it executable with something like `chmod +x .git/hooks/post-commit`
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 KiB

+3 -11
View File
@@ -89,17 +89,9 @@ func Generate(cfg *config.Config) GenerateResult {
return result
}
if cfg.VerticalSlices {
if err := drive.UploadDir(cfg.OutputPath, remoteDir); err != nil {
result.Error = fmt.Errorf("drive upload: %w", err)
return result
}
} else {
indexPath := filepath.Join(cfg.OutputPath, "index_"+repoName+".md")
if err := drive.Upload(indexPath, remoteDir); err != nil {
result.Error = fmt.Errorf("drive upload: %w", err)
return result
}
if err := drive.UploadDir(cfg.OutputPath, remoteDir); err != nil {
result.Error = fmt.Errorf("drive upload: %w", err)
return result
}
result.Uploaded = true
}