Difference between revisions of "Carddavmate"

From ArchWiki
Jump to: navigation, search
m (Created page with "Category: Networking Software : This guide shows you how to install carddavmate to use with davical = Introduction = Carddavmate is a carddav client that runs in a web bro...")
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category: Networking Software]]
+
[[Category:Networking]]
 +
[http://www.inf-it.com/ 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
+
This guide shows you how to install carddavmate to use with davical
 
+
= Introduction =
+
 
+
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.
+
 
+
= Main discussion =
+
 
+
The easiest way to install is using yaourt. 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.
+
  
 
== Installation ==
 
== Installation ==
  
$ yaourt carddavmate
+
Install {{AUR|carddavmate}} 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 ==
 
== 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.
  
=== Italics ===
+
You may delete the file or remove the "test" account by deleting the line from the file.
 
+
Italics are commonly used to mark a citation, titles, messages that are displayed on screen, and so on.
+
 
+
On ArchWiki, italics should be used to present:
+
 
+
* Something that someone said.
+
* A quotation from an article (possibly followed by a link)
+
* Screen output
+
* Keyboard input
+
 
+
Example of italics: ''This text is in italics''
+
 
+
=== Bold ===
+
 
+
Bold text is used to give strong emphasis to parts of text.
+
 
+
On ArchWiki, bold text should be used to present:
+
 
+
* Important warnings and notes
+
* Must-follow instructions
+
* Notes to readers such as "This part of the article is incomplete".
+
 
+
Do not apply bold to entire paragraphs.
+
 
+
Example of bold text: '''Some bold text'''
+
 
+
An example of a note:
+
 
+
'''NOTE:''' This article is still under development.
+
 
+
=== Code box ===
+
 
+
Code boxes are typically used to present parts of source code, screen output, input.
+
 
+
On ArchWiki, code box should be used to:
+
 
+
* present parts of configuration files
+
* 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:
+
 
+
Error code 103
+
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).
+
 
+
 
+
In order to execute pacman system update you need to type in:
+
 
+
pacman -Syu
+
 
+
(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.)
+
 
+
'''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:
+
To add your own user, use this:
  
error inserting module fglrx.ko
+
$ sudo htpasswd /srv/http/carddavmate/htpasswd
  
Then you're screwed.
+
add "-c" after htpasswd if you deleted the file "htpasswd".
  
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.
+
=== configuring the carddav server ===
  
=== Lists ===
+
add the carddav server to your config by editing /srv/http/carddavmate/config.js
  
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.
+
An example is better than a thousand words, so here is an example that works for me:
  
You should generally use unordered lists as long as the order in which items appear is not the primary concern.
+
var globalSettings=[{href: 'https://carddav.example.com:443/caldav.php/joe/', userAuth: {userName: 'joe', userPassword: 'secret', serverPassword: false}, timeOut: 14000}];
  
For example:
+
=== configuring apache ===
  
Pacman is used for:
+
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
# 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:
+
Include conf/extra/httpd-carddavmate.conf
  
Pacman is used for:
+
Also, you need to edit httpd-carddavmate.conf to reflect the url where carddavmate is installed. An example would be:
* installing packages
+
* removing packages
+
* updating the local package database
+
* keeping the system up-to-date
+
  
Next example is an ordered list:
+
Header always set Access-Control-Allow-Origin "https://carddavmate.example.com"
  
To update your system:
+
You can save this file and the restart apache by issuing
# 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:
+
$ sudo rc.d restart httpd
  
There are four methods to do XYZ:
+
=== Testing ===
# Method A
+
# Method B
+
# Method C
+
# Method D
+
  
== Style ==
+
To test your installation, browse to https://127.0.0.1/carddavmate and see if your carddav data shows up.
  
Although there is no particular writing style requirement on ArchWiki, you still need to keep in mind the following:
+
This was tested in chrome and worked fine, ymmv for firefox and others.
  
* 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.
+
=== Troubleshooting ===
* 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.'''
+
  
 +
Troubleshooting is best done using chrome's built-in javascript console
  
= Conclusion =
+
=== Security ===
  
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.
+
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.

Revision as of 15:35, 13 June 2012

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.