BQ Aquaris E 4.5 Ubuntu phone
  • Initial page
  • LANGS
  • Cosas que he aprendido al usar el teléfono BQ Aquaris E4.5, basado en Ubuntu
    • Summary
    • ¿Cómo configurar el acceso por SSH al teléfono a través de Wi-Fi?
    • Using IRC - the weechat application
    • El menú para comprobar el hardware
    • Compiling the MUA mutt and making a click app of it (UNFINISHED)
    • El cliente de correo Dekko
    • Compiling the Telegram client "telegram-cli" in the jail
    • Mandar mensajes SMS desde la línea de comandos (shell)
    • Installing an additional root FS and run 'mutt'
    • Desarrollar aplicaciones y el SDK (no revisado hasta ahora)
    • Instalación del firmware en el teléfono
    • Cambiar las aplicaciones (core-apps) mostradas en scope de aplicaciones
    • Historial del navegador Web
    • Acceso a registro (logs) del dispositivo BQ
    • Enlaces útiles
    • Histórico de llamadas y SMS
    • Cambiar las teclas de control de la aplicación de terminal
    • Importar y exportar contactos
    • Red inalámbrica: Usar el teléfono como punto de acceso (hotspot) a Internet
    • Leer contenido local de HTML con un navegador
    • Eliminar la información privada
    • Configuración en el ordenador(Linux/FreeBSD) usando el móvil conectado a Internet con tethering por
    • Other usefull commands (unsorted)
    • Reiniciar el escritorio Unity
    • Lanzar apps desde la línea de comandos del usuario phablet(shell)
    • Cortafuegos
    • Using ubuntu-device-flash
    • El archivo de configuración del GPRS
    • ssh localhost
    • Grabar la pantalla del teléfono(MIR) para presentaciones, charlas, etcétera hacia un ordenador(X11)
    • Exporting notes from app 'reminder'
    • Tareas de Cron
    • chapter30
    • GPS, maps && apps (uNav)
    • Red por USB: tethering
    • Notas sobre algunos aspectos del hardware
    • Dónde quedan guardados los ficheros (imágenes, documentos, etc.)
  • What I have learned about the Ubuntu mobile phone BQ Aquaris E4.5
    • Exporting notes from app 'reminder'
    • Cron jobs
    • chapter30
    • Summary
    • Using IRC - the weechat application
    • Import and export of Contacts
    • Wireles networking: The BQ as an AccessPoint (hotspot)
    • Some hints for your Linux/FreeBSD netbook using the BQ with USB tethering as a router to Internet
    • Firewall
    • Hardware test menus
    • Capturing the MIR screen for presentation, talks etc. on a X11 desktop
    • Compiling the MUA mutt and making a click app of it (UNFINISHED)
    • The MailUserAgent (MUA) Dekko
    • GPS, maps && apps (uNav)
    • Compiling the Telegram client "telegram-cli" in the jail
    • Sending SMS from shell
    • USB networking: tethering
    • Installing an additional root FS and run 'mutt'
    • Developmen and SDK (completely UNTESTED until now)
    • Notes about some hardware aspects
    • Flashing the device
    • How to alter presented apps in the app scope
    • Where the files (pictures, ...) end up
    • Webbrowser history
    • Access to logs in the device
    • How to get SSH access to the ubuntu-phone via Wifi
    • Usefull links
    • Call and SMS history
    • Reading local HTML content with a browser
    • Sanitisation
    • How to alter presented keyboard's Control keys
    • Other usefull commands (unsorted)
    • Restart the Unity UI
    • How to lauch apps from the phablet's cmd line
    • Using ubuntu-device-flash
    • GPRS config file
    • ssh localhost
Powered by GitBook
On this page

Was this helpful?

  1. What I have learned about the Ubuntu mobile phone BQ Aquaris E4.5

Exporting notes from app 'reminder'

The app 'reminders' (spanish name 'Notas') stores the notes in the directory ~/.local/share/com.ubuntu.reminders/@local as:

$ cat notes.cache
[notebooks]
4d853cee-9476-4e19-82fe-5f577b01698e=2

[notes]
a0ae2c53-1c7d-4d2a-b1c5-ea876e3f4ca1=10
da5e2110-d1a8-4470-a8bc-d5115720db57=21
efc58768-d28a-4df0-9e41-4893e5c2af54=2

deleted notes stay in the directory, like this one:

note-09f23799-df97-40f9-b4ff-6835688ed644.enml  (a deleted one)

they are just not referenced in the notes.cache file, like this one which is still valid:

note-efc58768-d28a-4df0-9e41-4893e5c2af54.enml  (a valid one)

for every note exist two files, a .info file and the note itself in .enml file:

