Re: ox-slimhtml

2021-10-03 Thread Bastien
Hi Amin,

Amin Bandali  writes:

> Bastien, would you and Nicolas be open to adding ox-slimhtml more or
> less in its current form to Org core, if Laszlo, myself, and/or others
> look after it and help maintain it?

No, because it would be confusing to have two HTML export backends in
Org's core.

BTW, https://github.com/balddotcat/ox-slimhtml says "slimhtml is now
part of Org, included in GNU Emacs, future bug reports or
contributions should be sent to Org directly" ... which is wrong, and
I can't fill a bug report because the repo is archived.

Elo, are you still working on it?

>From what I've read in previous discussions, I believe I'm in line
with Nicolas and Tim on this: we can probably enhance ox-html.el by
following some design goals that ox-slimhtml.el have set, and leave
other decisions aside, because ox-html has to stay as generic as
possible.

In any case, I'd rather have Elo work with Tim on enhancing ox-html
than to allow another package in Org's core.

If ox-slimhtml is still maintained, it can for sure live in GNU or
NonGNU ELPA.

WDYT?

-- 
 Bastien



Re: ox-slimhtml

2021-10-03 Thread Timothy
Hi Amin,

> What do you (other folks also) think?

A while ago Nicolas forwarded me an email between him and Laszlo on this. Here
are my thoughts at the time addresses to Laszlo (which haven’t changed much 
since):

Nicolas  writes:
> IIUC, merge is only viable if “ox-slimhtml” is a drop-in replacement for
> “ox-html”. Otherwise, users will miss out many features. Of course, we
> could ship two competing HTML export back-ends, but I don’t think that’s
> a good idea either.
>
> So, it is meant for inclusion in Org proper, or as a GNU ELPA package?
> I don’t know. Maybe Timothy has a clearer view about it.

I believe I see your motivation in creating ox-slimhtml, as the current
ox-html includes much more than could be considered strictly necessary.

However, like Nicolas I am hesitant to put this straight into Org along
side ox-html. My personal view is that ideally ox-html would be equipped
with the relevant knobs and levers (metaphorically speaking) such that
one could obtain the same result as ox-slimhtml, the current result, or
something in-between. I’ve felt for some time that ox-html could benefit
from a bit more in-built flexibility without going down the path of
hooks, filters, and advice. This would certainly be more effort, so I
completely understand if this isn’t something you’d like to undertake.
In that case, I feel that this may be best suited as an ELPA package —
closely in reach for those who are looking for a slimmer ox-html.

All the best,
Timothy


Re: ox-slimhtml

2021-10-03 Thread Amin Bandali
Hi Bastien, Laszlo, Nicolas,

Bastien Guerry writes:

> Hi Laszlo,
>
> Bastien  writes:
>
>> I encourage everyone to try exporting Org documents to HTML using your
>> library and see how it compares with ox-html.el for a daily usage.
>
> nobody seemed to be that interested in helping :/

Apologies for completely dropping the ball on this.  It's been beyond
hectic around me the past few months, and I essentially had zero time
to work on this and several other projects I've been interested in.

Bastien, would you and Nicolas be open to adding ox-slimhtml more or
less in its current form to Org core, if Laszlo, myself, and/or others
look after it and help maintain it?  I still believe that ox-slimhtml
can stand on its own -- compared to other export backends, it's quite
small in size, and has no external dependencies -- coexisting with
ox-html and a useful alternative to ox-html for exporting Org files
into more lightweight html files, as well as for when finer control
over the exported html is desired.

What do you (other folks also) think?

> I hope you were able to continue working on this, don't hesitate to
> send an update.
>
> In the meantime, I'm dismissing this thread from the "calls for help"
> on https://updates.orgmode.org
>
>

Would you mind if I (or yourself) restore that status on Woof?

thanks,
amin

-- 
https://bndl.org



Re: ox-slimhtml

2021-09-25 Thread Bastien Guerry
Hi Laszlo,

Bastien  writes:

> I encourage everyone to try exporting Org documents to HTML using your
> library and see how it compares with ox-html.el for a daily usage.

nobody seemed to be that interested in helping :/

I hope you were able to continue working on this, don't hesitate to
send an update.

In the meantime, I'm dismissing this thread from the "calls for help"
on https://updates.orgmode.org



Re: How to reinject custom function into derived backend which doesn't implement it, ex : footnote in ox-slimhtml backend.

2021-04-27 Thread Nicolas Goaziou
Hello,

rey-coyrehourcq  writes:

