Closed fbe-work closed 7 years ago
This is great, thank you for sharing @hdm-dt-fb
The python examples in the Python Tab are pulled from my public gists, located here: https://gist.github.com/gtalarico/ If you are interested in becoming a regular contributor, let me know and I can find a way to make the platform open for multiple contributors (ie. search multiple gists)
In the meantime, for one-off contributions, you can just add the code as a comment at the bottom of a relevant page. Make sure you add tags <pre><code>...your code... </code></pre>
so that it formats nicely.
Just added this as an example:
http://www.revitapidocs.com/2017/053c6262-d958-b1b6-44b7-35d0d83b5a43.htm
Well, thank you for the awesome revitapidocs! I am happy to share it - thanks for adding it. I see, they are coming from gists. Yes I would indeed like to add more python examples, just haven't used the gists myself yet. Would it crawl all my gists or only certain ones with a specific tag?
Yep. It Crawls each gist in my account and pulls any that match a certain pattern. Kind of hacky, but works so that I can add code samples without having to mess with the main code base.
I'm doing some re writing a lot of back end stuff, so I won t get to this for a while, but I will this in mind. In the meantime, feel free to post any code samples/tool you want added as an issue, and I will include then, with the proper credit of course.
That is pretty cool! (out of curiousity: Is a plugin of flask doing this or a separate script, that feeds the db that flask reads?) I looked through your gists and adjusted the IFailuresPreprocessor example, so it hopefully fits your web scrape pattern. I would create future snippets the same way, if that is fine. No worries, no rush. Best, Frederic
I use http://pygithub.readthedocs.io/en/latest/introduction.html It's not required, but helps with authentication and parsing.
If you want to send me a code to your gist, and I can copy it and add it on my end.
@hdm-dt-fb the code sample section now pulls code from a repository. Feel free to send prs or let me know if you want me to add you as contributor Github.com/gtalarico/revitapidocs.code
Hi @gtalarico, sorry if this is obvious and I just missed it: How would I add a Python RevitAPI example to revitapidocs? I could not find a simple and short Python example on the IFailuresPreprocessor, so I wrote one, which hopefully might be helpful to others (as shown below below). Would I PR it on github to revitapidocs? Thank you. Best, @hdm-dt-fb