Difference between revisions of "Carddavmate"

From ArchWiki
Jump to: navigation, search
(Fixed category (I don't know enough to be more specific). i18n. add link to official site. fix heading levels. fix install instructions.)
Line 12: Line 12:
 
== Configuration ==
 
== Configuration ==
  
=== Italics ===
+
=== Password Protection ===
  
Italics are commonly used to mark a citation, titles, messages that are displayed on screen, and so on.
+
Password protection is implemented using apache's htpasswd facility. The relevant file that includes the authentification credentials is at /srv/http/carddavmate/htpasswd.
  
On ArchWiki, italics should be used to present:
+
You may delete the file or remove the "test" account by deleting the line from the file.
  
* Something that someone said.
+
To add your own user, use this:
* A quotation from an article (possibly followed by a link)
+
* Screen output
+
* Keyboard input
+
  
Example of italics: ''This text is in italics''
+
$ sudo htpasswd /srv/http/carddavmate/htpasswd
  
=== Bold ===
+
add "-c" after htpasswd if you deleted the file "htpasswd".
  
Bold text is used to give strong emphasis to parts of text.
+
=== configuring the carddav server ===
  
On ArchWiki, bold text should be used to present:
+
add the carddav server to your config by editing /srv/http/carddavmate/config.js
  
* Important warnings and notes
+
An example is better than a thousand words, so here is an example that works for me:
* Must-follow instructions
+
* Notes to readers such as "This part of the article is incomplete".
+
  
Do not apply bold to entire paragraphs.
+
var globalSettings=[{href: 'https://carddav.example.com:443/caldav.php/joe/', userAuth: {userName: 'joe', userPassword: 'secret', serverPassword: false}, timeOut: 14000}];
  
Example of bold text: '''Some bold text'''
+
=== configuring apache ===
  
An example of a note:
+
To "serve" the /srv/http/carddavmate directory properly, you need to include /etc/httpd/conf/extra/httpd-carddavmate.conf in your apache configuration. To do this, add the following line to /etc/httpd/conf/httpd.conf
  
'''NOTE:''' This article is still under development.
+
Include conf/extra/httpd-carddavmate.conf
  
=== Code box ===
+
Also, you need to edit httpd-carddavmate.conf to reflect the url where carddavmate is installed. An example would be:
  
Code boxes are typically used to present parts of source code, screen output, input.
+
Header always set Access-Control-Allow-Origin "https://carddavmate.example.com"
  
On ArchWiki, code box should be used to:
+
You can save this file and the restart apache by issuing
  
* present parts of configuration files
+
$ sudo rc.d restart httpd
* present screen output that has multiple lines (for one-liners use italics and write the text inside the paragraph)
+
* present input required from the user
+
  
Here are some examples:
+
=== Testing ===
  
Error code 103
+
To test your installation, browse to https://127.0.0.1/carddavmate and see if your carddav data shows up.
Hit any key to continue...
+
  
(If you want a single line screen output, you may do it like this: ''Error code 103'' Of course, if you still want the screen output to stand out, you may use the code box for added emphasis).
+
This was tested in chrome and worked fine, ymmv for firefox and others.
  
 +
=== Troubleshooting ===
  
In order to execute pacman system update you need to type in:
+
Troubleshooting is best done using chrome's built-in javascript console
  
pacman -Syu
+
=== Security ===
  
(Same applies to keyboard input example as the example above. If you have a single line command, you may use italics and write it inside a paragraph like this: ''pacman -Syu'' unless, of course, you think added emphasis is in order.)
+
Since the client is a javascript program that runs in your browser, the username/password that is configured in config.js on the server is also in the browser and can be easily seen. To avoid issues, clear your browser cache to delete the compromising files after you are done.
 
+
'''NOTE:''' To avoid confusion, it is usually advisable to separate screen output from the commands that caused them.
+
 
+
For example:
+
 
+
Type in:
+
 
+
modprobe fglrx
+
 
+
If you get a following error:
+
 
+
error inserting module fglrx.ko
+
 
+
Then you're screwed.
+
 
+
This is not always necessary, but if you have a command that splits many lines of output, you need to either selectively present important lines or separate output from input. In general, it is better to split keyboard input and screen output.
+
 
+
=== Lists ===
+
 
+
There are two types of lists. Unordered lists (bulleted lists) that have no apparent order of items, and ordered lists which introduce numbering and thus order the list items.
+
 
+
You should generally use unordered lists as long as the order in which items appear is not the primary concern.
+
 
+
For example:
+
 
+
Pacman is used for:
+
# installing packages
+
# removing packages
+
# updating the local package database
+
# keeping the system up-to-date
+
 
+
The list above is wrong. It should have been a bulleted list, like this:
+
 
+
Pacman is used for:
+
* installing packages
+
* removing packages
+
* updating the local package database
+
* keeping the system up-to-date
+
 
+
Next example is an ordered list:
+
 
+
To update your system:
+
# remove packages you do not need so they won't get downloaded and updated
+
# update the system by issuing ''pacman -Syu'' command
+
# (in some cases) reboot your system for some changes to take place
+
 
+
Ordered lists are sometimes also used when you have a whole bunch of items and you need to show exactly how many items are present in the list:
+
 
+
There are four methods to do XYZ:
+
# Method A
+
# Method B
+
# Method C
+
# Method D
+
 
+
== Style ==
+
 
+
Although there is no particular writing style requirement on ArchWiki, you still need to keep in mind the following:
+
 
+
* All articles are read by all users, so you need to understand that some things you say may not always be clear to everybody. Sometimes you need to explain some well known facts in plain (insert your language here). If necessary, point readers to resources that may clear up your statements.
+
* You have to keep in mind that you are talking to a wide audience. Talk to readers (you, the readers).
+
* '''This part of this article has to be expanded by the community to form the basis of a complete style guide.'''
+
 
+
 
+
== Conclusion ==
+
 
+
Conclusion (title may vary depending on the template) is the part of an article that gives directions for further investigation, reading, testing, etc. It may also give some auxiliary info not strictly on-topic. In my example of XYZ modem installation, this part of the article may contain some general info on XYZ modems, like manufacturer website, XYZ modem users forum, a thread in the Arch forums discussing the device, XYZ modem technical data, etc.
+

Revision as of 10:30, 11 October 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Carddavmate is a carddav client that runs in a web browser using javascript. It is useful when you have a carddav server and want to access the contacts on this server with only a web browser.

This guide shows you how to install carddavmate to use with davical

Installation

Install carddavmateAUR from the AUR. After that, config.js needs to be configured, as well as httpd-carddavmate.conf. Then, httpd-carddavmate.conf needs to be included in the apache config, and apache needs to be restarted.

Configuration

Password Protection

Password protection is implemented using apache's htpasswd facility. The relevant file that includes the authentification credentials is at /srv/http/carddavmate/htpasswd.

You may delete the file or remove the "test" account by deleting the line from the file.

To add your own user, use this:

$ sudo htpasswd /srv/http/carddavmate/htpasswd

add "-c" after htpasswd if you deleted the file "htpasswd".

configuring the carddav server

add the carddav server to your config by editing /srv/http/carddavmate/config.js

An example is better than a thousand words, so here is an example that works for me:

var globalSettings=[{href: 'https://carddav.example.com:443/caldav.php/joe/', userAuth: {userName: 'joe', userPassword: 'secret', serverPassword: false}, timeOut: 14000}];

configuring apache

To "serve" the /srv/http/carddavmate directory properly, you need to include /etc/httpd/conf/extra/httpd-carddavmate.conf in your apache configuration. To do this, add the following line to /etc/httpd/conf/httpd.conf

Include conf/extra/httpd-carddavmate.conf

Also, you need to edit httpd-carddavmate.conf to reflect the url where carddavmate is installed. An example would be:

Header always set Access-Control-Allow-Origin "https://carddavmate.example.com"

You can save this file and the restart apache by issuing

$ sudo rc.d restart httpd

Testing

To test your installation, browse to https://127.0.0.1/carddavmate and see if your carddav data shows up.

This was tested in chrome and worked fine, ymmv for firefox and others.

Troubleshooting

Troubleshooting is best done using chrome's built-in javascript console

Security

Since the client is a javascript program that runs in your browser, the username/password that is configured in config.js on the server is also in the browser and can be easily seen. To avoid issues, clear your browser cache to delete the compromising files after you are done.