← Back to team overview

zim-wiki team mailing list archive

Re: Firefox addon zim-clip: new features and a question for Jaap

 

On Mon, Dec 10, 2012 at 9:17 PM, Rui Nibau <rui.nibau@xxxxxxxxxxxxxxx> wrote:
> The Button/widget for marks is created on the addon toolbar (bottom
> bar), as it's the only place allowed by the addon-sdk ; but you can move
> it to the main toolbar with the "customize" window. Clicking on it opens
> a panel where you can change the text used to build the link and add a
> comment. Comment by default will be the localized current date (e.g.
> https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toLocaleString).
> here again, maybe i'll drop that functionality to use the quicknote
> dialog, for the same reason as the notebook chooser preference : all the
> zim logic belongs to zim. The other option is to hide the quicknote
> dialog instead .

Looking at the video, it probably looks nice to just skip the
QuickNote dialog here. Having the popup from firefox feels more
integrated.

Will be easy to provide the same commandline args as for the quicknote
dialog, without the additional interface.

> Speaking of quicknote plugin, a question for you Jaap. I found what's
> maybe a bug, or i'm misunderstanding the API. I thought that if you
> don't give a 'basename' option to the plugin, it will (1) consider
> 'namespace' as the page name and (2) the 'Create a new page for each
> note' checkbox will be unchecked. (1) is ok but the checkbox state
> checked or unchecked seems only to be lead by it's previous state (it is
> always checked when you provide a 'basename'). To be sure that checkbox
> is always unchecked when run a command without basename, like this one :
>
>         zim.py --plugin quicknote notebook=notebook namespace=:marks
>
> I had to add some code in the plugin :
... 8< ...
> Is that correct ?

Not really. Expected behavior is that if you do not provide a basename
and "new_page" is set, the basename is based on the first line of the
text.

Since there is no commandline option to control the "new_page" flag,
we should probably add a new commandline arg for that.

I would propose to add a argument "page" and an argument "append".
Here "page" will be a alias for setting "namespace" + "basename" and
"append" will toggle the "new_page" flag.


Also contemplating having much more commandline options for zim, so it
is easier to interface with other applications. Probable a "--import"
to add a new page and "--append" to add to an existing page would be
logical commandline options. Then there would be no need to use the
quicknote plugin at all if you don't want the dialog.

Regards,

Jaap


Follow ups

References