soywiki 0.2.3 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +49 -40
- data/Rakefile +0 -1
- data/lib/soywiki.rb +1 -1
- data/lib/soywiki.vim +11 -8
- data/website/gen.rb +4 -4
- data/website/images-soywiki/expand.png +0 -0
- data/website/images-soywiki/expand.xcf +0 -0
- data/website/images-soywiki/page-select.png +0 -0
- data/website/images-soywiki/page-select.xcf +0 -0
- data/website/images-soywiki/search.png +0 -0
- data/website/images-soywiki/search.xcf +0 -0
- data/website/images-soywiki/sm-expand.png +0 -0
- data/website/images-soywiki/sm-page-select.png +0 -0
- data/website/images-soywiki/sm-search.png +0 -0
- data/website/soywiki-template.html +2 -0
- data/website/top.screenshots +3 -3
- metadata +12 -3
data/README.markdown
CHANGED
@@ -43,7 +43,7 @@ SoyWiki is free and open source.
|
|
43
43
|
## Prerequisites
|
44
44
|
|
45
45
|
* a recent version of Vim (SoyWiki is developed against Vim 7.2 and 7.3)
|
46
|
-
* a recent version of Ruby
|
46
|
+
* a recent version of Ruby: Ruby 1.9.2 is recommended
|
47
47
|
* RubyGems (if Ruby version is older than 1.9)
|
48
48
|
* a recent version of [Git][git] (1.7.0.4 or above to be safe)
|
49
49
|
|
@@ -97,17 +97,19 @@ To use MacVim as your SoyWiki Vim engine, you can run soywiki like this
|
|
97
97
|
or you can `export SOYWIKI_VIM=mvim` in your `~/.bash_profile` and then
|
98
98
|
just run `soywiki`.
|
99
99
|
|
100
|
+
|
100
101
|
## Basic usage
|
101
102
|
|
102
103
|
For basic use, SoyWiki works exactly like a typical wiki.
|
103
104
|
|
104
|
-
You write text, and when you want to create a new wiki page, you come up
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
105
|
+
You write text, and when you want to create a new wiki page, you come up with a
|
106
|
+
WikiWord for it and format it in CamelCase. Whenever you type a valid WikiLink,
|
107
|
+
it will automatically be syntax-highlighted, and pressing ENTER on it will take
|
108
|
+
you to the new page.
|
109
|
+
|
110
|
+
Creating WikiWords and pressing ENTER on them is how you create wiki pages and
|
111
|
+
link them together. You'll be surprised at how powerful this simple mechanism
|
112
|
+
is for organizing your notes.
|
111
113
|
|
112
114
|
In SoyWiki, a wiki page is a simple text file that has a WikiWord title
|
113
115
|
on the first line (don't alter this line) and any text your want to
|
@@ -119,36 +121,41 @@ That's all you need to know to get started.
|
|
119
121
|
|
120
122
|
## Namespaced WikiWords
|
121
123
|
|
122
|
-
|
124
|
+
Every WikiWord in SoyWiki is implicitly or explicitly namespaced.
|
123
125
|
|
124
|
-
|
126
|
+
An explicitly namespaced WikiWord looks like this:
|
125
127
|
|
126
|
-
|
128
|
+
recipes.SoyRaspberrySmoothie
|
127
129
|
|
128
|
-
|
130
|
+
The implicitly namespaced form looks just like a conventional WikiWord:
|
129
131
|
|
130
|
-
|
131
|
-
period. The namespace word must start with a lower-case letter and
|
132
|
-
consist only of letters, numbers, and underscore characters. You can't
|
133
|
-
chain namespace words together: the maximum nesting level is 1.
|
132
|
+
SoyRaspberrySmoothie
|
134
133
|
|
135
|
-
|
136
|
-
|
134
|
+
A namespace must start with a lower-case letter and consist only of letters,
|
135
|
+
numbers, and underscore characters.
|
137
136
|
|
138
|
-
|
139
|
-
|
140
|
-
|
137
|
+
Within a WikiWord namespace you can use unqualified WikiWords to link pages
|
138
|
+
within that namespace together. For example, if you are editing a page called
|
139
|
+
`recipes.SoyMacaroni` and you want to link to a page called
|
140
|
+
`recipes.SoyRaspberrySmoothie`, you can type a link called
|
141
|
+
`SoyRaspberrySmoothie`. SoyWiki will treat this link as an implicitly
|
142
|
+
namespaced link to another page in the `recipes` namespace.
|
141
143
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
144
|
+
You can't chain namespace words together. The maximum nesting level is 1. More
|
145
|
+
nesting would imply hierarchical relationships, and permitting hierarchical
|
146
|
+
nesting goes against the grain of what a wiki is, which is an [undirected
|
147
|
+
graph][graph]. SoyWiki namespaces are not supposed to represent hierarchies,
|
148
|
+
but domains (e.g., personal, work, project1, project2, etc.). You can easily
|
149
|
+
represent hierarchical relationships _within_ a wiki page. See "Expanding a
|
150
|
+
wiki page" below to see how you can use SoyWiki like an outliner program.
|
148
151
|
|
149
|
-
|
150
|
-
default namespace `main`.
|
152
|
+
[graph]:http://en.wikipedia.org/wiki/Graph_theory
|
151
153
|
|
154
|
+
SoyWiki's namespaced WikiWords help organize your wiki space conceptually.
|
155
|
+
They also help reduce clutter in your wiki directory.
|
156
|
+
|
157
|
+
When you start SoyWiki for the first time, the active namespace is the default
|
158
|
+
namespace `main`. `main.HomePage` is the first page you will see.
|
152
159
|
|
153
160
|
## Wiki navigation
|
154
161
|
|
@@ -174,7 +181,7 @@ this. You can press `CTRL-^` to toggle between the current page and the
|
|
174
181
|
last page you looked at.
|
175
182
|
|
176
183
|
You can view all the pages in your wiki, most recently modified first,
|
177
|
-
by
|
184
|
+
by pressing `,m`. This opens both a page list and autocompletion window.
|
178
185
|
You can use the standard Vim autocompletion commands here to find the
|
179
186
|
page you want and call it up. See Vim's `:help ins-completion-menu` for
|
180
187
|
further instructions.
|
@@ -310,11 +317,13 @@ You can always bypass Vim and SoyWiki altogether and use Git directly to
|
|
310
317
|
inspect your revision history. The Git repo for your SoyWiki wiki will
|
311
318
|
be located in the same directory as your wiki files.
|
312
319
|
|
313
|
-
To sync your SoyWiki wiki between two personal computers,
|
314
|
-
|
320
|
+
To sync your SoyWiki wiki between two personal computers, you can follow the
|
321
|
+
instructions [here][git-sync] or you can set up an bare Git repository
|
322
|
+
upstream on some server for all your computers to push to and pull from.
|
315
323
|
|
316
324
|
[git-sync]:http://www-cs-students.stanford.edu/~blynn/gitmagic/ch03.html
|
317
325
|
|
326
|
+
|
318
327
|
If you want to edit a common SoyWiki with many other people, it's
|
319
328
|
probably best to set up a common upstream Git repository and to work
|
320
329
|
locally on a development branch before pulling the HEAD of the master
|
@@ -347,8 +356,8 @@ anything, and it erases the WikiWord that got expanded.
|
|
347
356
|
|
348
357
|
* `,x` expands a wiki page seamfully and opens on a vertical split
|
349
358
|
* `,X` expands a wiki page seamlessly and opens on a vertical split
|
350
|
-
* `,
|
351
|
-
* `,
|
359
|
+
* `,hx` expands a wiki page seamfully and opens on normal split
|
360
|
+
* `,hX` expands a wiki page seamlessly and opens on a normal split
|
352
361
|
* `q` closes the expanded view window
|
353
362
|
|
354
363
|
Both modes of expansion are useful when you want to assemble a long
|
@@ -360,8 +369,8 @@ dreams within dreams.
|
|
360
369
|
|
361
370
|
## Exporting to HTML
|
362
371
|
|
363
|
-
Want to share your wiki with non-Vim-users?
|
364
|
-
of html pages
|
372
|
+
Want to share your wiki with non-Vim-users? You can export your wiki into a directory
|
373
|
+
of html pages. Type `soywiki --html` from the root directory of your wiki.
|
365
374
|
|
366
375
|
|
367
376
|
## Extra macros
|
@@ -386,7 +395,7 @@ Some people don't like the CamelCase (a.k.a. WikiCase) wiki link
|
|
386
395
|
pattern. But SoyWiki embraces it and wants everyone to adopt it, for the
|
387
396
|
following reasons:
|
388
397
|
|
389
|
-
* Besides being the original, CamelCase is the most elegantly minimalist approach to linking wiki pages together -- "with no additional markup whatsoever," as
|
398
|
+
* Besides being the original, CamelCase is the most elegantly minimalist approach to linking wiki pages together -- "with no additional markup whatsoever," [as Ward Cunninghamb put it][ward].
|
390
399
|
* It encourages you more than other wiki link patterns to create wiki pages with succinctly descriptive names that are easy to remember.
|
391
400
|
* Because the link pattern is so minimal and succinct, writing
|
392
401
|
them interrupts your flow of thought a lot less than other wiki patterns.
|
@@ -407,9 +416,9 @@ can email me at dhchoi {at} gmail.com.
|
|
407
416
|
|
408
417
|
## How to support the SoyWiki project
|
409
418
|
|
410
|
-
|
411
|
-
have a bug to report or a good feature to
|
412
|
-
tracker][1].
|
419
|
+
SoyWiki is very new, so there are kinks and bugs to iron out and lot of
|
420
|
+
desirable features to add. If you have a bug to report or a good feature to
|
421
|
+
suggest, please file it on the [issue tracker][1]. That will help a lot.
|
413
422
|
|
414
423
|
[1]:https://github.com/danchoi/soywiki/issues
|
415
424
|
|
data/Rakefile
CHANGED
data/lib/soywiki.rb
CHANGED
data/lib/soywiki.vim
CHANGED
@@ -292,13 +292,15 @@ endfunc
|
|
292
292
|
func! s:get_page_list()
|
293
293
|
" no file current in buffer
|
294
294
|
if len(bufname('')) == 0
|
295
|
-
|
295
|
+
let pages = split(system(s:ls_command), "\n")
|
296
296
|
elseif bufname('') == 'pages-linking-in'
|
297
297
|
" this needs refactoring to rely less on state
|
298
|
-
|
298
|
+
let pages = s:pages_linking_in
|
299
299
|
else
|
300
|
-
|
300
|
+
"let pages = s:omit_this_page(split(system(s:ls_command), "\n"))
|
301
|
+
let pages = split(system(s:ls_command), "\n")
|
301
302
|
endif
|
303
|
+
return pages
|
302
304
|
endfunction
|
303
305
|
|
304
306
|
|
@@ -389,12 +391,11 @@ function! CompletePageTitle(findstart, base)
|
|
389
391
|
endif
|
390
392
|
endfun
|
391
393
|
|
392
|
-
|
393
394
|
function! s:select_page()
|
394
395
|
let page = s:trimString( get(split(getline(line('.')), ": "), 1) )
|
395
396
|
close
|
396
397
|
exe s:return_to_winnr . "wincmd w"
|
397
|
-
if (page == '
|
398
|
+
if (page == '') " no selection
|
398
399
|
return
|
399
400
|
end
|
400
401
|
let match = ""
|
@@ -599,8 +600,8 @@ func! s:prep_buffer()
|
|
599
600
|
|
600
601
|
noremap <buffer> <leader>x :call <SID>expand(0,1)<CR>
|
601
602
|
noremap <buffer> <leader>X :call <SID>expand(1,1)<CR>
|
602
|
-
noremap <buffer> <leader>
|
603
|
-
noremap <buffer> <leader>
|
603
|
+
noremap <buffer> <leader>hx :call <SID>expand(0,0)<CR>
|
604
|
+
noremap <buffer> <leader>hX :call <SID>expand(1,0)<CR>
|
604
605
|
|
605
606
|
noremap <silent> <leader>? :call <SID>show_help()<cr>
|
606
607
|
|
@@ -615,7 +616,7 @@ endfunc
|
|
615
616
|
|
616
617
|
func! s:highlight_wikiwords()
|
617
618
|
if (s:is_wiki_page())
|
618
|
-
syntax clear
|
619
|
+
" syntax clear
|
619
620
|
exe "syn match Comment /". s:wiki_link_pattern. "/"
|
620
621
|
exe "syn match Constant /". s:http_link_pattern . "/"
|
621
622
|
endif
|
@@ -650,3 +651,5 @@ endif
|
|
650
651
|
syntax enable
|
651
652
|
let mapleader = ','
|
652
653
|
call s:highlight_wikiwords()
|
654
|
+
|
655
|
+
|
data/website/gen.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
require 'liquid'
|
2
1
|
require 'rdiscount'
|
2
|
+
require 'liquid'
|
3
3
|
|
4
4
|
module Webpage
|
5
5
|
def self.generate(version)
|
6
6
|
screenshots = RDiscount.new(File.read("top.screenshots")).to_html
|
7
7
|
readme = File.expand_path("../../README.markdown", __FILE__)
|
8
|
-
raise "
|
8
|
+
raise "No README" unless File.size?(readme)
|
9
9
|
md = File.read(readme).split(/^\s*$/)
|
10
|
-
|
11
|
-
insert_at = md.index
|
10
|
+
insert_before = md.grep(/^A quick overview of/)
|
11
|
+
insert_at = md.index insert_before.first
|
12
12
|
md.insert(insert_at, screenshots)
|
13
13
|
md = md.join("\n\n")
|
14
14
|
# for some reason markdown inserts extra blank lines
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -36,6 +36,7 @@
|
|
36
36
|
<li><a href="https://rubygems.org/gems/soywiki">rubygems page</a></li>
|
37
37
|
<li><a href="https://github.com/danchoi/soywiki/issues">issue tracker</a></li>
|
38
38
|
<li><a href="https://github.com/danchoi/soywiki/commits/master">commit history</a></li>
|
39
|
+
<li><a href="http://groups.google.com/group/soywiki-users?msg=new&lnk=gcis">google group</a></li>
|
39
40
|
<li><a href="https://github.com/danchoi/soywiki/wiki">wiki</a></li>
|
40
41
|
</ul>
|
41
42
|
|
@@ -43,6 +44,7 @@
|
|
43
44
|
|
44
45
|
<span class="st_twitter_large" displayText="Tweet"></span><span class="st_facebook_large" displayText="Facebook"></span><span class="st_ybuzz_large" displayText="Yahoo! Buzz"></span><span class="st_gbuzz_large" displayText="Google Buzz"></span><span class="st_email_large" displayText="Email"></span><span class="st_sharethis_large" displayText="ShareThis"></span>
|
45
46
|
|
47
|
+
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fdanielchoi.com%2Fsoftware%2Fsoywiki.html&layout=button_count&show_faces=false&width=50&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:120px; height:25px; margin-top:6px;"></iframe>
|
46
48
|
|
47
49
|
<div class="also-by">
|
48
50
|
<h4>also by this developer</h4>
|
data/website/top.screenshots
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
## Screenshots
|
2
2
|
|
3
|
-
<a href="images-soywiki/
|
4
|
-
<a href="images-soywiki/
|
5
|
-
<a href="images-soywiki/
|
3
|
+
<a href="images-soywiki/page-select.png" rel="lightbox[screens]"><img src="images-soywiki/sm-page-select.png" /></a>
|
4
|
+
<a href="images-soywiki/search.png" rel="lightbox[screens]"><img src="images-soywiki/sm-search.png" /></a>
|
5
|
+
<a href="images-soywiki/expand.png" rel="lightbox[screens]"><img src="images-soywiki/sm-expand.png" /></a>
|
6
6
|
|
7
7
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 7
|
9
|
+
version: 0.2.7
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Daniel Choi
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-02-
|
17
|
+
date: 2011-02-14 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -65,6 +65,15 @@ files:
|
|
65
65
|
- website/.gitignore
|
66
66
|
- website/bottom.markdown
|
67
67
|
- website/gen.rb
|
68
|
+
- website/images-soywiki/expand.png
|
69
|
+
- website/images-soywiki/expand.xcf
|
70
|
+
- website/images-soywiki/page-select.png
|
71
|
+
- website/images-soywiki/page-select.xcf
|
72
|
+
- website/images-soywiki/search.png
|
73
|
+
- website/images-soywiki/search.xcf
|
74
|
+
- website/images-soywiki/sm-expand.png
|
75
|
+
- website/images-soywiki/sm-page-select.png
|
76
|
+
- website/images-soywiki/sm-search.png
|
68
77
|
- website/lightbox2/css/lightbox.css
|
69
78
|
- website/lightbox2/images/bullet.gif
|
70
79
|
- website/lightbox2/images/close.gif
|