Labs/Bespin/UserGuide: Difference between revisions

 
(12 intermediate revisions by 6 users not shown)
Line 1: Line 1:
=Disclaimer=
=OUT OF DATE=


Please consider that <font style="color:red;">this documentation is still under hard development</font>, and may change. This documentation is for Bespin version 0.1.5 "Nonchalant Nimbus+" but it will be updated as new releases come out.
This document has been replaced by
 
https://bespin.mozillalabs.com/docs/userguide/index.html


=What is Bespin?=
=What is Bespin?=
Line 80: Line 82:
===Importing===
===Importing===


You can import projects to your Bespin account from the web. To import a project you can do:
You can import projects to your Bespin account from the web. To import a project you can use the "project" meta command:


   import <url with file> <project name>
   project import <url with file> <project name>


Projects must be hosted on-line and compressed in ZIP or TAR.GZ formats.
Projects must be hosted on-line and compressed in ZIP or TAR.GZ formats.
Line 88: Line 90:
===Exporting===
===Exporting===


To export a project to your computer you can do:
To export a project to your computer you can use the "project" meta command:


   export <project name> <archivetype>
   project export <project name> [<archivetype>]


<nowiki><archivetype></nowiki> can be ZIP or TGZ. If archivetype is not passed it defaults to ZIP
<nowiki><archivetype></nowiki> can be ZIP or TGZ. If archivetype is not passed it defaults to ZIP
Line 120: Line 122:
====vcs clone====
====vcs clone====


The clone command will clone (or check out) a remote repository. This command provides an interface for entering the different parameters needed to get set up. Since clone provides access to remote resources, you will need to enter your keychain password.
The clone command will clone (or checkout) a remote repository. This command provides an interface for entering the different parameters needed to get set up. Since clone provides access to remote resources, you will need to enter your keychain password.


The main fields are:
The main fields are:


;Keychain password: password used to store your remote login credentials securely on the Bespin server
;URL: URL of the repository (generally an http, https or ssh URL)
;URL: URL of the repository (generally an http, https or ssh URL)
;Project name: name of the project to create in Bespin. You can leave this blank, and Bespin will use what comes after the last / in the URL.
;Project name: name of the project to create in Bespin. You can leave this blank, and Bespin will use what comes after the last / in the URL.
;VCS Type: which version control system is used by this repository
;VCS User: For distributed VCSes (Mercurial, Git), what username should appear in your commits for this project. You can also use the global Bespin setting "vcsuser" to set this value.
;Authentication: None (used for read-only access to public repositories), Only for writing (if it's a public repository that you have write access to) and For reading and writing (if it's a private repository)
;Authentication: None (used for read-only access to public repositories), Only for writing (if it's a public repository that you have write access to) and For reading and writing (if it's a private repository)


If you tell Bespin, via the Authentication options, that you have write access to the repository, additional fields will be displayed so that you can configure the write access.
If you tell Bespin, via the Authentication options, that you have write access to the repository, additional fields will be displayed so that you can configure the write access.


;Keychain password: password used to store your remote login credentials securely on the Bespin server
;Push to URL: Sometimes you will use a different URL for pushing than pulling, perhaps using http to pull and ssh to push. This allows you to set the URL for pushing.
;Push to URL: Sometimes you will use a different URL for pushing than pulling, perhaps using http to pull and ssh to push. This allows you to set the URL for pushing.
;Authentication type: Bespin can use SSH for authentication or username/password. See the <tt>vcs getkey</tt> command for more information about Bespin's SSH authentication.
;Authentication type: Bespin can use SSH for authentication or username/password. See the <tt>vcs getkey</tt> command for more information about Bespin's SSH authentication.
Line 237: Line 241:
* Type <tt>set collaborate on</tt> to turn on shared editing.
* Type <tt>set collaborate on</tt> to turn on shared editing.
* Open a shared file by typing <tt>open /joewalker+pubproj/example.txt</tt>.
* Open a shared file by typing <tt>open /joewalker+pubproj/example.txt</tt>.
Or, in one graphic:
[[Image:Collab-steps.png]]


You should then be in a collaborative editing session with the rest of the Internet.
You should then be in a collaborative editing session with the rest of the Internet.


Click on the collaboration icon (2 people) in the top right hand corner show you who's editing with you.
Click on the collaboration icon (2 people) in the top right hand corner show you who's editing with you.
[[Image:Collab-people.png]]


===How it Works===
===How it Works===
Line 246: Line 256:
Collaboration adds 3 or 4 new commands:
Collaboration adds 3 or 4 new commands:


* follow/unfollow: allow you to decide whose shared projects you want to see in your project navigator. As we evolve Bespin this will become a way to get all sorts of information about the people you are working with
* <tt>follow/unfollow</tt>: allow you to decide whose shared projects you want to see in your project navigator. As we evolve Bespin this will become a way to get all sorts of information about the people you are working with
* group: allows you to put the people you are interested in into groups to make it easy to manage sharing
* <tt>group</tt>: allows you to put the people you are interested in into groups to make it easy to manage sharing
* share: allows you to export your projects read-only or editable to individuals, groups, or to everyone  
* <tt>share</tt>: allows you to export your projects read-only or editable to individuals, groups, or to everyone  


