[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
slackdocs:offline_editing [2012/12/25 05:16 (UTC)] – [Copying from the CLI] added links mfillpotslackdocs:offline_editing [2013/03/18 13:24 (UTC)] (current) – [Offline Editing] fixed typo sycamorex
Line 1: Line 1:
 +<!-- 0.1.2 -->
 ====== Offline Wiki Editing ====== ====== Offline Wiki Editing ======
  
Line 10: Line 11:
   * Translating an article   * Translating an article
  
-===== How to Edit Documents Offline =====+===== Starting a New Article Offline ===== 
 +The most basic way to start working on a new article offline is to open your 
 +favorite text editor and start writing. However, when pasting the contents 
 +of your article into the wiki you will need to paste the data inside of the 
 +template. 
 + 
 +As an alternative, a git repo //(listed below)// has been established with 
 +template files for each of the major sections within the wiki. You can start 
 +with the template file to guarantee that the header and footer data is 
 +retained. 
 + 
 +===== Obtaining Existing Wiki Pages ===== 
 +If you wish to edit an existing page, you will first need to download the 
 +ofiginal markup formatted text from the page, fortunately dokuwiki has a 
 +built-in function to ease the trouble. 
 + 
 +When in a webbrowser looking at the page you will need to append the syntax 
 +**<nowiki>?do=export_raw</nowiki>** to the end of the url such as 
 +[[http://docs.slackware.com/slackware:current?do=export_raw]]. 
 + 
 +<note> 
 +For translators it may be a good idea to save the links of documents that you 
 +are converting and append the syntax above to the end of the urls so 
 +wget can loop through the list obtaining new copies of each file. 
 +</note> 
 + 
 +If you want to go the more traditional route, you can open the wiki page and 
 +click the **edit this page** button to access the WYSIWYG interface, then 
 +copy the contents to a local text file. 
 + 
 +===== Offline Editing =====
  
 To simplify your editing needs, the slackdocs editorial team has a git To simplify your editing needs, the slackdocs editorial team has a git
Line 19: Line 50:
  
 This repository is located at This repository is located at
-[[https://github.com/mfillpot/slackdoc_templates]].+[[https://github.com/mfillpot/slackdoctool]] 
 + 
 +If you wish to build a package from the github repo you can find an 
 +associated slackbuild script set at [[https://github.com/mfillpot/mfillpot_SlackBuild_Scripts/tree/sdt/office/slackdoctool]]
  
-You can download single files from the github site or clone the complete +The script has many functions that can be reviewed by issuing the **-l** 
-repository by issuing the following command in the terminal while logged in +argument or viewing the man file.
-as a non-root user. +
-<code> +
-user@darkstar$ git clone git://github.com/mfillpot/slackdoc_templates.git +
-</code>+
  
 Once the template files are downloaded you can open the appropriate template Once the template files are downloaded you can open the appropriate template
Line 32: Line 62:
 your content. your content.
  
-To edit an existing article you will need to open the article in your +The file **syntax.docuwiki** can be downloaded with the **-S** argument, it 
-webbrowser, click the //"edit this page"// button on the top of the page and +will give you brief examples of the dokuwiki syntax that is used by the Slackware
-copy the text from within the WYSIWYG box into your new local document. +
- +
-//Be sure to save the edited file with a new name to avoid +
-overwriting the original template.// +
- +
-<note>The file **syntax.docuwiki** is included with the git repo files to give +
-brief examples of the dokuwiki syntax that is used by the Slackware+
 Documentation Project. Documentation Project.
-</note> 
- 
-To edit an existing article you will need to open the article in your 
-webbrowser, click the //"edit this page"// button on the top of the page and 
-copy the text from within the WYSIWYG box into your new local document. 
  
 <note> <note>
 To simplify editing the docuwiki formatted articles, instructions to enable To simplify editing the docuwiki formatted articles, instructions to enable
-syntax highlighting in various editors is included in this article.+syntax highlighting in various editors is included in the slackdoctool..
  
 The extension **.slackdoc** is used for the templates to automatically enable The extension **.slackdoc** is used for the templates to automatically enable
Line 68: Line 86:
  
 ==== vim Syntax Highlighting ==== ==== vim Syntax Highlighting ====
-To simplify editing in the **vim** text editor the git repo listed above +To simplify editing in the **vim** text editor the slackdoctool can download 
-contains a vim syntax file that will enable syntax highlighting for all +and load the necessary configuration files with the option **-s vim**.
-syntax that is used by the Slackware Documentation Project wiki. +
- +
-The file //slackdocs.vim// that is contained in the syntax_files directory +
-contains all necessary syntax highlighting criteria for the wiki documents. +
- +
-=== Installing the vim Syntax File === +
-To ease installation of the syntax file, the script named //add_vim_file.sh// +
-is included in the syntax_file directory of the git repo. This script, when +
-launched from that directory, does the following: +
-  - Removes all lines that contain the word slackdocs from your //~/.vimrc// file. +
-  - Adds the following lines to the end of the //~/.vimrc// file: +
-  <file> +
-  " Add a pointer to the $FILETYPE vim syntax file +
-  au BufRead,BufNewFile *.slackdoc set filetype=slackdocs +
-  au! Syntax slackdocs source {repo_directory}/syntax_files/slackdocs.vim +
-  </file> +
-This process removes any old configuration for the .slackdoc extension and +
-updates it with the current configuration. +
- +
-You can alternatively add it to the standard syntax file location and turn +
-the syntax on automatically, but the automatic option is more user friendly. +
- +
-<note> +
-If updates are made to the repo based syntax file you can update the repo by +
-issuing the command **"git pull"** from within the repo directory and re-run +
-the //add_vim_file.sh// to update your //~/.vimrc// file. +
-</note>+
  
 ==== kate Syntax Highlighting ==== ==== kate Syntax Highlighting ====
Line 112: Line 103:
 ===== Submitting the Updated Article(s) ===== ===== Submitting the Updated Article(s) =====
 To submit the updated or new articles you will first have to open the article To submit the updated or new articles you will first have to open the article
-on the wiki in **Edit** view, then you can either copy and paste the article+on the wiki in **edit this page** view, then you can either copy and paste the article
 into the WYSIWYG editor from your favorite text edit or use xclip to copy  into the WYSIWYG editor from your favorite text edit or use xclip to copy 
 the contents from the command line. the contents from the command line.
  
 ==== Copying from the CLI  ==== ==== Copying from the CLI  ====
-Install the **[[http://sourceforge.net/projects/xclip/|xclip]]** application from [[http://slackbuilds.org/repository/14.0/misc/xclip/|SlackBuilds.org]]+Install the **[[http://sourceforge.net/projects/xclip/|xclip]]** application 
 +from [[http://slackbuilds.org/repository/14.0/misc/xclip/|SlackBuilds.org]].
  
-Issue the command <code>cat {filename} | xlcip -selection clipboard</code>+Issue the command <code>cat {filename} | xclip -selection clipboard</code>
  
 Then the complete document is in your clipboard, you can then paste it into Then the complete document is in your clipboard, you can then paste it into
 the wiki's WYSIWYG editor. the wiki's WYSIWYG editor.
 +
 +Alternatively, the slackdoctool can load the documents into the clipboard
 +with the **-c** argument.
 +
 ====== Sources ====== ====== Sources ======
 <!-- If you are copying information from another source, then specify that <!-- If you are copying information from another source, then specify that
Line 135: Line 131:
 page --> page -->
 {{tag>offline-editing author_mfillpot}} {{tag>offline-editing author_mfillpot}}
 +
 slackdocs:offline_editing ()