let's see if the list will accept this post...
On 06/04/2014 08:09 AM, Mariusz Wojcik wrote:
> Oops I have forgotten that this email I got from Amir wasn’t send
> through the list. However, if I am going to rewrite the whole
> applications these things I would like to know.
>
> *Von:*Mariusz Wojcik [mailto:[email protected]]
> *Gesendet:* Mittwoch, 04. Juni 2014 15:02
> *An:* [email protected]
> *Betreff:* AW: [Basket-devel] Windows Port
>
> Hello Amir,
>
> I think rewriting the whole applications wouldn’t be a bad idea. I just
> want to know a few things before I start:
>
> ·I want know how the current file format .basket works. I didn’t find it
> documented.
Hi,
I'm been slowly trying to write an importer from OneNote into Basket.
That's caused me to have to understand the basket files. I've made some
notes and I'll put that at the bottom of this post to help you and
anyone else that may need them. When I commit my changes, that commit
will contain these notes.
As to your question on rewriting, I'd say no. We have an app here that
generally seems to work. It's only missing a few things that I can tell.
So why spend a massive amount of time to rewrite a project instead of
only spending a little bit of time to finish a project?
If you think it needs to be rewritten, why?
The usual argument that can make it worthwhile to rewrite is because of
architectural issues, but I'm unaware of any that exist that would cause
a problem. (not that I know much of the architecture for the app )
Anyway, why a complete rewrite?
Once we officially hit version 2.0, if a rewrite (or more likely a major
refactoring) is needed to use QT5 or something like that, I'd be
on-board then.
I would like to see Basket work on MS-Windows too. Perhaps small parts
of the app need to be rewritten to better support that, but that's a far
different goal then rewriting the whole app. I took a few minutes to
look at making it work on MS-Windows some time back and sort of gave up
when examining the kde lib issue. It looks possible but hard since
that's a platform I don't normally develop on. Once I get the importer
I'm working on written, I'll consider looking at the MS-Windows issue again.
I believe it was Gleb who fixed the search bug, but that needs to be put
into the master branch and a new release (1.82?) needs to be done. I
have no idea how that will come to pass. Who has that ability? I think
doing this would be a big deal as it will show others that the project
really isn't dead.
Kevin
---
Data
All data is normally stored in ~/.kde/share/apps/basket/ (what I'll
refer to as the base_path).
The actual baskets are stored in "baskets" under the base_path. The
base_path can be changed,
but it's not in Settings->ConfigureBasketNotePads. You'll find the
functionality in
Basket->Backup&Restore (why? should we move that bit to Settings? or
maybe duplicate the setting there?)
In the "baskets" dir, you'll find a dir for each basket, labeled
"basket#" where the number
starts at "1" and is incremented. Deleted baskets are removed but the
numbers do not appear to
ever be reused.
Also in "baskets", you'll find "baskets.xml". This data file holds the
properties of each basket
as well as specifies the hierarchy of the baskets. It looks like:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE basketTree>
<basketTree>
<basket folded="false" folderName="basket1/">
<properties>
...various properties...
</properties>
...optional <basket> containers, having children as needed to form a tree
</basket>
...other <basket> containers for siblings...
</basketTree>
Properties are presently:
<properties>
<name>General</name>
<icon>basket</icon>
<appearance backgroundColor="" backgroundImage="" textColor=""/>
<disposition free="false" mindMap="false" columnCount="1"/>
<shortcut action="show" combination=""/>
<protection key="" type="0"/>
</properties>
Within each basket# dir is all the "data" for that basket. You can know
if it a "free" note by
looking at the properties.disposition.free attribute. The notes
themselves are in note#.html
files. There are also item#.txt files at times; I don't know why you
sometimes get a note and
other times an item. In all cases, if the basket also has inserted
things (e.g. pics), then
you'll also see those saved there too.
Notes are full HTML files, starting with a DOCTYPE tag, then the
infamous <html> and so on.
According to the DOCTYPE, it's saves as strict 4.0.
It seems that the widget to show the note is fully HTML aware, as you
can put valid HTML in a
note file that the interface doesn't have controls for, and it will be
rendered correctly. An
example of this is the "table" element. (Note, since I'd really like to
have tables in notes,
then I need to go investigate the Qt widget that is used to see if there
is a way to insert a
table, and if not, go create one.)
---
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Basket-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/basket-devel