emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Script: convert Tomboy/GNote XML to org-mode
@ 2011-08-01 18:23 attila
  2011-08-03 16:48 ` Darlan Cavalcante Moreira
  2011-08-14 17:10 ` Bastien
  0 siblings, 2 replies; 8+ messages in thread
From: attila @ 2011-08-01 18:23 UTC (permalink / raw)
  To: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA384

Pardon me if this isn't the right place to post this, but I couldn't
figure out where else to do so.  I'm moving my note-taking from GNote
(C++ rewrite of Tomboy Notes) to org-mode.  As I have a lot of notes all
over the place, I wrote a script to convert from the XML format used by
the Tomboy-style tools to org-mode.  You can find it here:

    https://github.com/StAlphonsos/scriptologie

It could be improved in a lot of ways but it got me out of GNote, so
that's something.  If my feeble attempts to preserve meta-data about the
notes as org-mode properties offends anyone I heartily welcome you to
help me fix it, along with anything else you can think of...

Org mode is great.  Thanks.

I'm not subscribed to this list so please respond directly to me.

         --A
- -- 
attila@stalphonsos.com | 0x4FFCBB9C | hack("free") or die;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEAREJAAYFAk427xMACgkQr88iLU/8u5ykkwCfTQ47zG4xgwu+MXzZ+S6pCjef
aZoAniwxMM6egiBQZZAEaW1K1McNgitO
=goIo
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Script: convert Tomboy/GNote XML to org-mode
  2011-08-01 18:23 Script: convert Tomboy/GNote XML to org-mode attila
@ 2011-08-03 16:48 ` Darlan Cavalcante Moreira
  2011-08-03 17:49   ` Achim Gratz
  2011-08-03 19:10   ` attila
  2011-08-14 17:10 ` Bastien
  1 sibling, 2 replies; 8+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-08-03 16:48 UTC (permalink / raw)
  To: attila; +Cc: emacs-orgmode


Thanks for sharing this. I've wanted to convert my tomboy notes to org-mode
for some time.

I downloaded the script and tried to run it with
: ./tomboy2org.pl -help
but I got the error message below
--8<---------------cut here---------------start------------->8---
Can't locate Text/Format.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./tomboy2org.pl line 44.
BEGIN failed--compilation aborted at ./tomboy2org.pl line 44.
--8<---------------cut here---------------end--------------->8---

Maybe I need to install some library, but I know nothing about Perl to fix
this myself.

--
Darlan

