Skip to content

Commit 2aa48e2

Browse files
author
Itay Donanhirsh
committed
basic readme
1 parent 25490c5 commit 2aa48e2

File tree

1 file changed

+99
-8
lines changed

1 file changed

+99
-8
lines changed

Diff for: README.md

+99-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,116 @@
1-
# Clutter
1+
# [# Clutter #]
22

3-
## Installation
3+
Clutter facilitates an unintrusive way to link textual content in a source tree. Think ctags for comments.
4+
5+
The motivation is to be able to link various concepts in the code base, making implicit links between code segments explicit.
6+
7+
## TL;DR
48

5-
### Using GO
9+
Given:
10+
11+
`README.md`:
612

713
```
8-
go install github.com/cluttercode/clutter/cmd/clutter
14+
The code here include implementations for functions in each language to print a cat vocalization.
15+
See [# cat #] for all implementations.
16+
```
17+
18+
`cat.go`:
19+
20+
```go
21+
package cat
22+
23+
import "fmt"
24+
25+
func cat() { // [# cat lang=go #]
26+
fmt.Println("meow")
27+
}
928
```
1029

11-
### From Source
30+
`cat.py`:
1231

32+
```python
33+
def cat(): # [# cat lang=python #]
34+
print("meow")
1335
```
14-
make install
36+
37+
`cat.c`:
38+
39+
```c
40+
#include <stdio.h>
41+
42+
void cat() { // [# cat lang=c #]
43+
printf("meow\n")
44+
}
45+
46+
```
47+
48+
`cat.hs`:
49+
50+
```haskell
51+
cat = putStrLn("meow") -- [# cat lang=haskell #]
52+
```
53+
54+
Clutter allows to:
55+
56+
```
57+
$ clutter search cat
58+
cat README.md:2
59+
cat cat.c:3 lang=c
60+
cat cat.go:6 lang=go
61+
cat cat.hs:1 lang=haskell
62+
cat cat.py:2 lang=python
63+
64+
$ clutter search -g cat lang=py\*
65+
cat cat.py:2 lang=python
1566
```
1667

68+
## Syntax
69+
70+
```
71+
[# name attr1 attr2=value2 #]
72+
```
73+
74+
`[# @attr name #]` translates to `[# name attr #]`, which is the same as `[# name attr= #]`.
75+
76+
`[# .name #]` translates to `[# name scope="current filename" #]`.
77+
78+
`[# ./name #]` translates to `[# name scope="current dir" #]`.
79+
80+
## Integrations
81+
82+
- [Vim Plugin](https://github.com/cluttercode/vim-clutter)
83+
84+
- [Sphinx Extension](https://github.com/cluttercode/sphinx-clutter)
85+
86+
## Installation
87+
1788
### Using gobinaries
1889

90+
```shell
91+
curl -sf https://gobinaries.com/cluttercode/clutter/cmd/clutter@latest | sh
1992
```
20-
$ curl -sf https://gobinaries.com/cluttercode/clutter/cmd/clutter@latest | sh
93+
94+
### Using go
95+
96+
```shell
97+
go install github.com/cluttercode/clutter/cmd/clutter
2198
```
2299

23100
### Prebuilt binaries
24101

25-
From [releases](https://github.com/cluttercode/clutter/releases).
102+
See [releases](https://github.com/cluttercode/clutter/releases).
103+
104+
### From source
105+
106+
```shell
107+
make install
108+
```
109+
110+
## TODO
111+
112+
- [ ] Docs: resolve, search
113+
- [ ] More tests
114+
- [ ] Cross repo.
115+
116+
- [ ] Only account for tags in comments.

0 commit comments

Comments
 (0)