[referencer] Default folder for files
jcspray at icculus.org
jcspray at icculus.org
Thu Oct 2 05:08:32 EDT 2008
Quoting Miguel Pagano <miguel.pagano at gmail.com>:
>> I'm not sure in what sense you're using "attributes" -- currently there
>> are things like <manage_target> and the aforementioned <library_folder>
>> which map to the manage_target_ and library_folder_uri_ members of the
>> Library class in src/Library.h. A more general mechanism would be
>> possible, but since special-case behaviour in the GUI is required for
>> anything like that I would question the utility of a generalised
>> mechanism -- I prefer to define XML tags rather than defining valid
>> values for a generic map. But perhaps I'm not understanding you
>> correctly.
>
> Attribute in my sentence has two meanings: an attribute in the XML
> file and this attribute seen as a member in the corresponding class.
> Sorry for being ambiguous. With respect of using attributes or tags, I
> think that a path looks like something which should be in an attribute.
> Again it seems that I've overlooked some things or that the source
> I've get from debian is not up-to-date.
To be honest, I didn't put a lot of through into whether it should be
an attribute or a tag. For a monitored directory (the
'library_folder'), I would stick with a tag for the following reasons:
* A library might monitor more than one directory
* Multiple monitored directories might have varying properties such
as a glob for which kinds of files to include.
A download directory is clearly a singular thing, and I can't imagine
it having extra properties, so it could very well be an attribute. I
am no XML purist, so whichever way it's done won't upset me.
Having had that little internal debate I now realise that a monitored
directory and a download directory ought to be distinct locations.
Perhaps at this stage it has become worthwhile to have a single
"Library Properties" dialog or so, for the following settings:
* Managed bibtex file
* Monitored directory
* Download directory
Aside from the directory configuration, another very nice thing to
have would be some logic in the download process to recognise whether
something is a document file, or metadata like a bibtex file.
John
More information about the referencer
mailing list