> Actually footnotes are not defined in ox-slimhtml, so as i read in the org 
> documentation [1] ), 
> i try to add this capacity by simply calling vanilla ox-html function 
> org-html-footnote-reference into translate-alist :
>
> (org-export-define-derived-backend 'ox-slimhtml-publish-to-html 'slimhtml


The first argument of `org-export-define-derived-backend' should be the
name of the new back-end, as a symbol, not the function used to publish.
E.g,

  (org-export-define-derived-backend 'slimhtml-improved 'slimhtml
   )

>   :translate-alist '((bold . ox-slimhtml-bold)
>  
> (footnote-reference . org-html-footnote-reference)
>  (verse-block . org-html-
> verse-block)
>  (special-block . org-html-special-block)))
>
> Using the vanilla ox-html export function, everything is awesome and footnote 
> appear in my html, normal.
>  
> :publishing-function org-blog-publish-to-html 
>
> But if i switch to ":publishing-function ox-slimhtml-publish-to-html"
> the function 

You need to define your own publishing function with the help of
`org-publish-org-to' and make it use `slimhtml-improved. Here you're
re-using plain slimhtml, without your additions. E.g.,

  (defun ox-slimhtml-improved-publish-to-html (plist filename pub-dir)
"Publish an org file to html.
  PLIST is the property list for the given project.  FILENAME
  is the filename of the Org file to be published.  PUB-DIR is
  the publishing directory.
  Return output file name."
(let ((html-extension (or (plist-get plist :html-extension) 
org-html-extension)))
  (org-publish-org-to 'slimhtml-improved
  filename
  (if (and html-extension (not (string= "" 
html-extension)))
  (concat "." html-extension) "")
  plist
  pub-dir)))

Then you can set :publishing-function to `org-slimhtml-publish-to-html'.

> There is something i don't understand in the processing of "translate-alist", 
> so perhaps if the derived backend doesn't
> implement a footnote-reference function, i cannot extend it ?

You should be able to extend it.

Regards,
-- 
Nicolas Goaziou



Re: How to reinject custom function into derived backend which doesn't implement it, ex : footnote in ox-slimhtml backend.

2021-04-27 Thread Bastien
Hi,

rey-coyrehourcq  writes:

> I'm trying to develop my own `publish.el` for some research project
> linked to reproductibility.

You didn't receive much feedback - sorry for that.

Did you make progress about your project?



Re: ox-slimhtml

2020-12-16 Thread Bastien
Hi Laszlo,

thanks for ox-slimhtml.el and for announcing it on the list.

> Amin was kind enough to poke me to submit and post about my package, 
> ox-slimhtml.
> In a nutshell, it is an org-export backend - transcodes Org elements to 
> HTML/text output.
>
> My primary use for it, is to create derived export backends. (picture a/b 
> testing, for example) 
> By default, it outputs HTML5, essentially (as it tries to not ignore current 
> output preferences).
>
> Within each transcoder, I tried to pick out the relevant core elements
> being passed through - what I skipped from the original ox-html
> exporter is the domain logic surrounding templating and navigation.
>
> A sample of the output can be seen here http://bald.cat/ox-slimhtml/
>
> From a more detailed perspective, I use it to template the output of
> some Org documents (common sources of truth); these include some
> minimal Org markup, and as such, they provide convenient
> element-by-element programmatic access. This all depends on where
> you’d like to organize the logic behind each elements’ transcoding
> process, of course - so, for now, I’ll say that it works really nice
> for me. YMMV

I encourage everyone to try exporting Org documents to HTML using your
library and see how it compares with ox-html.el for a daily usage.

Thanks!

-- 
 Bastien



Re: ox-slimhtml

2020-12-14 Thread tomas
On Mon, Dec 14, 2020 at 12:48:27AM -0500, Laszlo Elo wrote:
> Hello,
> 
> Amin was kind enough to poke me to submit and post about my package, 
> ox-slimhtml.
> In a nutshell, it is an org-export backend - transcodes Org elements to 
> HTML/text output.

Thank you (both :)

Cheers
 - t


signature.asc
Description: Digital signature


ox-slimhtml

2020-12-13 Thread Laszlo Elo
Hello,

Amin was kind enough to poke me to submit and post about my package, 
ox-slimhtml.
In a nutshell, it is an org-export backend - transcodes Org elements to 
HTML/text output.

My primary use for it, is to create derived export backends. (picture a/b 
testing, for example) 
By default, it outputs HTML5, essentially (as it tries to not ignore current 
output preferences).

Within each transcoder, I tried to pick out the relevant core elements being 
passed through - what I skipped from the original ox-html exporter is the 
domain logic surrounding templating and navigation.

A sample of the output can be seen here http://bald.cat/ox-slimhtml/

From a more detailed perspective, I use it to template the output of some Org 
documents (common sources of truth); these include some minimal Org markup, and 
as such, they provide convenient element-by-element programmatic access. This 
all depends on where you’d like to organize the logic behind each elements’ 
transcoding process, of course - so, for now, I’ll say that it works really 
nice for me. YMMV

:) Laszlo




How to reinject custom function into derived backend which doesn't implement it, ex : footnote in ox-slimhtml backend.

2020-10-02 Thread rey-coyrehourcq

Hi,

I'm trying to develop my own `publish.el` for some research project linked to 
reproductibility. 
I chose ox-slimhtml [0] as derived backend to limit and simplify the html/css 
outputs generated by vanilla html
backend/publish. 

Actually footnotes are not defined in ox-slimhtml, so as i read in the org 
documentation [1] ), 
i try to add this capacity by simply calling vanilla ox-html function 
org-html-footnote-reference into translate-alist :

(org-export-define-derived-backend 'ox-slimhtml-publish-to-html 'slimhtml
  :translate-alist '((bold . ox-slimhtml-bold)
 
(footnote-reference . org-html-footnote-reference)
 (verse-block . org-html-
verse-block)
 (special-block . org-html-special-block)))

Using the vanilla ox-html export function, everything is awesome and footnote 
appear in my html, normal.
 
:publishing-function org-blog-publish-to-html 

But if i switch to ":publishing-function ox-slimhtml-publish-to-html" the 
function 
org-html-footnote-reference is never called.

There is something i don't understand in the processing of "translate-alist", 
so perhaps if the derived backend doesn't
implement a footnote-reference function, i cannot extend it ?

If you have some higlight on this, or solution on this problem, i'm interested.

[0] https://github.com/balddotcat/ox-slimhtml
[1] https://orgmode.org/manual/Advanced-Export-Configuration.html

Best 
-- 

Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : https://ssd.eff.org/}



signature.asc
Description: This is a digitally signed message part