C++ Reference Docs: Switch to use new Fathead Template Elements #407
Comments
I'll pick this up. |
The way it is organized currently is: the data generation script for DDG is actually hosted on cppreference.com. I assume that this is a known and a preferred way of organizing this. If not, then... it needs to be changed :) <section class="prog__container">
<p>Computes the sum of the given value <code>init</code> and the elements in the range <code>[first, last)</code>.</p>
<pre>
<code>
template< class InputIt, class T >\nT accumulate( InputIt first, InputIt last, T init );
</code>
</pre>
<pre>
<code>
template< class InputIt, class T, class BinaryOperation >T accumulate( InputIt first, InputIt last, T init,\n BinaryOperation op );
</code>
</pre>
</section> |
@sahildua2305 Yeah, I've seen it. But the issue seems to be referring to the cppreference_doc specifically. Though this is something that needs clarification as well. |
@moollaza can you please confirm? |
@sahildua2305 @sergey-krusch I happened to discuss this on the Forum yesterday :) The cppreference_doc Fathead is extremely old and needs to be rebuilt. @sergey-krusch I was not aware that cppreference.com had an open-source repo though -- does it house the code that is being passed along to us in the tarball? If that code is open, then I suppose we could update it accordingly, bit really I think we should rebuild this IA to function as all the others do, which means housing the parsing code in our Fathead repo, so we can update it as necessary, without depending on a third part to manage and release the changes. We can still download the XML to be parsed from cppreference.com if they prefer that over scraping their site. |
@sahildua2305 @sergey-krusch the other code in the |
Hi, I'm the original author of the cppreference_doc fathead plugin code. This issue was only recently brought to light to me. If it's still possible (since @sahildua2305 already volunteered), I would like to volunteer implementing needed fixes for it. However, I would strongly recommend against spliting the output.txt generation code from the cppreference repository. I wrote a much longer comment with justification in #539 (comment). |
@sahildua2305 we can update the parsing script in the cppreference-doc repository by sending a PR there. What would you like to do? |
Can you do it, @rasikapohankar ? |
@sahildua2305 Are you still interested in improving this Fathead? If not, I can take over. |
@p12tic please go ahead 😄 |
It looks like simple fix by @sergey-krusch (p12tic/cppreference-doc@7352ebd) has been actually enough to solve this specific issue. I've merged that to cppreference-doc repo and additionally did some extra stuff :-)
I have output.txt that I would like to test: https://gist.github.com/p12tic/87488c7d68715b267100b3b69de46005. Could someone configure it on the beta website? |
@p12tic Thank you :) I was actually waiting for someone to confirm on the output format before doing the PR. But eventually discussion took a bit different route :) |
@p12tic Can you please open a pull request with the new |
@rasikapohankar Thanks for noticing. I think @p12tic has now removed himself from the contributor list so we can't assign it to him. |
Hmm, I did so because I was getting emails about all Fathead bugs. Perhaps I should look into muting threads instead next time. |
Closing due to #781 👍 |
We now have Fathead Template Elements designed specifically for Programming Fatheads. These are HTML elements that should be added to the output.txt by each Programming Fathead's parsing script(s).
This Fathead should be updated to use the templates:
<div>
with classprog__container
<p>
tags<div>
with classprog__sub
Here is an example:
This issue is part of the Programming Mission: help us improve the results for C++ related searches!
IA Page: http://duck.co/ia/view/cppreference_doc
Maintainer: @manrajgrover
The text was updated successfully, but these errors were encountered: