librelist archives

« back to archive

include-file directive

include-file directive

From:
Anton Novosyolov
Date:
2011-08-03 @ 07:20
Hello.
Added include-file directive, that, unlike 'include', can also read
from hg repo.
http://hg.f-y.name/blohg/changeset/f312604aef44

Re: [blohg] include-file directive

From:
Rafael Martins
Date:
2011-08-09 @ 04:46
On Wed, Aug 3, 2011 at 4:20 AM, Anton Novosyolov
<anton.novosyolov@gmail.com> wrote:
> Hello.
> Added include-file directive, that, unlike 'include', can also read
> from hg repo.
> http://hg.f-y.name/blohg/changeset/f312604aef44
>

I'll review ASAP.

Thanks!

-- 
Rafael Goncalves Martins
http://rafaelmartins.eng.br/

include-file directive

From:
Anton Novosyolov
Date:
2012-04-06 @ 18:57
Hello.

I made include-file directive, to include into rst contents of another
rst from hg.

example (what I needed it for):

.. title: Curriculum Vitae

.. container::
   :class: right

 |PDF|_

.. |PDF| replace:: **PDF**

.. _PDF: link

.. include-file:: content/real-resume_en.rst

Re: include-file directive

From:
Anton Novosyolov
Date:
2012-04-06 @ 19:08
Actually, .. title not worked (AFAIK, in 0.8.x it worked)
fix in attachment

On Fri, Apr 6, 2012 at 10:57 PM, Anton Novosyolov
<anton.novosyolov@gmail.com> wrote:
> Hello.
>
> I made include-file directive, to include into rst contents of another
> rst from hg.
>
> example (what I needed it for):
>
> .. title: Curriculum Vitae
>
> .. container::
>   :class: right
>
>  |PDF|_
>
> .. |PDF| replace:: **PDF**
>
> .. _PDF: link
>
> .. include-file:: content/real-resume_en.rst

Re: [blohg] Re: include-file directive

From:
Rafael Martins
Date:
2012-04-06 @ 19:45
Hi Anton,

please re-send your diffs as commits, with metadata :)

Best regards!

On Fri, Apr 6, 2012 at 4:08 PM, Anton Novosyolov
<anton.novosyolov@gmail.com> wrote:
> Actually, .. title not worked (AFAIK, in 0.8.x it worked)
> fix in attachment
>
> On Fri, Apr 6, 2012 at 10:57 PM, Anton Novosyolov
> <anton.novosyolov@gmail.com> wrote:
>> Hello.
>>
>> I made include-file directive, to include into rst contents of another
>> rst from hg.
>>
>> example (what I needed it for):
>>
>> .. title: Curriculum Vitae
>>
>> .. container::
>>   :class: right
>>
>>  |PDF|_
>>
>> .. |PDF| replace:: **PDF**
>>
>> .. _PDF: link
>>
>> .. include-file:: content/real-resume_en.rst



-- 
Rafael Goncalves Martins
http://rafaelmartins.eng.br/

Re: [blohg] Re: include-file directive

From:
Anton Novosyolov
Date:
2012-04-06 @ 20:00
Included.

On Fri, Apr 6, 2012 at 11:45 PM, Rafael Martins
<rafael@rafaelmartins.eng.br> wrote:
> Hi Anton,
>
> please re-send your diffs as commits, with metadata :)
>
> Best regards!
>
> On Fri, Apr 6, 2012 at 4:08 PM, Anton Novosyolov
> <anton.novosyolov@gmail.com> wrote:
>> Actually, .. title not worked (AFAIK, in 0.8.x it worked)
>> fix in attachment
>>
>> On Fri, Apr 6, 2012 at 10:57 PM, Anton Novosyolov
>> <anton.novosyolov@gmail.com> wrote:
>>> Hello.
>>>
>>> I made include-file directive, to include into rst contents of another
>>> rst from hg.
>>>
>>> example (what I needed it for):
>>>
>>> .. title: Curriculum Vitae
>>>
>>> .. container::
>>>   :class: right
>>>
>>>  |PDF|_
>>>
>>> .. |PDF| replace:: **PDF**
>>>
>>> .. _PDF: link
>>>
>>> .. include-file:: content/real-resume_en.rst
>
>
>
> --
> Rafael Goncalves Martins
> http://rafaelmartins.eng.br/

