Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
Rename project to dave
Browse files Browse the repository at this point in the history
  • Loading branch information
chclaus committed May 12, 2018
1 parent 99360e8 commit a4cf71c
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 36 deletions.
29 changes: 16 additions & 13 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![Build Status](https://travis-ci.org/micromata/daffy.svg?branch=master)](https://travis-ci.org/micromata/daffy)
[![Go Report](https://goreportcard.com/badge/github.com/micromata/daffy)](https://goreportcard.com/report/github.com/micromata/daffy)
[![Build Status](https://travis-ci.org/micromata/dave.svg?branch=master)](https://travis-ci.org/micromata/dave)
[![Go Report](https://goreportcard.com/badge/github.com/micromata/dave)](https://goreportcard.com/report/github.com/micromata/dave)

# daffy - The simple webdav server
# dave - The simple webdav server

*daffy* is a simple webdav server that provides the following features:
_dave_ is a simple webdav server that provides the following features:

- Single binary that runs under Windows, Linux and OSX.
- Authentication via HTTP-Basic.
Expand All @@ -14,6 +14,8 @@

It perfectly fits if you would like to give some people the possibility to upload, download or share files with common tools like the OSX Finder, Windows Explorer or Nautilus under Linux ([or many other tools](https://en.wikipedia.org/wiki/Comparison_of_WebDAV_software#WebDAV_clients)).

The project name _dave_ is an abbreviation for: **D**istributed **A**uthoring and **V**ersioning made **e**asy.

## Table of Contents

- [Configuration](#configuration)
Expand All @@ -37,7 +39,8 @@ following locations for the presence of a `config.yaml` in the following
order:

- The directory `./config`
- The directory `$HOME/.daffy`
- The directory `$HOME/.swd` (swd was the initial project name of dave)
- The directory `$HOME/.dave`
- The current working directory `.`

### First steps
Expand Down Expand Up @@ -99,9 +102,9 @@ configuration with `apache2 httpd`'s `mod_proxy`:

### User management

User management in *daffy* is very simple. Each user in the `config.yaml` MUST have a password and CAN have a subdirectory.
User management in _dave_ is very simple. Each user in the `config.yaml` MUST have a password and CAN have a subdirectory.

The password must be in form of a BCrypt hash. You can generate one calling the shipped cli tool `daffycli pasdaffy`.
The password must be in form of a BCrypt hash. You can generate one calling the shipped cli tool `davecli pasdaffy`.

If a subdirectory is configured for a user, the user is jailed within it and can't see anything that exists outside of this directory. If no subdirectory is configured for an user, the user can see and modify all files within the base directory.

Expand Down Expand Up @@ -150,7 +153,7 @@ There is no need to restart the server itself, if you're editing the user or log

### Binary installation

You can check out the [releases page](https://github.com/micromata/daffy/releases) for the latest precompiled binaries.
You can check out the [releases page](https://github.com/micromata/dave/releases) for the latest precompiled binaries.

### Build from sources

Expand All @@ -166,7 +169,7 @@ mkdir -p $GOPATH/src/github.com/micromata/ && cd $GOPATH/src/github.com/micromat
3. Clone the repository (or your fork)

```
git clone [email protected]:micromata/daffy.git
git clone [email protected]:micromata/dave.git
```

To build and install from sources you have two major possibilites:
Expand All @@ -176,7 +179,7 @@ To build and install from sources you have two major possibilites:
You can use the plain go toolchain and install the project to your `$GOPATH` via:

```
cd $GOPATH/src/github.com/micromata/daffy && go install ./...
cd $GOPATH/src/github.com/micromata/dave && go install ./...
```

#### magefile
Expand All @@ -192,12 +195,12 @@ Please ensure you've got [mage](https://magefile.org) installed. This can be don
Now you can call `mage install` to build and install the binaries. If you just call `mage`, you'll get a list of possible targets:

Targets:
build Builds daffy and daffycli and moves it to the dist directory
buildReleases Builds daffy and daffycli for different OS and package them to a zip file for each os
build Builds dave and davecli and moves it to the dist directory
buildReleases Builds dave and davecli for different OS and package them to a zip file for each os
check Runs golint and go tool vet on each .go file.
clean Removes the dist directory
fmt Formats the code via gofmt
install Installs daffy and daffycli to your $GOPATH/bin folder
install Installs dave and davecli to your $GOPATH/bin folder
installDeps Runs dep ensure and installs additional dependencies.

## Connecting
Expand Down
2 changes: 1 addition & 1 deletion app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func ParseConfig() *Config {
viper.SetConfigName("config")
viper.AddConfigPath("./config")
viper.AddConfigPath("$HOME/.swd")
viper.AddConfigPath("$HOME/.daffy")
viper.AddConfigPath("$HOME/.dave")
viper.AddConfigPath(".")

err := viper.ReadInConfig()
Expand Down
7 changes: 0 additions & 7 deletions cmd/daffycli/main.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/daffy/main.go → cmd/dave/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"errors"
"fmt"
"github.com/micromata/daffy/app"
"github.com/micromata/dave/app"
log "github.com/sirupsen/logrus"
"golang.org/x/net/webdav"
syslog "log"
Expand Down
7 changes: 7 additions & 0 deletions cmd/davecli/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "github.com/micromata/dave/cmd/davecli/subcmd"

func main() {
subcmd.Execute()
}
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/daffycli/subcmd/root.go → cmd/davecli/subcmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

// RootCmd represents the base command when called without any subcommands
var RootCmd = &cobra.Command{
Use: "daffycli",
Use: "davecli",
Short: "A cli for the simple webdav server",
}

Expand Down
26 changes: 13 additions & 13 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type target struct {
goarch string
}

// Build Builds daffy and daffycli and moves it to the dist directory
// Build Builds dave and davecli and moves it to the dist directory
func Build() error {
mg.Deps(InstallDeps)
mg.Deps(Clean)
Expand All @@ -47,7 +47,7 @@ func Build() error {
return nil
}

// BuildReleases Builds daffy and daffycli for different OS and package them to a zip file for each os
// BuildReleases Builds dave and davecli for different OS and package them to a zip file for each os
func BuildReleases() error {
mg.Deps(Clean)

Expand All @@ -61,20 +61,20 @@ func BuildReleases() error {

for _, t := range targets {
fmt.Printf("Building for OS %s and architecture %s\n", t.goos, t.goarch)
daffy, daffyCli, _ := buildSpecific(t)
dave, daveCli, _ := buildSpecific(t)

files := []string{
daffy,
daffyCli,
dave,
daveCli,
"Readme.md",
filepath.Join("examples", "config-sample.yaml"),
}

archiveName := fmt.Sprintf("daffy-%s-%s.zip", t.goos, t.goarch)
archiveName := fmt.Sprintf("dave-%s-%s.zip", t.goos, t.goarch)
zipFiles(filepath.Join("dist", archiveName), files)

os.Remove(daffy)
os.Remove(daffyCli)
os.Remove(dave)
os.Remove(daveCli)
}

return nil
Expand Down Expand Up @@ -132,7 +132,7 @@ func Check() error {
return nil
}

// Install Installs daffy and daffycli to your $GOPATH/bin folder
// Install Installs dave and davecli to your $GOPATH/bin folder
func Install() error {
mg.Deps(InstallDeps)

Expand Down Expand Up @@ -179,8 +179,8 @@ func buildSpecific(t target) (string, string, error) {
env = append(env, fmt.Sprintf("GOARCH=%s", t.goarch))
}

daffySource := filepath.Join("cmd", "daffy", "main.go")
daffyExe := filepath.Join(DIST, "daffy")
daffySource := filepath.Join("cmd", "dave", "main.go")
daffyExe := filepath.Join(DIST, "dave")
if t.goos == "windows" {
daffyExe += ".exe"
}
Expand All @@ -191,8 +191,8 @@ func buildSpecific(t target) (string, string, error) {
return "", "", err
}

daffyCliSource := filepath.Join("cmd", "daffycli", "main.go")
daffyCliExe := filepath.Join(DIST, "daffycli")
daffyCliSource := filepath.Join("cmd", "davecli", "main.go")
daffyCliExe := filepath.Join(DIST, "davecli")
if t.goos == "windows" {
daffyCliExe += ".exe"
}
Expand Down

0 comments on commit a4cf71c

Please sign in to comment.