Posted by HoLin on January 22nd, 2009 filed in
Ruby应用
介绍
satellite is a self-syncing distributed wiki with file uploads and all sorts of other useful features like offline editing.
主要的特性有:
- textile的wiki语法
- 支持文件上传
- 所有文档基于git存储与管理
- 离线编辑,并可自动同步到服务器
- 支持代码高亮
- 全面快捷键支持
经我们测试,用于个人知识管理,非常棒。
安装
- 获取代码,原始代码在”这里”:http://github.com/kenpratt/satellite/tree/master ,我们fork出了一个版本(http://github.com/holin/satellite/tree/master),根据中文环境和自己的实际需求增加了一些功能,具体看 satellit扩展功能。
1
| $ git clone git@github.com:holin/satellite.git satellite |
- 安装gems, {color:red}注意 ,rack要求使用0.4版本(其它版本未完整测试,最新的0.9rack不能用)
1
2
3
4
| $ sudo gem install rack mongrel metaid erubis RedCloth coderay
$ cd path/to/satellite
$ git submodule init
$ git submodule update |
- 配置应用,下方其他中有公开git repository申请说明
- edit conf/production.rb
- production.rb example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| # production configuration
# URI of master git repository for wiki content
config.master_repository_uri = 'git+ssh://repo.or.cz/srv/git/pkmh.git'
# user information to use for git content submissions
config.user_name = 'holin'
config.user_email = 'holin@example.com'
# logging level (:error, :warn, :info, :debug)
config.log_level = :warn
# automatically reload app when app files change? (for development)
config.auto_reload = true |
1
2
3
| $ bin/start_satellite
** Starting Satellite_2
** Satellite_2 is now running at http://0.0.0.0:4000/ |
配置文件,initialize中的配置都可以在production.rb里面通过config.xxx = ??? 来配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| def initialize
# defaults values
self.app_name = 'Satellite'
self.server_ip = '0.0.0.0'
self.server_port = 7000
self.master_repository_uri = ''
self.user_name = ''
self.user_email = ''
self.sync_frequency = 60
self.app_dir = File.join(File.dirname(File.expand_path(__FILE__)), '../')
self.conf_dir = File.join(app_dir, 'conf')
self.template_dir = File.join(app_dir, 'templates')
self.static_dir = File.join(app_dir, 'static')
self.log_dir = File.join(app_dir, 'log')
self.data_dir = File.join(app_dir, 'data')
self.log_level = :info
self.log_file_name = 'app.log'
self.auto_reload = false
self.prettify_exceptions = true
self.max_upload_filesize = 200
self.authentication = false
self.authenticator = nil
end |
Mac下配置开机启动
- 下载 Lingon
- 写启动server脚本satellite.sh
1
2
3
4
5
| #!/bin/sh
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/Applications/:$PATH
cd /Users/devon/wiki && bin/start_satellite |
- 运行Lingon,配置User Deamon
- 注销,并重新登录。测试是否正确配置
其他
收藏、分享这篇文章!
Related posts:
- shoulda on rails 在新项目中配置shoulda rails shoulda_demo -d mysql cd shoulda_demo/ script/plugin install git://github.com/thoughtbot/shoulda.git...
- Nagios中用飞信发送报警信息 近期由于飞信的API变更,原先的Linux版本fetion程序不能再用来发送信息了。而由 flyerhzm 开发的rfetion更新较快,可用来配合Nagios的报警信息发送。 rfetion是基于ruby的一个飞信客户端工具,有命令行的发送模式。使用前,需事先安装好 ruby,及rubygem,相关安装过程在网上有很多。 安装好ruby及rubygem后,可通过如下两行命令来安装rfetion: gem sources -a http://gemcutter.org...
- Git一分钟教程 流程:取代码 → 每次工作前更新代码到最新版本 → 修改代码 → 提交代码到服务器 取代码及修改全局设置 设置用户名与邮箱 git...
- Git详解(一) 我用git最开始是在github,每次提交代码以后,右上角的部分就会显示这些信息,类似于下面的: commit fa6f27b7de063c2f301b0e7148b5bd5e813faa98 tree 5e7a19c158b89fbc52a078771a833ee839727404 parent 76f31606376180ca88efa12be341dbb14fb06fdf 咋一看,这40位的乱码挺吓人的,但是你了解它的作用就不会被吓到了。 这是object name,是作为你每次提交的信息标识。这是用SHA1加密hash函数根据你的对象的内容算出来的。Git的一些优点:...
- Git服务器安装 Git on Ubuntu Server 安装Git-Core: sudo apt-get update # 可选步骤...
Related posts brought to you by Yet Another Related Posts Plugin.
Leave a Comment