cform icon indicating copy to clipboard operation
cform copied to clipboard

Dynamic template generation (fix #34)

Open dgomesbr opened this issue 8 years ago • 5 comments

Creates automatic generation logic

  • built-in toc resolver from the documentation
  • fixed and limited support for functions (inlined for now)
  • generates snippets on the output folder
  • checks if the template output folder exists and if-not creates it.
  • limited support for parameterization, using replace. (suboptimal)

dgomesbr avatar Aug 08 '16 19:08 dgomesbr

Loving this! Although I just built a fresh virtualenv for this and ran it. Got the following:


     _                _          _ _       __   __
    | |              | |        (_) |     / /  / _|
    | |__   ___  __ _| | ___ __  _| |_   / /__| |_ ___  _ __ _ __ ___
    | '_ \ / _ \/ _` | |/ / '_ \| | __| / / __|  _/ _ \| '__| '_ ` _ `
    | |_) |  __/ (_| |   <| | | | | |_ / / (__| || (_) | |  | | | | | |
    |_.__/ \___|\__,_|_|\_\_| |_|_|\__/_/ \___|_| \___/|_|  |_| |_| |_|
    Updated: Thu, 29 Sep 2016 02:01:03 GMT
    Snippets founds: 171

   0% [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------]
                                                                                     Generating snippets
Traceback (most recent call last):
  File "build-snippets.py", line 161, in <module>
    main()
  File "build-snippets.py", line 151, in main
    generate(index)
  File "build-snippets.py", line 65, in generate
    snippet = createSnippet(arn, title, href, full_href)
  File "build-snippets.py", line 89, in createSnippet
    return build_with_template(arn, title, tree, full_href)
  File "/Users/nathan/github/dgomesbr/cform/build/templating.py", line 18, in build_with_template
    processed_body = """"${{1:-}}" : {}""".format((body[0]).text_content())
IndexError: list index out of range


(cform) ➜  build git:(master) pip freeze
colorama==0.3.7
fabulous==0.3.0
lxml==3.6.4
requests==2.11.1```

beaknit avatar Sep 29 '16 17:09 beaknit

Also: Given how much you've put into this, why don't we take "Beaknit" out of the banner and just call it "Cform"? Seems like I'd be taking too much credit. ;-)

beaknit avatar Sep 29 '16 17:09 beaknit

What versions of those libs in requirements.txt are you using?

beaknit avatar Oct 05 '16 21:10 beaknit

Sorry for the delay, travelling a lot :/

On Wed, Oct 5, 2016 at 6:38 PM, beaknit [email protected] wrote:

What versions of those libs in requirements.txt are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/beaknit/cform/pull/35#issuecomment-251807197, or mute the thread https://github.com/notifications/unsubscribe-auth/AAafMwg-iVBJ82xhFbukAKwI4vh6akUBks5qxBi9gaJpZM4JfY_7 .

dgomesbr avatar Oct 06 '16 01:10 dgomesbr

No worries! I've been in the same boat for like 2 months. :-)

On Wed, Oct 5, 2016 at 9:51 PM, Diego Magalhães [email protected] wrote:

Sorry for the delay, travelling a lot :/

On Wed, Oct 5, 2016 at 6:38 PM, beaknit [email protected] wrote:

What versions of those libs in requirements.txt are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/beaknit/cform/pull/35#issuecomment-251807197, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAafMwg- iVBJ82xhFbukAKwI4vh6akUBks5qxBi9gaJpZM4JfY_7> .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/beaknit/cform/pull/35#issuecomment-251847903, or mute the thread https://github.com/notifications/unsubscribe-auth/ABOHHN7ucMGcXSEBNGTjyPgLVgkHCEZrks5qxFQygaJpZM4JfY_7 .

I am jack's complete lack of surprise . . .

beaknit avatar Oct 07 '16 18:10 beaknit