Re: [blohg] Re: include-file directive

From:
Rafael Martins
Date:
2012-04-07 @ 18:39
On Fri, Apr 6, 2012 at 5:00 PM, Anton Novosyolov
<anton.novosyolov@gmail.com> wrote:
> Included.
>
> On Fri, Apr 6, 2012 at 11:45 PM, Rafael Martins
> <rafael@rafaelmartins.eng.br> wrote:
>> Hi Anton,
>>
>> please re-send your diffs as commits, with metadata :)
>>
>> Best regards!
>>
>> On Fri, Apr 6, 2012 at 4:08 PM, Anton Novosyolov
>> <anton.novosyolov@gmail.com> wrote:
>>> Actually, .. title not worked (AFAIK, in 0.8.x it worked)
>>> fix in attachment
>>>
>>> On Fri, Apr 6, 2012 at 10:57 PM, Anton Novosyolov
>>> <anton.novosyolov@gmail.com> wrote:
>>>> Hello.
>>>>
>>>> I made include-file directive, to include into rst contents of another
>>>> rst from hg.
>>>>
>>>> example (what I needed it for):
>>>>
>>>> .. title: Curriculum Vitae
>>>>
>>>> .. container::
>>>>   :class: right
>>>>
>>>>  |PDF|_
>>>>
>>>> .. |PDF| replace:: **PDF**
>>>>
>>>> .. _PDF: link
>>>>
>>>> .. include-file:: content/real-resume_en.rst
>>
>>

Hi Anton,

your patch fails to apply against my default branch. can you please rebase?

Thanks!

-- 
Rafael Goncalves Martins
http://rafaelmartins.eng.br/

Re: [blohg] Re: include-file directive

From:
Anton Novosyolov
Date:
2012-04-07 @ 18:56
On Sat, Apr 7, 2012 at 10:39 PM, Rafael Martins
<rafael@rafaelmartins.eng.br> wrote:
> On Fri, Apr 6, 2012 at 5:00 PM, Anton Novosyolov
> <anton.novosyolov@gmail.com> wrote:
>> Included.
>>
>> On Fri, Apr 6, 2012 at 11:45 PM, Rafael Martins
>> <rafael@rafaelmartins.eng.br> wrote:
>>> Hi Anton,
>>>
>>> please re-send your diffs as commits, with metadata :)
>>>
>>> Best regards!
>>>
>>> On Fri, Apr 6, 2012 at 4:08 PM, Anton Novosyolov
>>> <anton.novosyolov@gmail.com> wrote:
>>>> Actually, .. title not worked (AFAIK, in 0.8.x it worked)
>>>> fix in attachment
>>>>
>>>> On Fri, Apr 6, 2012 at 10:57 PM, Anton Novosyolov
>>>> <anton.novosyolov@gmail.com> wrote:
>>>>> Hello.
>>>>>
>>>>> I made include-file directive, to include into rst contents of another
>>>>> rst from hg.
>>>>>
>>>>> example (what I needed it for):
>>>>>
>>>>> .. title: Curriculum Vitae
>>>>>
>>>>> .. container::
>>>>>   :class: right
>>>>>
>>>>>  |PDF|_
>>>>>
>>>>> .. |PDF| replace:: **PDF**
>>>>>
>>>>> .. _PDF: link
>>>>>
>>>>> .. include-file:: content/real-resume_en.rst
>>>
>>>
>
> Hi Anton,
>
> your patch fails to apply against my default branch. can you please rebase?
>
> Thanks!
>
> --
> Rafael Goncalves Martins
> http://rafaelmartins.eng.br/

Oops :)
Actually, file contains patch 2 times (I export patch using hg not too
often, first time I tried hg export > file; then hg export -o file,
2nd try I guess added to file, not overwrited).
I included fixed patch.

