Imported Upstream version 1.3.0
[platform/upstream/augeas.git] / lenses / gtkbookmarks.aug
1 (*
2 Module: GtkBookmarks
3   Parses $HOME/.gtk-bookmarks
4
5 Author: Raphael Pinson <raphael.pinson@camptocamp.com>
6
7 About: License
8    This file is licenced under the LGPL v2+, like the rest of Augeas.
9
10 About: Lens Usage
11    To be documented
12
13 About: Configuration files
14    This lens applies to $HOME/.gtk-bookmarks. See <filter>.
15
16 About: Examples
17    The <Test_GtkBookmarks> file contains various examples and tests.
18 *)
19 module GtkBookmarks =
20
21 autoload xfm
22
23 (* View: empty
24    Comment are not allowed, even empty comments *)
25 let empty = Util.empty_generic Rx.opt_space
26
27 (* View: entry *)
28 let entry = [ label "bookmark" . store Rx.no_spaces
29             . (Sep.space . [ label "label" . store Rx.space_in ])?
30             . Util.eol ]
31
32 (* View: lns *)
33 let lns = (empty | entry)*
34
35 (* View: xfm *)
36 let xfm = transform lns (incl (Sys.getenv("HOME") . "/.gtk-bookmarks"))