tag:blogger.com,1999:blog-37032643074416365312024-02-20T21:57:54.959-08:00Google Summer of Code 2020Shubhamhttp://www.blogger.com/profile/07194636821101243630noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-3703264307441636531.post-56162987498740578102020-08-30T10:54:00.002-07:002020-08-30T10:54:15.533-07:00Cantor Integrated Documentation : Month 3 Progress<p>Hello
KDE people. Phase 3 evaluation is on. In this blog post, I will update you on the progress made
during the final month of the coding period. So here are the things
done:-
</p><div dir="ltr" style="text-align: left;" trbidi="on"><h3 style="text-align: justify;">
Things Done</h3>
<div class="code-line" data-line-end="1" data-line-start="0" style="text-align: justify;">
<b>1. Added NumPy's and Julia's doumentation<code> </code></b></div>
<div class="has-line-data" data-line-end="2" data-line-start="1" style="text-align: justify;">I have generated NumPy's and Julia's Qt Help files from their official documentation and then added it to the documentation panel. Here is how NumPy's documentation looks like.<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCBDqFkmy94HYCoOsC3GmsfZ1csMGmF-Z1mHLym7mCAhi6cVFBMbSVOE2fL2nRr3EdoAPonYCaytqYl16Zcmgypl4DchvnNSnaVSuWMlFtjzdfqiqwGBPClWFxQrT9aYc7vEkvRRuoxFI5/s1366/q.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="674" data-original-width="1366" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCBDqFkmy94HYCoOsC3GmsfZ1csMGmF-Z1mHLym7mCAhi6cVFBMbSVOE2fL2nRr3EdoAPonYCaytqYl16Zcmgypl4DchvnNSnaVSuWMlFtjzdfqiqwGBPClWFxQrT9aYc7vEkvRRuoxFI5/s640/q.png" width="640" /></a></div><br />
<div class="has-line-data" data-line-end="4" data-line-start="3" style="text-align: justify;">
<b>2. Added Widget inside backend's Settings page to add/remove local/remote Qt Help files<code></code></b></div>
<div style="text-align: justify;">
<ul><li>I have added a widget inside backend's settings dialog page which will allow the users to add/remove local Qt documentation help files or install newer ones from the Cantor's section on the KDE store. Currently I have just added the widget, I plan to complete this feature in the next few days. This is how the widget looks like.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJSKasBd5fiAo_nRrls0nVHKeydnb_qupy4M5ReY47AsnVJKJxY3S2G0xmxveYoXEu7F1kmQzEwmLm7yvVf5EOkmxAPOjzVsfg-632_R16B38TdspYGwdC528u-RqH8lZQ5FRrMUbrixSP/s718/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="546" data-original-width="718" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJSKasBd5fiAo_nRrls0nVHKeydnb_qupy4M5ReY47AsnVJKJxY3S2G0xmxveYoXEu7F1kmQzEwmLm7yvVf5EOkmxAPOjzVsfg-632_R16B38TdspYGwdC528u-RqH8lZQ5FRrMUbrixSP/s640/2.png" width="640" /></a></div></li></ul><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhENsmqJi5tc4YDAAr9mxNOSs7aQN9xNSRSd9BAfk1YIq49inph-AYxPfAhc6J9Bc9at-eBK2Rr98Y9MS8-n6LZMDVv8QgFgmKJ2euG9zxtjIoHWTcNlzUn12KsHzeeabp_y0F1iXgWBzGl/s714/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="538" data-original-width="714" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhENsmqJi5tc4YDAAr9mxNOSs7aQN9xNSRSd9BAfk1YIq49inph-AYxPfAhc6J9Bc9at-eBK2Rr98Y9MS8-n6LZMDVv8QgFgmKJ2euG9zxtjIoHWTcNlzUn12KsHzeeabp_y0F1iXgWBzGl/s640/3.png" width="640" /></a></div><br /> "Add" button opens up a dialog to add a new locally present Qt Help
file, while "Get New Documentation" opens up the Cantor's section on the
KDE store. The logic of reading the Qt Help settings into the ComboBox inside documentation panel needs to be done. <br /><p></p>
</div>
For
those interested in trying it out themselves and/or playing with the
code, can clone my repository and build it from the source. <a href="https://invent.kde.org/education/cantor/-/tree/gsoc20_documentation" target="_blank">Here</a> is the link to my repository on which I am working.<br />
<div style="text-align: justify;">
<br /></div>
<div class="cpp" style="text-align: justify;">
That's all folks for this time, until then, Goodbye!!</div>
</div>
Shubhamhttp://www.blogger.com/profile/07194636821101243630noreply@blogger.com0tag:blogger.com,1999:blog-3703264307441636531.post-32972993906504334582020-07-27T08:54:00.000-07:002020-07-27T08:54:19.890-07:00Cantor Integrated Documentation : Month 2 Progress<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Hello
KDE people. Phase 2 evaluation is due from today onward until the 31st of July. In this blog post, I will update you on the progress made during the second month of the coding period. So here are the things done:-</div>
<h3 style="text-align: justify;">
Things Done</h3>
<div class="code-line" data-line-end="1" data-line-start="0" style="text-align: justify;">
<b>1. Changed the layout of the documentation panel<code> </code></b></div>
<div class="has-line-data" data-line-end="2" data-line-start="1" style="text-align: justify;">
First of all, I have changed the basic layout of the panel altogether. Now it is much more attractive UI wise, more usable UX wise, and overall a good package with looks and features. Here is how it looks like.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZP1E4KWQBZIJ5IS2ztRMhZUNYqfruVZWagjQaw_TqCNLvwPJNFh8RfD9m6If9KKYi0pzoMMe7Xiol5BMq-PUe00YtTnbl3YHrCPzslHZfcQ4gOO1CK-GllCuOfwFEnAvhkyAPRRpM_ex_/s1600/1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="677" data-original-width="1365" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZP1E4KWQBZIJ5IS2ztRMhZUNYqfruVZWagjQaw_TqCNLvwPJNFh8RfD9m6If9KKYi0pzoMMe7Xiol5BMq-PUe00YtTnbl3YHrCPzslHZfcQ4gOO1CK-GllCuOfwFEnAvhkyAPRRpM_ex_/s400/1.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Documentation Panel</td></tr>
</tbody></table>
</div>
<div class="has-line-data" data-line-end="4" data-line-start="3" style="text-align: justify;">
<b>2. Add several minor widgets to improve the usability<code></code></b></div>
<div style="text-align: justify;">
<ul>
<li>"<b>Search through keywords</b>" widget: This widget will be used by the user to search for help for particular keywords. This widget has a completer that displays the suggestions in real-time so that the user can reach the documentation for the intended keyword.</li>
<li>"<b>Find in Page text</b>" widget: This widget will be used for string matching. It contains an input box where users can type in the word they are looking for on the current page. Matched strings are highlighted. Users can match case-sensitively or not based on their needs. This widget can also be used to find the strings forward or backward as the case may be.</li>
<li>"<b>Zoom in/out</b>" action: User can change the zoom factor using SHIFT++/SHIFT-- to make the page comfortable to their eyes. They can also press the "Reset Zoom level to 100%" button to reset the zoom to 100%.</li>
<li>"<b>Download images/gifs/pages</b>" context menu action: I have also added the ability to download the embedded images/gifs/HTML pages to local disk. The user just has to right-click on the resource and then press save. After a successful download, a message box confirms it.</li>
</ul>
</div>
<h4 class="cpp" style="text-align: justify;">
<b>3. Add documentation for Octave and Python as well</b></h4>
I have also created and added the Qt Help documentation files Octave and Python as well. These files are successfully used by the above panel and the documentation is displayed.<br />
<br />
For
those interested in trying it out themselves and/or playing with the code, can clone my repository and build it from the source. <a href="https://invent.kde.org/education/cantor/-/tree/gsoc20_documentation" target="_blank">Here</a> is the link to my repository on which I am working.<br />
<div style="text-align: justify;">
<br /></div>
<div class="cpp" style="text-align: justify;">
That's all folks for this time, until then, Goodbye!!</div>
</div>
Shubhamhttp://www.blogger.com/profile/07194636821101243630noreply@blogger.com0tag:blogger.com,1999:blog-3703264307441636531.post-91304920248790344062020-06-28T11:33:00.003-07:002020-06-28T11:33:23.747-07:00Cantor Integrated Documentation : Week 3 and 4 Progress<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Hello KDE people. First phase evaluations is due from today onward until 3rd of July. It has been coupe of weeks since I had posted about my project. I was quite busy writing code implementing the documentation panel for the various backends supported by Cantor. In the last post I have explained about how I generated the help files namely qhc (Qt Help Collection) and qch (Qt Compressed Help) from the documentation's source file. In today's post I will explain how I utilized Maxima's help files to actually display help inside the Cantor application itself. So here are the things done:-</div>
<h3 style="text-align: justify;">
Things Done</h3>
<div class="code-line" data-line-end="1" data-line-start="0" style="text-align: justify;">
<b>1. Implementation of Documentation Panel<code> </code></b></div>
<div class="has-line-data" data-line-end="2" data-line-start="1" style="text-align: justify;">
Cantor has dedicated panels for Variable manager and some general Help. So I have created a new panel dedicated to display the documentation of the backend which is currently active. To implement it, I have borrowed some basic code from the cantor/src/panelplugins and added widgets similar to any documentation help. I have added tabs for displaying Contents, Index and Search for the documentation. These widgets are populated by loading the help files using a QHelpEngine instance. Currently, Search functionality is yet to be implemented.</div>
<div class="has-line-data" data-line-end="4" data-line-start="3" style="text-align: justify;">
<br />
<b>2. Display of documentation inside the Documentation Panel<code></code></b></div>
<div style="text-align: justify;">
I have kept the design as simple as possible. I have divided the display area into 2 halves, one half is the QTabWidget which displays the above listed widgets and the other half is the QWebEngineView, which I am using as a display area for the contents of the documentation. To make the display responsive to the events on the QTabWidget, I have connected the signals of the index and content widget to a slot which displays the contents in the View.</div>
<h4 class="cpp" style="text-align: justify;">
<b>3. Context Sensitive Search Capabilities</b></h4>
<div style="text-align: justify;">
I have successfully implemented the Context Sensitive Search capability. The user can now while in the worksheet, can select any keyword and then press F2 to show the relevant documentation about that topic. The QWebEngineView updates in real time.</div>
<div style="text-align: justify;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR6qpl2pxxyu8l01YZtiZxJVuvZadqxbzgmh9rjKJ6dDKiVlCmVuPNDerhBjOEzdI_IgPOrQBBW4Xkxg-wSI3JbNOX6_aXQ9wNlFtjHaDuXlZaqYuMWw-eA3S9aq6yBZQmOzZb2wIoqYDT/s1600/1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="852" data-original-width="1600" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR6qpl2pxxyu8l01YZtiZxJVuvZadqxbzgmh9rjKJ6dDKiVlCmVuPNDerhBjOEzdI_IgPOrQBBW4Xkxg-wSI3JbNOX6_aXQ9wNlFtjHaDuXlZaqYuMWw-eA3S9aq6yBZQmOzZb2wIoqYDT/s640/1.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">User selected 'sin' and then pressed F2 to forward to the related documentation</td></tr>
</tbody></table>
<div style="text-align: justify;">
On pressing F2 key while 'sin' keyword was selected, the index was filtered and the corresponding topic documentation was shown in the view area. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
For those interested in trying it out themselves and/or playing with the code, can clone my repository and build it from source. <a href="https://invent.kde.org/education/cantor/-/tree/gsoc20_documentation" target="_blank">Here</a> is the link to my repository on which I am working.</div>
<div style="text-align: justify;">
<br /></div>
<div class="cpp" style="text-align: justify;">
That's all folks for this time, until then, Good bye!!</div>
</div>
Shubhamhttp://www.blogger.com/profile/07194636821101243630noreply@blogger.com0tag:blogger.com,1999:blog-3703264307441636531.post-13094679521540872732020-06-12T09:57:00.000-07:002020-06-12T09:57:09.153-07:00Cantor Integrated Documentation : Week 1 and 2 Progress<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Hello KDE people!! It's been almost couple of weeks of the coding period already, and it has been hectic already. I was mostly able to stick to the timeline I had proposed, just loosing couple of days here and there. None the less, I am here presenting my progress on the project.</div>
<h3 style="text-align: justify;">
Things Done</h3>
<div class="code-line" data-line-end="1" data-line-start="0" style="text-align: justify;">
<b>1. Creation of QHP file<code> </code></b></div>
<div class="has-line-data" data-line-end="2" data-line-start="1" style="text-align: justify;">
It stands
for Qt Help Project. This is similar to xml’s file format. It contains
the table of contents, indices, and references to the actual
documentation files (*.html). This file is later passed to qhcp (Qt Help
Collection File). It
contains various tags like table of contents, section tag for defining
the actual documentation, keywords tag for defining the indices for the
documentation, files tag for listing all the files required. <a href="https://doc.qt.io/qt-5/qthelpproject.html">Click here for more details on qhp</a></div>
<div class="has-line-data" data-line-end="4" data-line-start="3" style="text-align: justify;">
<br /></div>
<div class="has-line-data" data-line-end="4" data-line-start="3" style="text-align: justify;">
For adding the keywords that will serve as the index for the documentation, I made use of the index.hhk file that is shipped with the official installation of Maxima. But, copying and adding each and every index (~2.5k of them) from index.hhk to .qhp file would have been a difficult task. So as a solution, I utilized the power of Python to write a script that will do it for me. <a href="http://dontpad.com/index_parser.py" target="_blank">Here</a> is the link to that script if you are interested.</div>
<div class="has-line-data" data-line-end="4" data-line-start="3" style="text-align: justify;">
<br /></div>
<div class="code-line" data-line-end="6" data-line-start="5" style="text-align: justify;">
<b>Steps to extract the indices from <code>index.hhk</code> file to add them to <code>qhp</code></b></div>
<div class="has-line-data" data-line-end="7" data-line-start="6" style="text-align: justify;">
<code>index.hhk</code> is an index file shipped with the Maxima documentation. To extract all the indices, run the python script named <code>index_parser.py</code> over the index file to get the keywords listed for <code>qhp</code> file. Copy and paste the <code>output.txt</code> file’s content to <code>qhp</code> file under keywords section.</div>
<div class="has-line-data" data-line-end="7" data-line-start="6" style="text-align: justify;">
<br /></div>
<div class="code-line" data-line-end="10" data-line-start="9" style="text-align: justify;">
<b>2. </b><b>Creation of QHCP file</b><b><code></code></b></div>
<div class="has-line-data" data-line-end="12" data-line-start="11" style="text-align: justify;">
It is
an XML file that contains references to the compressed help files that
should be included in the help collection. This file can be passed to
the help generator for creating a <code>qhc</code> and <code>qch</code> files in one go. <a href="https://doc.qt.io/qt-5/qthelp-framework.html#qt-help-collection-project">Refer this link for more information</a></div>
<div class="has-line-data" data-line-end="14" data-line-start="13" style="text-align: justify;">
Use the following command to generate the above said files.</div>
<div style="text-align: justify;">
<pre class="cpp">qhelpgenerator mycollection<span class="operator">.</span>qhcp <span class="operator">-</span>o mycollection<span class="operator">.</span>qhc </pre>
</div>
<h4 class="cpp" style="text-align: justify;">
<b>3. Adding custom style to the Maxima's official documentation </b></h4>
<div class="cpp" style="text-align: justify;">
I have also tried customizing the official documentation. I personally did not liked the layout of the official documentation, so I tried to add some styling to it. Currently I am in process of doing it. Adding style to hundreds of HTML files was a challenge and tedious task to be completed manually. I again utilized Python's power and created a script to link the main CSS file to the HTML files. <a href="http://dontpad.com/css_injector" target="_blank">Here</a> is the script.</div>
<div class="cpp" style="text-align: justify;">
Below is a screenshot taken from QtAssistant browser when I load the .qch file which is generated in the previous step. (Edit->Preferences->Documentation->Add).</div>
<div class="cpp" style="text-align: justify;">
<br /></div>
<div class="cpp" style="text-align: justify;">
<b> </b></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7a69cz-RTH3VesKzlzlPIkV969KRvIHsCtF3MTBXZQ81SVPDtsSa1WAKKTcOg2VXzThxNJSiKYrQjTYkXcGCR5PHw43dJ-xmzEKx7AJ19rQJm8AvKF8cdUHJdivlEZDN-hzVAliLDABxl/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7a69cz-RTH3VesKzlzlPIkV969KRvIHsCtF3MTBXZQ81SVPDtsSa1WAKKTcOg2VXzThxNJSiKYrQjTYkXcGCR5PHw43dJ-xmzEKx7AJ19rQJm8AvKF8cdUHJdivlEZDN-hzVAliLDABxl/s640/2.png" width="640" /></a></div>
<div class="cpp" style="text-align: justify;">
<b> </b> </div>
<div class="cpp" style="text-align: justify;">
That's all folks for this time, until then, Good bye!!</div>
</div>
Shubhamhttp://www.blogger.com/profile/07194636821101243630noreply@blogger.com0tag:blogger.com,1999:blog-3703264307441636531.post-49979611961221859332020-05-31T01:47:00.002-07:002020-05-31T01:47:37.761-07:00About my GSoC project<div dir="ltr" style="text-align: left;" trbidi="on">
<article class="home" style="background-color: white; box-sizing: border-box; color: #2c3e50; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin-bottom: 40px; padding: 0px 69.9375px;"><h2 style="box-sizing: border-box; color: #f2756a; font-family: "ubuntu", sans-serif; font-size: 30px; font-weight: 500; line-height: 1.1; margin-bottom: 10px; margin-top: 20px; text-align: center;">
Integrated Documentation in Cantor</h2>
<div style="box-sizing: border-box; text-align: justify;">
<b>Cantor </b>is an application that lets user use their favourite mathematicalapplications from within a nicely KDE-integrated worksheet interface. It offers assistant dialogs for common tasks and allows users to share their worksheets withothers. Cantor is one of many KDE educational projects. It supports a variety of backends, be it Maxima, Octave, Python, R and many more and that too packed in a single intuitive GUI. The current version of Cantor does not have support for viewing backend's documentation inside the application itself. For example, to view Maxima’s documentation or help, the application provides an external link pointing to the Maxima’s official documentation page which is opened in a fresh browser window. This has the obvious drawback of requiring an active internet connectivity.<br /><br /><b>PROPOSAL:</b><br /><div style="text-align: justify;">
The proposal for this project is to integrate the help or documentation inside Cantor’s settings. The implementation should be done in such a way to provide integrated search and context sensitive help facilities.</div>
</div>
</article><br /></div>
Shubhamhttp://www.blogger.com/profile/07194636821101243630noreply@blogger.com0tag:blogger.com,1999:blog-3703264307441636531.post-7907746332634441852020-05-31T01:29:00.002-07:002020-05-31T01:34:20.463-07:00Intoduction<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="color: orange;"><span style="font-size: x-large;"> </span></span></h2>
<h2 style="text-align: left;">
<span style="color: orange;"><span style="font-size: x-large;">About me, who am I?</span></span></h2>
<div style="box-sizing: border-box; margin-bottom: 10px; text-align: justify;">
I am <b style="box-sizing: border-box;">Shubham</b>,
a final year undergraduate student, pursuing B.E(Bachelor of
Engineering) at BMS Institute of Technology and Management, Bangalore,
India. I am an open source enthusiast and developer, mostly
working with C++ with Qt framework. I also have decent knowledge of C, Java, Python, bash
scripting, git and I love developing under linux environment. Previously I was selected as one of many GSoC students to be mentored by this amazing organization, which is KDE. This year also, I applied again to KDE as a student and was fortunate enough to get selected. I will be developing for Cantor project. Apart from
coding, in my spare time I go for Cricket or Volleyball to keep myself
refreshed.</div>
</div>
Shubhamhttp://www.blogger.com/profile/07194636821101243630noreply@blogger.com0