2008-06-23 07:21 |
yuri
Yuri Takhteyev <yuri at sims.berkeley.edu>
A more complete release of Sputnik "Earth" is here:
On UNIX:
cd into some directory (e.g., "cd ~/sputnik"), then run
wget http://sputnik.freewisdom.org/files/sputnik_install_2008_06_22.sh
sh sputnik_install_2008_06_22.sh
./bin/xavante_start
On Windows (not tested):
1. install Kepler 1.1
2. make a directory where you want to store the data (e.g., "wiki-data")
3. create a file called sputnik.ws in Kepler's "htdocs" directory that
looks like this:
require('sputnik')
return sputnik.new_wsapi_run_fn{
VERSIUM_PARAMS = { 'c:/sputnik/wiki-data/' },
BASE_URL = '/sputnik.ws',
}
(Replace "c:/sputnik/wiki-data/" with the path to your directory
wiki-data directory).
This beta should be better than the previous (March 2008) release of
Sputnik (last in "Dish of the Day" series), so I updated
"Installation" page with those instructions and consider this "beta"
to be the recommended version now. I am calling it "beta" for now,
since there are a few more changes I want to make to "earth" before I
close it.
- yuri
--
http://sputnik.freewisdom.org/
2008-06-23 07:44 |
yuri
Yuri Takhteyev <yuri at sims.berkeley.edu>
I forgot to mention that a new version of versium-git is also out,
which means that you can now use Git to store Sputnik's history.
To do this, first install Sputnik the normal way. If you already
created some nodes using the default storage module, delete everything
in the wiki-data directory, then initialize it as a git repository:
cd wiki-data
rm -rf wiki-data
git init
Then install 'versium-git':
./bin/luarocks install
--from=http://sputnik.freewisdom.org/rocks/earth/ versium-git
Then add this to the parameters:
VERSIUM_STORAGE_MODULE = 'versium.git',
In other words, you sputnik.ws should look like this:
require('sputnik')
return sputnik.new_wsapi_run_fn{
VERSIUM_PARAMS = { '/yuri/sputnik/wiki-data/' },
BASE_URL = '/sputnik.ws',
VERSIUM_STORAGE_MODULE = 'versium.git',
}
Then run Sputnik the normal way.
Running sputnik over git gives you a few benefits:
1. Your data directory is now very clean. Each node is a file (e.g.,
"Home_Page.lua"), sub-nodes are files in directories. (This also
means you can just trivially dofile any of your data files if you want
to use the data in them bypassing Sputnik entirely.)
2. You can access your wiki history without the browser by just using
"git log" (e.g. "git log Home_Page.lua")
3. You can edit files by hand, then commit changes through git, and
those changes will then show up in Sputnik's history.
4. You can pull files from the server that runs Sputnik onto your
laptop, edit them locally in your favorite editor, commit, push, and
the changes will appear (with history!) in the Sputnik running on the
server. (Or, you can sync data between two Sputniks - e.g., one
running on the server and one running locally.)
5. If you are doing 4 and meanwhile someone edits the data on the
server, you can actually merge them.
In other words, all the reasons why you already love git are now also
reasons to love Sputnik.
Sputnik over MySQL, SQLite and Subversion should hopefully be coming
shortly. (The first two of those are ready, just need to be tested a
bit more.)
- yuri
On Mon, Jun 23, 2008 at 2:21 AM, Yuri Takhteyev <yuri@sims.berkeley.edu> wrote:
> A more complete release of Sputnik "Earth" is here:
>
> On UNIX:
>
> cd into some directory (e.g., "cd ~/sputnik"), then run
>
> wget http://sputnik.freewisdom.org/files/sputnik_install_2008_06_22.sh
> sh sputnik_install_2008_06_22.sh
> ./bin/xavante_start
>
> On Windows (not tested):
>
> 1. install Kepler 1.1
> 2. make a directory where you want to store the data (e.g., "wiki-data")
> 3. create a file called sputnik.ws in Kepler's "htdocs" directory that
> looks like this:
>
> require('sputnik')
> return sputnik.new_wsapi_run_fn{
> VERSIUM_PARAMS = { 'c:/sputnik/wiki-data/' },
> BASE_URL = '/sputnik.ws',
> }
>
> (Replace "c:/sputnik/wiki-data/" with the path to your directory
> wiki-data directory).
>
> This beta should be better than the previous (March 2008) release of
> Sputnik (last in "Dish of the Day" series), so I updated
> "Installation" page with those instructions and consider this "beta"
> to be the recommended version now. I am calling it "beta" for now,
> since there are a few more changes I want to make to "earth" before I
> close it.
>
> - yuri
>
> --
> http://sputnik.freewisdom.org/
>
--
http://sputnik.freewisdom.org/
2008-06-23 07:58 |
gareuselesinge
Enrico Tassi <gareuselesinge at libero.it>
On Mon, Jun 23, 2008 at 02:21:16AM -0700, Yuri Takhteyev wrote: > A more complete release of Sputnik "Earth" is here: > > On UNIX: > > cd into some directory (e.g., "cd ~/sputnik"), then run > > wget http://sputnik.freewisdom.org/files/sputnik_install_2008_06_22.sh > sh sputnik_install_2008_06_22.sh > ./bin/xavante_start It seems the sputnik tarball has a lot of ~ files, not a big deal anyway... -- Enrico Tassi
2008-06-23 08:13 |
yuri
Yuri Takhteyev <yuri at sims.berkeley.edu>
Whoops. That's me forgetting to run "git clean" making the archive. I'll try to start using git-archive. BTW, I created a new branch called "earth" which you can now track instead of "master". Though, I expect them to stay synchronized for some time. - yuri On Mon, Jun 23, 2008 at 2:58 AM, Enrico Tassi <gareuselesinge@libero.it> wrote: > On Mon, Jun 23, 2008 at 02:21:16AM -0700, Yuri Takhteyev wrote: >> A more complete release of Sputnik "Earth" is here: >> >> On UNIX: >> >> cd into some directory (e.g., "cd ~/sputnik"), then run >> >> wget http://sputnik.freewisdom.org/files/sputnik_install_2008_06_22.sh >> sh sputnik_install_2008_06_22.sh >> ./bin/xavante_start > > It seems the sputnik tarball has a lot of ~ files, not a big deal > anyway... > -- > Enrico Tassi > > _______________________________________________ > Sputnik-list mailing list > Sputnik-list@lists.luaforge.net > http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list > -- http://sputnik.freewisdom.org/
2008-06-23 15:51 |
yuri
Yuri Takhteyev <yuri at sims.berkeley.edu>
> After registered and login sputnik, I edit a page and refresh, find that > sputnik makes me logout automatically, why? Can you describe the exact steps? I can't reproduce this. > How to upload a png file, pdf file when edit in sputnik? Could you give us a > detailed tutors on it? Binary files are represented by special nodes, which behave differently because they have their "prototype" field set to "@Binary_File". If you want to "edit" an existing binary node, e.g., "_logo", just go to it's "edit" page, and it will have a button to upload a new image. E.g.: http://localhost:8080/sputnik.ws?p=_logo.png - returns an image http://localhost:8080/sputnik.ws?p=_logo - returns a page that describes the node, has an "Edit" link http://localhost:8080/sputnik.ws?p=_logo.edit - a form to edit attributes, including uploading a new image If you want to create a new node from scratch, then (as I just realized) it's somewhat more complicated than it should be, because we originally locked this feature down aggressively for security, and then forgot to provide an easier mechanism. I'll look into this and post an update. Meanwhile, you can create such nodes manually if you want. If you are using Sputnik with git, then just create a file "My_Image.lua" in your wiki-data directory, put the following into it: prototype = "@Binary_File" file_type = "image/jpeg" Save the file. Commit it with git if you want to save this revision in history. Then access the node via the web interface to upload a new file. Of course, you can also put the image data into the node via the editor as well: just look at what My_Image.lua looks like after you upload a file into it, keeping in mind that the value of "content" is base64-encoded image data. > How to do to convert the old page storage format to the new git storage > format? Please supply a tool or method? I can't bear write them one by one > manually by myself! Depends on how old. Pages created by "Cottington" releases (before 2008) will need to be converted. There is a script to convert those files to the new default format (files in directories): http://sputnik.freewisdom.org/en/Migrating_from_Cottington. I haven't tested it recently, so it might be a bit stale, but I will try to get back to it the next few days. I will also provide a script for converting data into the new git format. For now, you can try something like this: require"luarocks.require" require"versium.filedir" require"versium.git" old = versium.filedir.new{"/tmp/old-sputnik/wiki-data/"} new = versium.git.new{"/tmp/new-sputnik/wiki-data/"} for i, id in ipairs(old:get_node_ids()) do print(id) for j, edit in ipairs(old:get_node_history(id)) do data = old:get_node(id, edit.version) new:save_version(id, data, edit.author, edit.comment) end end Note that what we do here is create a versium.filedir versium instance for the old repository (assuming the default Dish of the Day / Earth format), a versium.git for the new repository, then just copy the content edit-by-edit from one repository into another. Note that this will preserve revisions and comments, but will lose the timestamps. I am not sure how to backdate commits git. - yuri -- http://sputnik.freewisdom.org/