At Mon, 01 Aug 2011 13:23:25 -0500,
attila <attila@stalphonsos.com> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA384
> 
> Pardon me if this isn't the right place to post this, but I couldn't
> figure out where else to do so.  I'm moving my note-taking from GNote
> (C++ rewrite of Tomboy Notes) to org-mode.  As I have a lot of notes all
> over the place, I wrote a script to convert from the XML format used by
> the Tomboy-style tools to org-mode.  You can find it here:
> 
>     https://github.com/StAlphonsos/scriptologie
> 
> It could be improved in a lot of ways but it got me out of GNote, so
> that's something.  If my feeble attempts to preserve meta-data about the
> notes as org-mode properties offends anyone I heartily welcome you to
> help me fix it, along with anything else you can think of...
> 
> Org mode is great.  Thanks.
> 
> I'm not subscribed to this list so please respond directly to me.
> 
>          --A
> - -- 
> attila@stalphonsos.com | 0x4FFCBB9C | hack("free") or die;
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEAREJAAYFAk427xMACgkQr88iLU/8u5ykkwCfTQ47zG4xgwu+MXzZ+S6pCjef
> aZoAniwxMM6egiBQZZAEaW1K1McNgitO
> =goIo
> -----END PGP SIGNATURE-----
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Script: convert Tomboy/GNote XML to org-mode
  2011-08-03 16:48 ` Darlan Cavalcante Moreira
@ 2011-08-03 17:49   ` Achim Gratz
  2011-08-03 19:10   ` attila
  1 sibling, 0 replies; 8+ messages in thread
From: Achim Gratz @ 2011-08-03 17:49 UTC (permalink / raw)
  To: emacs-orgmode

Darlan Cavalcante Moreira <darcamo@gmail.com> writes:
> I downloaded the script and tried to run it with
> : ./tomboy2org.pl -help
> but I got the error message below
> Can't locate Text/Format.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./tomboy2org.pl line 44.
> BEGIN failed--compilation aborted at ./tomboy2org.pl line 44.
>
> Maybe I need to install some library, but I know nothing about Perl to fix
> this myself.

$ perl -MCPAN -e 'install Text::Format'


HTH,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Script: convert Tomboy/GNote XML to org-mode
  2011-08-03 16:48 ` Darlan Cavalcante Moreira
  2011-08-03 17:49   ` Achim Gratz
@ 2011-08-03 19:10   ` attila
  2011-08-10 17:01     ` Darlan Cavalcante Moreira
  1 sibling, 1 reply; 8+ messages in thread
From: attila @ 2011-08-03 19:10 UTC (permalink / raw)
  To: Darlan Cavalcante Moreira; +Cc: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA384

On 08/03/2011 11:48 AM, Darlan Cavalcante Moreira wrote:
> 
> Thanks for sharing this. I've wanted to convert my tomboy notes to org-mode
> for some time.
> 
> I downloaded the script and tried to run it with
> : ./tomboy2org.pl -help
> but I got the error message below
> --8<---------------cut here---------------start------------->8---
> Can't locate Text/Format.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./tomboy2org.pl line 44.
> BEGIN failed--compilation aborted at ./tomboy2org.pl line 44.
> --8<---------------cut here---------------end--------------->8---
> 
> Maybe I need to install some library, but I know nothing about Perl to fix
> this myself.

Hi, thanks for pointing this out.  I should make the dependencies
explicit at least in the README, but to be clear they are:

    XML::Twig
    Text::Format

The other modules I depend on are (almost?) always installed by
default, at least in every Perl installation I've seen recently:

    Pod::Usage
    Sys::Hostname;
    IO::File;
    POSIX;

You don't say what platform you are using so I can't tell you exactly
how to get any missing modules installed for your situation, but here's
a stab at it:

Debian names the packages for Perl modules something like
    lib<name-of-module-in-lowercase-with-hyphens>-perl
so Text::Format becomes libtext-format-perl.

On Ubuntu Linux and other Debian-derived Linux distros you therefore
do something like this to get this package installed:

  $ sudo apt-get install libtext-format-perl

If the above doesn't apply to you and your system has the cpan command
installed, you can also do this:

  $ sudo cpan -i Text::Format

The second solution above will probably work on modern releases of
your favorite BSD Unix flavor; I just checked on OpenBSD and NetBSD
systems I have access to and they both have this command.

If you are not much for Unix system administration, the "sudo" command
gives you temporary administrative powers for the purposes of a single
command; your mileage may vary depending on your situation.

Finally, if all else fails Text::Format is available from CPAN here:


http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/Text-Format-0.53.tar.gz

The usual recipe (after you've downloaded that file however) is:

  $ tar zxvf /path/to/Text-Format-0.53.tar.gz
  $ cd Text-Format-0.53
  $ perl Makefile.PL
  $ make
  $ make test
  # assuming make test does not kick out any errors:
  $ sudo make install

> --
> Darlan

Hope this helps.

Pax, --A
- -- 
attila@stalphonsos.com | 0x4FFCBB9C | hack("free") or die;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEAREJAAYFAk45nP8ACgkQr88iLU/8u5x/7gCfbhrB3eE9CkgBsD2c+3K3xMBG
EmAAnjK/TH3vNAjSum13eA1n02qKnjxW
=2cBx
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Script: convert Tomboy/GNote XML to org-mode
  2011-08-03 19:10   ` attila
@ 2011-08-10 17:01     ` Darlan Cavalcante Moreira
  2011-08-10 18:43       ` attila
  0 siblings, 1 reply; 8+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-08-10 17:01 UTC (permalink / raw)
  To: attila; +Cc: emacs-orgmode


Thanks for the instructions, and sorry for the late reply.  I'm using
Ubuntu 11.04 and I was able to run the script after installing
libtext-format-perl as you have instructed.

I have found one problem that prevents me from converting my notes
correctly, though. In tomboy I have many notes where I use "*" as bullet
item in the body starting in the first column. These bullet items are then
interpreted as level-1 headings in the final notes.org file. This can be
solved by indenting the body content of each converted note. Org-mode will
then interpret the items as actual items instead of headlines.

Also, tomboy doesn't really support tags. It only allows you to group
notes. I think this maps better as the CATEGORY property in org-mode,
instead of a TAGS property. But that's just my opinion.

--
Darlan