Re: [blohg] Re: include-file directive

From:
Rafael Martins
Date:
2012-04-12 @ 01:39
Hi Anton,

I found a few issues in your patch, and ended up rewriting it,, giving
you the credits [1].

The main issue I found was that you re-implemented FileInput. This
isn't the proper solution, IMO, because this class accepts a file-like
object, that we can provide easily, avoiding the need of maintain code
"stolen" from other codebases.  We already need to maintain the code
of IncludeHg, that is mostly stolen from docutils. I renamed the
directive to include-hg.  Also, keep the things separated is a good
thing. mercurial code belongs to blohg.hgapi, ideally.

I also applied the title fix [2].

That's it! Thank you very much for the code and idea.

Looking forward for your future patches.

Best regards.

[1] https://hg.rafaelmartins.eng.br/blohg/rev/b54c853c81a8
[2] https://hg.rafaelmartins.eng.br/blohg/rev/6d5d7eea63b7

-- 
Rafael Goncalves Martins
http://rafaelmartins.eng.br/

Re: [blohg] Re: include-file directive

From:
Anton Novosyolov
Date:
2012-04-12 @ 05:07
You forgot to fix write.rst (include-file -> include-hg).

On Thu, Apr 12, 2012 at 5:39 AM, Rafael Martins
<rafael@rafaelmartins.eng.br> wrote:
> Hi Anton,
>
> I found a few issues in your patch, and ended up rewriting it,, giving
> you the credits [1].
>
> The main issue I found was that you re-implemented FileInput. This
> isn't the proper solution, IMO, because this class accepts a file-like
> object, that we can provide easily, avoiding the need of maintain code
> "stolen" from other codebases.  We already need to maintain the code
> of IncludeHg, that is mostly stolen from docutils. I renamed the
> directive to include-hg.  Also, keep the things separated is a good
> thing. mercurial code belongs to blohg.hgapi, ideally.
>
> I also applied the title fix [2].
>
> That's it! Thank you very much for the code and idea.
>
> Looking forward for your future patches.
>
> Best regards.
>
> [1] https://hg.rafaelmartins.eng.br/blohg/rev/b54c853c81a8
> [2] https://hg.rafaelmartins.eng.br/blohg/rev/6d5d7eea63b7
>
> --
> Rafael Goncalves Martins
> http://rafaelmartins.eng.br/

Re: [blohg] Re: include-file directive

From:
Rafael Martins
Date:
2012-04-12 @ 13:38
On Thu, Apr 12, 2012 at 2:07 AM, Anton Novosyolov
<anton.novosyolov@gmail.com> wrote:
> You forgot to fix write.rst (include-file -> include-hg).
>
> On Thu, Apr 12, 2012 at 5:39 AM, Rafael Martins
> <rafael@rafaelmartins.eng.br> wrote:
>> Hi Anton,
>>
>> I found a few issues in your patch, and ended up rewriting it,, giving
>> you the credits [1].
>>
>> The main issue I found was that you re-implemented FileInput. This
>> isn't the proper solution, IMO, because this class accepts a file-like
>> object, that we can provide easily, avoiding the need of maintain code
>> "stolen" from other codebases.  We already need to maintain the code
>> of IncludeHg, that is mostly stolen from docutils. I renamed the
>> directive to include-hg.  Also, keep the things separated is a good
>> thing. mercurial code belongs to blohg.hgapi, ideally.
>>
>> I also applied the title fix [2].
>>
>> That's it! Thank you very much for the code and idea.
>>
>> Looking forward for your future patches.
>>
>> Best regards.
>>
>> [1] https://hg.rafaelmartins.eng.br/blohg/rev/b54c853c81a8
>> [2] https://hg.rafaelmartins.eng.br/blohg/rev/6d5d7eea63b7
>>
>> --
>> Rafael Goncalves Martins
>> http://rafaelmartins.eng.br/

Actually I forgot to apply the documentation changes at all, will fix.

Thanks!

-- 
Rafael Goncalves Martins
http://rafaelmartins.eng.br/