$ ls -C1
note-09f23799-df97-40f9-b4ff-6835688ed644.enml
note-09f23799-df97-40f9-b4ff-6835688ed644.info
note-a0ae2c53-1c7d-4d2a-b1c5-ea876e3f4ca1.enml
note-a0ae2c53-1c7d-4d2a-b1c5-ea876e3f4ca1.info
notebook-4d853cee-9476-4e19-82fe-5f577b01698e.info
note-da5e2110-d1a8-4470-a8bc-d5115720db57.enml
note-da5e2110-d1a8-4470-a8bc-d5115720db57.info
note-efc58768-d28a-4df0-9e41-4893e5c2af54.enml
note-efc58768-d28a-4df0-9e41-4893e5c2af54.info
notes.cache

the *.enml files contain the notes itself, HTML snipsets packed in XML, text is in UTF-8 encoded (enotacion format):

$ cat note-efc58768-d28a-4df0-9e41-4893e5c2af54.enml
<?xml version="1.0"?><!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; padding-left:0px; text-indent:0px;"><br/></p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; padding-left:0px; text-indent:0px;">9 de septiembre</p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; padding-left:0px; text-indent:0px;"><br/></p>
<ul><li>día de compras en la tienda de la Coop. Possidenti Oliveti Limone sul Garda, por unos 88 euro aceite del lugar, vino, etc.</li>
<li>gasolinera 43 euro, debe alcanzar la casa,</li>
<li>...<br/></li></ul></en-note>

as the titel of the note is stored in the *.info file, it is a good idea to repeat the title in the note itself, for example if you have one note for any day, as I did showed it here with title "9 de septiembre";

#include <QCoreApplication>
#include <QSettings>
#include <QDebug>
#include <QDateTime>
#include <QStringList>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    if (a.arguments().count() < 2) {
        qDebug() << "Error: No info file given";
        qDebug() << "usage:" << a.arguments().at(0) << "<infofile>";
        return 1;
    }
    qDebug() << "File:" << a.arguments().at(1);
    QSettings s(a.arguments().at(1), QSettings::IniFormat);
    qDebug() << "Title:" << s.value("title").toString();
    // qDebug() << "Tagline:" << s.value("tagline").toString().trimmed();
    qDebug() << "Created:" << s.value("created").toDateTime().toString("yyyy-MM-dd");
    qDebug() << "Updated:" << s.value("updated").toDateTime().toString("yyyy-MM-dd");
    // qDebug() << "Created:" << s.value("created").toString();
    // qDebug() << "Created:" << s.value("created").toDateTime().toMSecsSinceEpoch()/1000;
    return 0;
}

I compiled this in my chroot'ed env an use it together with a small shell script to export the files day by day:

#!/bin/sh

cd ~/.local/share/com.ubuntu.reminders/@local

foundnotes=0

while read line; do
  echo $line | fgrep -q '[notes]' && {
    foundnotes=1
    continue
  }
  if [ $foundnotes = 1 ]; then
    name=`echo $line | sed 's/=.*$//'`
    /home/phablet/myRoot/home/phablet/infodump/infodump note-$name.info > /tmp/info 2>&1
    title=`fgrep Title: /tmp/info | sed 's/Title: "//' | sed 's/"//g' | sed 's/ /-/g'`
    created=`fgrep Created: /tmp/info | sed 's/Created: "//' | sed 's/"//g'`
    updated=`fgrep Updated:  /tmp/info | sed 's/Updated: "//' | sed 's/"//g'`
    echo /tmp/${updated}:${title}.txt
    cat note-$name.enml > /tmp/${updated}:${title}.txt
  else
    continue
  fi
done < notes.cache

exit

The files end up in /tmp and can be fetched from there by SSH:

$ ls -l /tmp/*.txt
-rw-rw-r-- 1 phablet phablet 1122 sep 15 15:28 /tmp/2015-09-09:7-de-septiembre.txt
-rw-rw-r-- 1 phablet phablet  961 sep 15 15:28 /tmp/2015-09-09:8-de-septiembre.txt
-rw-rw-r-- 1 phablet phablet 1457 sep 15 15:28 /tmp/2015-09-09:9-de-septiembre.txt
-rw-rw-r-- 1 phablet phablet 2871 sep 15 15:28 /tmp/2015-09-11:10-de-septiembre.txt
-rw-rw-r-- 1 phablet phablet 1798 sep 15 15:28 /tmp/2015-09-11:11-de-septiembre.txt
-rw-rw-r-- 1 phablet phablet  980 sep 15 15:28 /tmp/2015-09-12:12-de-septiembre.txt
-rw-rw-r-- 1 phablet phablet  402 sep 15 15:28 /tmp/2015-09-15:13-de-septiembre.txt

Last updated: Wed Oct 28 20:05:11 CET 2015

PreviousWhat I have learned about the Ubuntu mobile phone BQ Aquaris E4.5NextCron jobs

Last updated 5 years ago

Was this helpful?

With the help of Michael Zanetti I got to work a small Qt5 application to parse the structure of the *.info file:

michael.zanetti@canonical.com
https://code.launchpad.net/~mzanetti/+junk/infodump