At Wed, 03 Aug 2011 14:10:14 -0500,
attila <attila@stalphonsos.com> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA384
> 
> On 08/03/2011 11:48 AM, Darlan Cavalcante Moreira wrote:
> > 
> > Thanks for sharing this. I've wanted to convert my tomboy notes to org-mode
> > for some time.
> > 
> > I downloaded the script and tried to run it with
> > : ./tomboy2org.pl -help
> > but I got the error message below
> > --8<---------------cut here---------------start------------->8---
> > Can't locate Text/Format.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./tomboy2org.pl line 44.
> > BEGIN failed--compilation aborted at ./tomboy2org.pl line 44.
> > --8<---------------cut here---------------end--------------->8---
> > 
> > Maybe I need to install some library, but I know nothing about Perl to fix
> > this myself.
> 
> Hi, thanks for pointing this out.  I should make the dependencies
> explicit at least in the README, but to be clear they are:
> 
>     XML::Twig
>     Text::Format
> 
> The other modules I depend on are (almost?) always installed by
> default, at least in every Perl installation I've seen recently:
> 
>     Pod::Usage
>     Sys::Hostname;
>     IO::File;
>     POSIX;
> 
> You don't say what platform you are using so I can't tell you exactly
> how to get any missing modules installed for your situation, but here's
> a stab at it:
> 
> Debian names the packages for Perl modules something like
>     lib<name-of-module-in-lowercase-with-hyphens>-perl
> so Text::Format becomes libtext-format-perl.
> 
> On Ubuntu Linux and other Debian-derived Linux distros you therefore
> do something like this to get this package installed:
> 
>   $ sudo apt-get install libtext-format-perl
> 
> If the above doesn't apply to you and your system has the cpan command
> installed, you can also do this:
> 
>   $ sudo cpan -i Text::Format
> 
> The second solution above will probably work on modern releases of
> your favorite BSD Unix flavor; I just checked on OpenBSD and NetBSD
> systems I have access to and they both have this command.
> 
> If you are not much for Unix system administration, the "sudo" command
> gives you temporary administrative powers for the purposes of a single
> command; your mileage may vary depending on your situation.
> 
> Finally, if all else fails Text::Format is available from CPAN here:
> 
> 
> http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/Text-Format-0.53.tar.gz
> 
> The usual recipe (after you've downloaded that file however) is:
> 
>   $ tar zxvf /path/to/Text-Format-0.53.tar.gz
>   $ cd Text-Format-0.53
>   $ perl Makefile.PL
>   $ make
>   $ make test
>   # assuming make test does not kick out any errors:
>   $ sudo make install
> 
> > --
> > Darlan
> 
> Hope this helps.
> 
> Pax, --A
> - -- 
> attila@stalphonsos.com | 0x4FFCBB9C | hack("free") or die;
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEAREJAAYFAk45nP8ACgkQr88iLU/8u5x/7gCfbhrB3eE9CkgBsD2c+3K3xMBG
> EmAAnjK/TH3vNAjSum13eA1n02qKnjxW
> =2cBx
> -----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Script: convert Tomboy/GNote XML to org-mode
  2011-08-10 17:01     ` Darlan Cavalcante Moreira
@ 2011-08-10 18:43       ` attila
  2011-08-11 18:26         ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 8+ messages in thread
From: attila @ 2011-08-10 18:43 UTC (permalink / raw)
  To: Darlan Cavalcante Moreira; +Cc: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA384

On 08/10/2011 12:01 PM, Darlan Cavalcante Moreira wrote:
> 
>[snip]
> I have found one problem that prevents me from converting my notes
> correctly, though. In tomboy I have many notes where I use "*" as bullet
> item in the body starting in the first column. These bullet items are then
> interpreted as level-1 headings in the final notes.org file. This can be
> solved by indenting the body content of each converted note. Org-mode will
> then interpret the items as actual items instead of headlines.

Good point.  I had some issues with a couple of notes and had not yet
realized that the problem is the very one you're pointing out until
just now.  Thanks.  Check in on that github repository later in the
day or tomorrow and it should be fixed.

> 
> Also, tomboy doesn't really support tags. It only allows you to group
> notes. I think this maps better as the CATEGORY property in org-mode,
> instead of a TAGS property. But that's just my opinion.

The Tomboy XML markup places the "notebook" (category) in a section
labeled "tags" like so:

  <tags>
   <tag>notebook-name</tag>
  </tags>

I just transliterated to orgmode.  Upon reflection I think you're
right - what Tomboy means by this is more properly what orgmode means
by CATEGORY.  I'll make this configurable in the next version and make
the default CATEGORY.  In general my handling of properties could be
more configurable.  I am not yet sophisticated enough in my use of
orgmode to do anything interesting with drawers or properties but I'm
starting to think of ways to use them...

> --
> Darlan

Pax, --A
- -- 
attila@stalphonsos.com | 0x4FFCBB9C | hack("free") or die;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEAREJAAYFAk5C0T4ACgkQr88iLU/8u5wIGwCfY1iW8QgXFGW18J5hkrD+MTh9
8J0An0FHfo7JLcOTpKjDSQHktrcNviV9
=YKJH
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Script: convert Tomboy/GNote XML to org-mode
  2011-08-10 18:43       ` attila
@ 2011-08-11 18:26         ` Darlan Cavalcante Moreira
  0 siblings, 0 replies; 8+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-08-11 18:26 UTC (permalink / raw)
  To: attila; +Cc: emacs-orgmode


By using the indent option everything seems to work just fine. I noticed
that the PROPERTIES block is not indented, but that is not an issue. I can
already move from tomboy to org, but I will test any future version of
tomboy2org.

Thanks,
Darlan



At Wed, 10 Aug 2011 13:43:22 -0500,
attila <attila@stalphonsos.com> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA384
> 
> On 08/10/2011 12:01 PM, Darlan Cavalcante Moreira wrote:
> > 
> >[snip]
> > I have found one problem that prevents me from converting my notes
> > correctly, though. In tomboy I have many notes where I use "*" as bullet
> > item in the body starting in the first column. These bullet items are then
> > interpreted as level-1 headings in the final notes.org file. This can be
> > solved by indenting the body content of each converted note. Org-mode will
> > then interpret the items as actual items instead of headlines.
> 
> Good point.  I had some issues with a couple of notes and had not yet
> realized that the problem is the very one you're pointing out until
> just now.  Thanks.  Check in on that github repository later in the
> day or tomorrow and it should be fixed.
> 
> > 
> > Also, tomboy doesn't really support tags. It only allows you to group
> > notes. I think this maps better as the CATEGORY property in org-mode,
> > instead of a TAGS property. But that's just my opinion.
> 
> The Tomboy XML markup places the "notebook" (category) in a section
> labeled "tags" like so:
> 
>   <tags>
>    <tag>notebook-name</tag>
>   </tags>
> 
> I just transliterated to orgmode.  Upon reflection I think you're
> right - what Tomboy means by this is more properly what orgmode means
> by CATEGORY.  I'll make this configurable in the next version and make
> the default CATEGORY.  In general my handling of properties could be
> more configurable.  I am not yet sophisticated enough in my use of
> orgmode to do anything interesting with drawers or properties but I'm
> starting to think of ways to use them...
> 
> > --
> > Darlan
> 
> Pax, --A
> - -- 
> attila@stalphonsos.com | 0x4FFCBB9C | hack("free") or die;
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEAREJAAYFAk5C0T4ACgkQr88iLU/8u5wIGwCfY1iW8QgXFGW18J5hkrD+MTh9
> 8J0An0FHfo7JLcOTpKjDSQHktrcNviV9
> =YKJH
> -----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Script: convert Tomboy/GNote XML to org-mode
  2011-08-01 18:23 Script: convert Tomboy/GNote XML to org-mode attila
  2011-08-03 16:48 ` Darlan Cavalcante Moreira
@ 2011-08-14 17:10 ` Bastien
  1 sibling, 0 replies; 8+ messages in thread
From: Bastien @ 2011-08-14 17:10 UTC (permalink / raw)
  To: attila; +Cc: emacs-orgmode

Hi Attila,

attila <attila@stalphonsos.com> writes:

>     https://github.com/StAlphonsos/scriptologie

Thanks for this -- I have added a section to the Org-tools page 
on Worg:

  http://orgmode.org/worg/org-tools/index.html

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-08-14 18:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-01 18:23 Script: convert Tomboy/GNote XML to org-mode attila
2011-08-03 16:48 ` Darlan Cavalcante Moreira
2011-08-03 17:49   ` Achim Gratz
2011-08-03 19:10   ` attila
2011-08-10 17:01     ` Darlan Cavalcante Moreira
2011-08-10 18:43       ` attila
2011-08-11 18:26         ` Darlan Cavalcante Moreira
2011-08-14 17:10 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).