Package: galeon
Version: 1.3.19-1
Severity: normal

Working in the bookmark editor, including deleting folders, moving
folders and bookmarks, and editing bookmarks, results in CVS- (and
human-)unfriendly XML in the bookmarks.xbel file. Specifically, a lot of
the file gets rolled up into single lines. This causes no end of
conflicts upon check-in.

Ideally, the XML should be nested to make it more human-readable (as it
once was!), but I'll take a single XML element per line.

Checking in bookmarks is extremely useful to help one keep one's
bookmarks consistent across many machines.

I wrote the following quick hack to modify the bookmarks before
check-in which might help someone else with this issue until this is
fixed.

Thanks!


#! /usr/bin/perl -w

use File::Copy;

my $bookmarks = 'bookmarks.xbel';
my $tmp = "/tmp/bmfix$$";

open(FILE, "$bookmarks") || die("Could not open $bookmarks: $!\n");
open(OUT, ">$tmp");

while (<FILE>) {
    if (/^$/) {
        next;
    }
    if (/<\?xml version="1.0"\?>/) {
        print(OUT);
        next;
    }
    if 
(/<(galeon_xbel_version|time_[a-z_]+>|title|pixmap|nick|create_toolbar|smarturl)>/
 ) {
        # Special cases; must be on one line.
        
s|(.+)(<galeon_xbel_version>[0-9]+</galeon_xbel_version>)(.+)|$1\n$2\n$3|;
        s|(.+)(<time_[a-z_]+>[0-9]+</time_[a-z_]+>)(.+)|$1\n$2\n$3|;
        s|(.+)(<title>[^<]+</title>)(.+)|$1\n$2\n$3|;
        s|(.+)(<pixmap>[^<]+</pixmap>)(.+)|$1\n$2\n$3|;
        s|(.+)(<nick>[^<]+</nick>)(.+)|$1\n$2\n$3|;
        s|(.+)(<create_toolbar>[^<]+</create_toolbar>)(.+)|$1\n$2\n$3|;
        s|(.+)(<smarturl>[^<]+</smarturl>)(.+)|$1\n$2\n$3|;
    } else {
        s|(.+)(<[^/][^>]*>)(.+)|$1\n$2\n$3|g;   # start tag
        s|(.+)(</[^>]*>)(.+)|$1\n$2\n$3|g;      # start tag
    }
    if (/^$/) {
        next;
    }
    print(OUT);
}

close(FILE);
close(OUT);

move($tmp, $bookmarks) || die("Could not update $bookmarks: $!\n");

0;


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (600, 'testing'), (80, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) (ignored: LC_ALL set to 
en_US)

Versions of packages galeon depends on:
ii  debconf                  1.4.30.11       Debian configuration management sy
ii  galeon-common            1.3.19-1        GNOME web browser for advanced use
ii  gconf2                   2.8.1-4         GNOME configuration database syste
ii  gnome-control-center     1:2.8.1-3       The GNOME Control Center for GNOME
ii  libart-2.0-2             2.3.16-6        Library of functions for 2D graphi
ii  libatk1.0-0              1.8.0-4         The ATK accessibility toolkit
ii  libaudiofile0            0.2.6-5         Open-source version of SGI's audio
ii  libbonobo2-0             2.8.0-4         Bonobo CORBA interfaces library
ii  libbonoboui2-0           2.8.0-2         The Bonobo UI library
ii  libc6                    2.3.2.ds1-20    GNU C Library: Shared libraries an
ii  libeel2-2                2.8.2-1         Eazel Extensions Library (for GNOM
ii  libesd-alsa0 [libesd0]   0.2.35-2        Enlightened Sound Daemon (ALSA) - 
ii  libgail-common           1.8.2-1         GNOME Accessibility Implementation
ii  libgail17                1.8.2-1         GNOME Accessibility Implementation
ii  libgcc1                  1:3.4.3-6       GCC support library
ii  libgconf2-4              2.8.1-4         GNOME configuration database syste
ii  libgcrypt11              1.2.0-4         LGPL Crypto library - runtime libr
ii  libglade2-0              1:2.4.1-1       Library to load .glade files at ru
ii  libglib2.0-0             2.6.1-3         The GLib library of C routines
ii  libgnome-keyring0        0.4.1-1         GNOME keyring services library
ii  libgnome2-0              2.8.0-6         The GNOME 2 library - runtime file
ii  libgnomecanvas2-0        2.8.0-1         A powerful object-oriented display
ii  libgnomeui-0             2.8.0-3         The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0           2.8.3-9         The GNOME virtual file-system libr
ii  libgnutls11              1.0.16-9        GNU TLS library - runtime library
ii  libgpg-error0            1.0-1           library for common error values an
ii  libgtk2.0-0              2.4.14-2        The GTK+ graphical user interface 
ii  libhowl0                 0.9.8-2         Library for Zeroconf service disco
ii  libice6                  4.3.0.dfsg.1-10 Inter-Client Exchange library
ii  libjpeg62                6b-9            The Independent JPEG Group's JPEG 
ii  libnautilus2-2           2.8.2-2         libraries for nautilus components 
ii  liborbit2                1:2.10.2-1.1    libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0            1.6.0-3         Layout and rendering of internatio
ii  libpopt0                 1.7-5           lib for parsing cmdline parameters
ii  libsm6                   4.3.0.dfsg.1-10 X Window System Session Management
ii  libstdc++5               1:3.3.5-5       The GNU Standard C++ Library v3
ii  libtasn1-2               0.2.10-3        Manage ASN.1 structures (runtime)
ii  libx11-6                 4.3.0.dfsg.1-10 X Window System protocol client li
ii  libxext6                 4.3.0.dfsg.1-10 X Window System miscellaneous exte
ii  libxml2                  2.6.11-5        GNOME XML library
ii  libxrender1              0.8.3-7         X Rendering Extension client libra
ii  mozilla-browser          2:1.7.5-1       The Mozilla Internet application s
ii  procps                   1:3.2.1-2       The /proc file system utilities
ii  scrollkeeper             0.3.14-9.1      A free electronic cataloging syste
ii  xlibs                    4.3.0.dfsg.1-10 X Keyboard Extension (XKB) configu
ii  zlib1g                   1:1.2.2-3       compression library - runtime

-- no debconf information

-- 
Bill Wohler <[EMAIL PROTECTED]>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to