Expressing an interest in someone is as easy as “follow username”. You can then group these users together to make sharing easier. So for me to add Kevin, Ben and Dion to a group, I would do “group add mozlabs Kevin ben dion”. Grouping people like this is totally optional, but it will make maintaining sharing rules a lot easier going forward, when you’re working on a number of projects.
Expressing an interest in someone is as easy as <tt>follow username</tt>. You can then group these users together to make sharing easier. So for me to add kevin, Ben and Dion to a group, I would do <tt>group add mozlabs Kevin ben dion</tt>. Grouping people like this is totally optional, but it will make maintaining sharing rules a lot easier going forward, when you’re working on a number of projects.


Then if you want to share a project in read-only mode, to someone that is following you, you just type: “share add projectname username”. Replace username with groupname to share with one of your defined groups, or with “everyone” to just throw everything wide open. To allow editing you add “edit” to the end. So for ultimate wiki-like promiscuity: “share add projectname everyone edit”.
Then if you want to share a project in read-only mode, to someone that is following you, you just type: <tt>share add projectname username</tt>. Replace username with groupname to share with one of your defined groups, or with <tt>everyone</tt> to just throw everything wide open. To allow editing you add “edit” to the end. So for ultimate wiki-like promiscuity: <tt>share add projectname everyone edit</tt>.


Projects shared to you by people you follow will now show up in your file-explorer, or you can edit them from the command line. Type “load /owner+projectname/path/to/file”.
Projects shared to you by people you follow will now show up in your file-explorer, or you can edit them from the command line. Type <tt>open /owner+projectname/path/to/file</tt>.


==Syntax Highlighting==
==Syntax Highlighting==


Right now only CSS, JavaScript and HTML syntax highlighting is supported. This will be improved in the near future.
Right now only CSS, JavaScript and HTML syntax highlighting are supported. This will be improved in the near future.
 
The syntax highlighter keys in on the file suffix (e.g. .html will cause HTML highlighting).
 
If you need to manually force a particular highlighter you can run the set command and pass in the particular language:
 
  set language html
 
If you want to add a new syntax highlighter you can do so by loading highlighter code and registering it:
 
  // load the file first (e.g. dojo.require("...."))
  bespin.syntax.simple.Resolver.register("Arduino", ['pde']);


=Command Line=
=Command Line=
Line 266: Line 287:
==Commands==
==Commands==


===Global Commands===
=== Global Commands ===


; alias [<font style="color:#88F;">command</font>] : Create an alias between a word and a command. For example:
;alias [<font style="color: rgb(136, 136, 255);">command</font>]&nbsp;
:Create an alias between a word and a command. For example:


   alias close closefile
   alias close closefile


This creates an alias that closes without saving the file you are currently working.
This creates an alias that closes without saving the file you are currently working.  


; set [<font style="color:#88F;">variable</font>] [<font style="color:#88F;">value</font>] : This sets values to variables in the configuration. If parameter is not passed a list with the available variables will be displayed. See [[#Settings|settings]]. For example:
;set [<font style="color: rgb(136, 136, 255);">variable</font>] [<font style="color: rgb(136, 136, 255);">value</font>]&nbsp;
:This sets values to variables in the configuration. If parameter is not passed a list with the available variables will be displayed. See [[#Settings|settings]]. For example:


   set theme white
   set theme white


; projects : Show a list with your projects.
; help : Displays a list with the available commands.


; createproject [<font style="color:#88F;">projectname</font>] : Create a new project with the desired name.
;project
:Various commands to manage projects


; export [<font style="color:#88F;">projectname</font>] [<font style="color:#88F;">archivetype</font>] : See [[#Projects|Projects]]
<pre>project [command] [parameters]
</pre>
{| cellspacing="1" cellpadding="1" border="1" style="width: 679px; height: 256px;"
|-
! scope="col" | Command<br>
! scope="col" | Description<br>  
! scope="col" | Parameters<br>
|-
| create<br>
| create a new project<br>
| [projectname]<br>
|-
| delete<br>
| delete a project<br>
| [projectname]<br>
|-
| export<br>
| export the given project with an archivetype of zip or tgz<br>  
| [project] [archivetype]<br>
|-
| help<br>  
| show subcommands for project command<br>  
| [search]<br>
|-
| import<br>
| If a URL is given, import that URL (e.g. project import http://foo.com/bar.zip MyProject). If only a project is given, then a file upload dialog will ask to upload a local file (e.g. project import MyProject).<br>
| [url] [project]<br>
|-
| list<br>
| show projects<br>
| <br>
|-
| rename<br>
| rename a project<br>
| [currentProject] [newProject] <br>
|-
| show<br>
| show the current project<br>
| <br>
|}


; import [<font style="color:#88F;">url</font>] [<font style="color:#88F;">projectname</font>] : See [[#Projects|Projects]]
<br>


===Dashboard Specific Commands===
===Dashboard Specific Commands===
Line 392: Line 452:
==Configuration File==
==Configuration File==


You can access to it typing in the command line:
You can access the configuration by typing in the command line:


   editconfig
   editconfig
canmove, Confirmed users, Bureaucrats and Sysops emeriti
1,093

edits