![]() |
python script to archive all events
hey... i wrote my first small python script for the n900. it’s a command-line tool, which copies all events (SMS and IM messages, phone calls) into an extra archive DB. this way, you can store all events by running the script, before you clean up your conversations and calling-history... theres also an output of counting all events grouped by event-type...
i want to write an graphical widget and a graphical tool to browse all archived events next year... you are welcome, if anyone want to help me (i'm new on python and GTK) :-) here is the first version of the script: http://www.bananenfisch.net/?p=64 |
Re: python script to archive all events
hi!
i wrote a gtk-frontend for this script now, with some additional output options. more infos here: http://www.bananenfisch.net/?p=120 hmm, im new here... should i upload my small app to the extras-devel repository?? greets from vienna, markus |
Re: python script to archive all events
Quote:
Cheers Daniel |
Re: python script to archive all events
Looks nice from the screenshoots. Please add it to the extras (and to garage) if you got the time.
Question, if I don't clean, concequtive runs of the script will create double entries? Thanks for sharing. |
Re: python script to archive all events
yes, i will upload it to extras-devel and garage at the weekend...
Quote:
|
Re: python script to archive all events
ok, now you can find it at extras-devel, also here: https://garage.maemo.org/projects/glogarchive
|
Re: python script to archive all events
Quote:
During the first run, it displays a message that "Archive not found, copying all from el.db". I assume that this happens very quickly, but there is no indication when the copy is finished. Perhaps a message on the next line, "Copying complete" or similar would be helpful for the new, first time user. and maybe for everyone else also. Thank you again. |
Re: python script to archive all events
yes, thats a good point... next version will do this...
i also want to make an CSV export, and maybe other useful features... any features you request? |
Re: python script to archive all events
ok... the new version is now in extras-testing. would be nice, if you test it :)
|
Re: python script to archive all events
Thanks for the new version.
Like a lot that one can delete the archive with a click. I've accumulated a lot of entries and wanted to start from scratch but i was to lazy to open the xterm. One issue (not blocker though) I notice is that events from contacts that have more than one number the archive shows the name only for the first number. All events with the second, thrird etc number show only the number (i.e. +123456789 (+123456789) : ...) |
Re: python script to archive all events
Quote:
|
Re: python script to archive all events
I just installed glogarchive from Extras-devel to archive my SMS/ IM/ Call Logs. http://maemo.org/packages/view/glogarchive/
Some questions: 1. Where does it store the backups? 2. How do I move it to my memory card/ PC? 3. Is there a way to restore from the archive? |
Re: python script to archive all events
Quote:
2. theres an export-to-csv function (you can open the csv-file with openoffice or excel). you can also copy the db-file directly - its a sqlite-file, which can be opened with sqlite-tools (e.g. sqlitebrowser). if you want the archive permanently at another place, copy the file to the new place (e.g. "cp /home/user/.rtcom-eventlogger/el_archive.db /home/user/MyDocs/archive.db") and set the new path in /opt/glogarchive/glogarchive.py at line 25: ARCHIVE_PATH = "/home/user/MyDocs/archive.db" 3. not now, maybe in one of the next versions :-( |
Re: python script to archive all events
Any way to get it to export an HTML file instead of CSV?
|
Re: python script to archive all events
Quote:
but the idea is good. maybe there will be a XML export in one of the next versions... |
Re: python script to archive all events
Hello!
Installed app while ago when using 1.1 and never worked. Tryed today with 1.2, updated to newest version first and it still crash (simply dissapear). Is there any special requirements to run app? dmesg is empty. Thanks, b. |
Re: python script to archive all events
hm... strange... it should work with the standard maemo python environment.
any output, when you start it via terminal? |
Re: python script to archive all events
Indeed. Here it is:
/home/user/# glogarchive process 10626: arguments to dbus_connection_get_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5757. This is normally a bug in some application using the D-Bus library. process 10626: arguments to dbus_connection_set_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5721. This is normally a bug in some application using the D-Bus library. Aborted /home/user/# |
Re: python script to archive all events
hmm... is "python-dbus" installed? (run "dpkg -l python-dbus")
what happens, when you try this: run-standalone.sh python2.5 /opt/glogarchive/glogarchive.py |
Re: python script to archive all events
I am on data conection, but I think installing python-dbus should work. Fail :S
BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash) Enter 'help' for a list of built-in commands. ~ $ sudo gainroot Root shell enabled BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash) Enter 'help' for a list of built-in commands. /home/user # dpkg -i python-dbus dpkg: error processing python-dbus (--install): cannot access archive: No such file or directory Errors were encountered while processing: python-dbus /home/user # run-standalone.sh python2.5 /opt/glogarchive/glogarchive.py Traceback (most recent call last): File "/opt/glogarchive/glogarchive.py", line 596, in <module> listall(ui) File "/opt/glogarchive/glogarchive.py", line 309, in listall cur.execute("select events.event_type_id, count(events.id), events.outgoing from events group by events.event_type_id, events.outgoing order by events.event_type_id, events.outgoing") sqlite3.OperationalError: no such table: events /home/user # I'll try later at home on wifi. Have enabled maemo-devel, maemo-extras and maemo-extras-testing repos. Regards, b. |
Re: python script to archive all events
hmm - it seems, that there is a problem with the sql-file. what is the output of "ls /home/user/.rtcom-eventlogger" ?
there must be an archive-file (because it opens one), but not a valid one. |
Re: python script to archive all events
and: do not run glogarchive as root! the script searches for the DB in the user-directory - the user-directory for root is /root - and there are no files. i get the same error, when i run the script as root...
what is the output, when you start it as user? run-standalone.sh python2.5 /opt/glogarchive/glogarchive.py |
Re: python script to archive all events
Hm :/
Here is output and directory listing: BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash) Enter 'help' for a list of built-in commands. ~ $ run-standalone.sh python2.5 /opt/glogarchive/glogarchive.py Traceback (most recent call last): File "/opt/glogarchive/glogarchive.py", line 596, in <module> listall(ui) File "/opt/glogarchive/glogarchive.py", line 309, in listall cur.execute("select events.event_type_id, count(events.id), events.outgoing from events group by events.event_type_id, events.outgoing order by events.event_type_id, events.outgoing") sqlite3.OperationalError: no such table: events ~ $ ~ $ ~ $ ~ $ ls -al /home/user/.rtcom-eventlogger/ drwx------ 4 user users 4096 Jun 16 15:29 . drwxr-xr-x 58 user users 4096 Jun 16 20:33 .. drwx------ 6 user users 4096 Jun 10 14:48 attachments -rw------- 1 user users 37888 May 26 11:33 el-v1-before-restore.db -rw-r--r-- 1 user users 240640 Jun 16 16:53 el-v1.db -rw-r--r-- 1 user users 0 Jun 16 16:53 el-v1.db-journal -rw-r--r-- 1 user users 0 Jun 16 12:31 el.db -rw-r--r-- 1 user users 0 Jun 15 10:41 el_archive-v1.db drwx------ 2 user users 4096 May 17 16:47 plugins ~ $ |
Re: python script to archive all events
ah ok. a
rm /home/user/.rtcom-eventlogger/el_archive-v1.db should solve the problem. |
Re: python script to archive all events
That's it? Because it's working :))
THANKS!!! |
Re: python script to archive all events
no problem =)
|
Re: python script to archive all events
First i would like to say that the application is very good, i love it :)
but also i like to ask, is it possible in some way to delete only one phonenumber, i mean only a few messages not the whole archive, not all messages and calls??? thanks :) |
Re: python script to archive all events
hi doris,
there is a way, but not with glogarchive itself. use sqlitebrowser to edit the archive: http://sourceforge.net/projects/sqlitebrowser/ 1. copy the archive from your phone, to your pc. this is the file: /home/user/.rtcom-eventlogger/el_archive-v1.db 2. make a backup of the file 3. open the file with sqlitebrowser 4. there you can browse the table "Events" - delete records you want to delete 5. save the file, move it back to /home/user/.rtcom-eventlogger/el_archive-v1.db on your phone note: if you have the deleted records on your normal conversations-history, it will be archived again next time... all right? |
Re: python script to archive all events
bananenfisch could you check the topic about the sms counter
(http://talk.maemo.org/showthread.php?t=38364&page=9) I have a question... |
Re: python script to archive all events
Thanks for this application!
I was trying to find a way to export my sms and I couldn't find one (If I'm not wrong it is not possible from ovi suite is it?) |
Re: python script to archive all events
Quote:
Why do you need to remove this file? |
Re: python script to archive all events
Quote:
When die archive-file is broken (it was an issue while an update from 1.1 to 1.2, i think, or 1.3?) or empty, glogarchive crashes. Since there is no check, if the archive exist but empty, just delete the file and create a new archive-file... |
All times are GMT. The time now is 04:01. |
vBulletin® Version 3.8.8