Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogenerate snippets from documentation #34

Open
dgomesbr opened this issue Aug 2, 2016 · 5 comments
Open

Autogenerate snippets from documentation #34

dgomesbr opened this issue Aug 2, 2016 · 5 comments

Comments

@dgomesbr
Copy link

dgomesbr commented Aug 2, 2016

The documentation contained here have a topic list of the resources that can be used to build up the snippets.

By build an index with //*[@id="main-col-body"]/div[2]/div[2]/ul we can leverage all the revelant links to keep the snippets updated with the current docs.

@dgomesbr dgomesbr changed the title Autogenerate from documentation Autogenerate snippets from documentation Aug 2, 2016
dgomesbr added a commit to dgomesbr/cform that referenced this issue Aug 2, 2016
dgomesbr added a commit to dgomesbr/cform that referenced this issue Aug 2, 2016
dgomesbr added a commit to dgomesbr/cform that referenced this issue Aug 3, 2016
dgomesbr added a commit to dgomesbr/cform that referenced this issue Aug 3, 2016
@dgomesbr
Copy link
Author

dgomesbr commented Aug 3, 2016

This one is linked with #27

@nathanatluminal
Copy link
Contributor

nathanatluminal commented Aug 6, 2016

Absolutely love it! Nicely done. :-)

One question & One issue (didn't see an issues link on your github fork):

  1. Got this when I ran it for the first time:
(cform) ➜  build git:(master) python build-snippets.py
creating AWS::ApiGateway::Account => apigateway-account
Traceback (most recent call last):
  File "build-snippets.py", line 84, in <module>
    main()
  File "build-snippets.py", line 80, in main
    generate(index)
  File "build-snippets.py", line 41, in generate
    writeToOutput(title, snippet)
  File "build-snippets.py", line 72, in writeToOutput
    out = file(filename, 'w')
IOError: [Errno 2] No such file or directory: u'./output/`

Would you mind adding an isdir() & mkdir() to just smooth out the creation of "output"?
2. Also: Do the snippets need to moved to the root of the package or are you thinking we remove the top-level snippets and have Sublime pick up the snippets in the build/output dir?

@dgomesbr
Copy link
Author

dgomesbr commented Aug 6, 2016

Hey @nathanatluminal, thanks for the input. Regarding the first, yes, this is missing and also the parameter interpolation $2, $3, $4, I couldn't come up with something great to do that diff than re.sub everything.

Regarding the later, I'm thinking about just let everything on the output. Is there any thing I have to change to sublime pick it up or we should change instructions?

What do you think about that?

dgomesbr added a commit to dgomesbr/cform that referenced this issue Aug 8, 2016
dgomesbr added a commit to dgomesbr/cform that referenced this issue Aug 8, 2016
dgomesbr added a commit to dgomesbr/cform that referenced this issue Aug 9, 2016
dgomesbr added a commit to dgomesbr/cform that referenced this issue Aug 9, 2016
@dgomesbr
Copy link
Author

@nathanatluminal ping?

@beaknit
Copy link
Owner

beaknit commented Aug 24, 2016

Hey, man! So sorry I haven't had time to look at this. We've launched our
product and I've been traveling. It's near the top of my to-do list. I'll
hit you up as soon as possible.

On Sun, Aug 14, 2016 at 10:24 PM, Diego Magalhães notifications@github.com
wrote:

@nathanatluminal https://github.com/nathanatluminal ping?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#34 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABOHHL0bUeQpOS9XMR5GUr_SV2V72jDFks5qf83WgaJpZM4JaIvc
.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants