Skip to content

Commit

Permalink
readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjoshuak committed Aug 22, 2017
1 parent 2bc7623 commit 27d7078
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 34 deletions.
9 changes: 5 additions & 4 deletions README.md
Expand Up @@ -9,7 +9,7 @@

C4 the Cinema Content Creation Cloud is an open source framework for content creation using remote resources.

This repos holds the reference implementation of the C4 framework as a collection of go packages. Other languages can be fund under the Avalanch-io organization.
This repos holds the reference implementation of the C4 framework and source for the command line tools.

Command line tools are built from this repository, see releases for information about the latest builds.

Expand Down Expand Up @@ -46,11 +46,12 @@ See the [README.md](id/README.md) in the `id` package for more information.

### Releases

Current release:
Current release: [v0.7.0](https://github.com/Avalanche-io/c4/tree/v0.7.0)

Previous Releases
#### Previous Releases:

[v0.6.0](https://github.com/Avalanche-io/c4/tree/v0.6.0) **Warning this version uses an incorrect character set for C4 IDs**
**Warning this version uses an incorrect character set for C4 IDs**
[v0.6.0](https://github.com/Avalanche-io/c4/tree/v0.6.0)

### Contributing

Expand Down
70 changes: 40 additions & 30 deletions cmd/c4/Readme.md
@@ -1,50 +1,60 @@
# c4 - Command line interface
# `c4` Command Line Interface

This version of the c4 cli generates ids for individual files and folders, file system hierarchies, and piped data.
C4 is a command line tool for generating C4 IDs for files, folders and piped data.

## Examples
## Features

Id a file:
- Generate C4 IDs for files and directory hierarchies.
- Generate C4 IDs while copying files.
- Stores snapshots of hierarchy scans with filenames, C4 IDs and file metadata.
- Applies tags to file system snapshots.
- Compare two snapshots of the same folder at different times or two different folders.
- Provides a set of instructions that would synchronize one folder to another.

And more on the way.

The C4 tool is primarily used to quickly identifying files, and folders, it can do
this most efficiently in a media production pipeline by using it to copy files instead of
`cp` or `copy`. When copying `c4` will ID the file while copying at the same time and store the result for future reference. If a file is unmodified from the most recently
identified copy, then c4 uses the stored ID instead of re-identifying the file.

C4 can tag snapshots of the file system, and retain those snapshots for future reference.

C4 only stores the paths, file metadata, and C4 ID. It is the users responsibility to
retain copies of files if users wish to revert changes to previously tagged versions. C4 can provide a "patch" or set of operations that can be used make a directory match a snapshot or source directory.

To id a file

```bash
$ c4 c4.go
$ c4 id [filename]
c41YXr8u3uZC5kkwUr27TZkoYRYDprZmr8YCBJ13quTggGvjGrxMJzzF9qcoFhyGr5rxP2dMtySJevJqQbC3R3hzyE
```

Id all files and folders recursively:
To copy files or folders

```bash
$ c4 -R ./cmd
c43XLLxd2sNhqjUPWL8xYqoq7gmU1SZA675m1zS7jFVPRKTx7hTANQEu6RaY286uqEpbqBZKpoPNfzNSNQEVthQ7H7: cmd/c4/Readme.md
c44m2stxSN9Wz7sAoNgPttVQ8xFzzEW4xP3huPuTXbT93MpwYPK5AmDPR4wANjFWZHBE7kNsLm73hH1YopZawtRfRK: cmd/c4/main.go
c45agVTfUYSMumK4ohzsnTo7X8QZtytNDTzo62tAzw8dnCMwe9GhHWwwotWBUdHwoXY9qqoSUqWrtmQJb1AQ1cTdaR: cmd/c4
c44AvENJsDgamsSoBh7yCZHRkyn9NMbckZCY7VEVPxqfLfxNLeVmDNJ9nTugLYcyi2JYP492exkNS7KTAhoDwVms3z: cmd/c4id/README.md
c45wRLpVXHr8FYD2GP8ZzKnGJ3GiwmWFDJCwhQ5sh8zdznp5tFXfszCe1wqrcFBZ8b3nPkYNfLqt4Y48WbbUeT7pqr: cmd/c4id/main.go
c45p5snKG8z3vU6QcM3buW8r3LAQUeKQLUFcvqTCBJZr3Uzn8PMZrBbvF5dRvmaR4A9AEZLEwHnSFkixBkyE8dRoRU: cmd/c4id
c436eg2b8W9Rguo6B9Arve1Lmh9sgkRJtXBvxvZjTdwmPMByTtjL7WourHQkb1HZz9mKBxEB9F5i4hq1S24N1ijwSB: cmd
$ c4 cp sourcefile targetfile
c42gCHUDtmQV2V7Zv3NCk1WFSVszLe4xCC7hRwUU1awTnUdjnTysxCoHmkVduWE4tX4dsJ4xNEZpNvuiC74vJiPxTJ: sourcefile -> targetfile

$ c4 cp -R sourcefolder targetfolder
c41YXr8u3uZC5kkwUr27TZkoYRYDprZmr8YCBJ13quTggGvjGrxMJzzF9qcoFhyGr5rxP2dMtySJevJqQbC3R3hzyE: sourcefolder/file1.data -> targetfolder/file1.data
c45VWLhapqAhdyWeQH5rWr6WMdUsbDY2X3MAycQohPpvJJeLB2AAKqw8RmCNgLCGuAPw9Sg7ywurSCmH7xCf86Y9zN:
sourcefolder/file2.data -> targetfolder/file2.data
...
```

### Help output:
### flags

```bash
Usage: c4 [flags] [file]

c4 generates c4ids for all files and folders spacified.
If no file is given c4 will read piped data.
Output is in YAML format.

flags:
-a, --absolute=false: Output absolute paths, instead of relative paths.
-a, --absolute: Output absolute paths, instead of relative paths.
-d, --depth=0: Only output ids for files and folders 'depth' directories deep.
-f, --formatting="id": Output formatting options.
"id": c4id oriented.
"path": path oriented.
-L, --links=false: All symbolic links are followed.
-m, --metadata=false: Include filesystem metadata.
"url" is always included unless data is piped, or only a single file is specified.
-R, --recursive=false: Recursively identify all files for the given url.
-v, --version=false: Show version information.
-L, --links: All symbolic links are followed.
-m, --metadata: Include filesystem metadata.
"path" is always included unless data is piped, or only a single file is specified.
-R, --recursive: Recursively identify all files for the given path.
-v, --version: Show version information.
```



0 comments on commit 27d7078

Please sign in to comment.