Collaborative Wiki Editor – WikiToLearn

Collaborative Wiki Editor – WikiToLearn

It’s been more than a month I’m playing with MediaWiki. I have learned a lot of things.
In my last blog post, I had mentioned about running the MediaWiki instance locally. After spending some time I was able to configure Parsoid server successfully. The issue was MediaWiki parsoid developer setup configuration page had a different format of URI.

The good part is I have done all works which were there in my TODO list of last blog post. In fact, I have done more than that.

Now, I have good knowledge on how to setup MediaWiki locally and run VE (also configured with parsoid server). I can also help other if they face any issues.

VE
VisualEditor talks with Parsoid server to save the wiki page

I discussed with James Forrester regarding our extension and took some feedback from him. He pointed me to some of the hurdles which I would face while building Collaborative Editor extension.

The workflow of my extension is also done. Cristian helped me in designing the workflow of extension.

 

workflow
Workflow of extension

* I tried out different VE extensions just to get used to how extensions are build.
* VisualEditor provides a powerful API through which we can build our extensions on top of it.
* I tried out OO.ui to add an icon within VE so that user can enable collaboration by clicking on it.
* Now, I’m working on APIs listen to behavior of cursor inside the VE, so that all the changes made will be seen by others in real time.

 

Advertisements

Community Bonding – KDE – WikiToLearn

Community Bonding – KDE – WikiToLearn

 

wikitolearn
WikiToLearn

 

On May 5th night, we had a hangout call with our project mentors and other GSoC students of WikiToLearn team.
This is the first hangout call we had with respect to GSoC.

We discussed the following things :

* Having a blog account and keep updating the progress in it. Also to find a way to mirror our blog and WikiToLearn wiki page to keep track of everything.

* Gianluca explained about the need of KDE account, Phabricator.

* All our current source code are hosted on Github, we may move to KDE QuickGit someday soon.

* We discussed our project proposals. We felt it will be a good idea if we inform about our project ideas to upstream contributors, MediaWiki contributors so that they could help us if we have any problem with respect to MediaWiki extension development.

* Make use of WikiToLearn tech channel effectively for every technical problem because we have experienced people there who could help us to solve it.

Things which I have done till now :

* Created an account on KDE identity.

* Got KDE developer access.

* Aggregated my Blog with KDE planet.

* Have an account on Phabricator.

* Have an account on KDE Bugtracking System. (WikiToLearn team doesn’t use it much.)

* Updated my user page on WikiToLearn.

* Created a doc which shows a list of days and hours I’ll be working/taking off.

* Running MediaWiki instance locally in my system.

* Installed and enabled VisualEditor. (Playing with it)

* Spending some amount of time in configuring Parsoid server. (I need to link VisualEditor and Parsoid server so that they talk each other and enables me to create and save wiki pages.)

 

VisualEditor
MediaWiki with VisualEditor

Things I’ll work on next :

* Configure Parsoid server.

* Design workflow scheme for collaborative editor extension.

* Try out some simple VE extensions.

 

Weekend.py

On 23rd and 24th of April, 2016 our GLUG DSCE organised a basic Python and Django hands-on workshop.
python
On 23rd, Santosh from HackerEarth taught the students about basic python programming. The duration of this workshop was around 3 hours. Most of the basics concepts were covered. Most of the students who attend this workshop were from 4th-semester. They knew about C programming and Object oriented programming language like C++ which helped them to learn python quickly.

They all were amazed at the flexibility providedΒ  by the python. Santhosh’s talk was impressive enough for students to fall in love with python. πŸ™‚
T-shirts were awarded to students who solved the bounty questions quickly.

django

On 24th, we had Ramaseshan from Fractalio Data Pvt Ltd who took a hands-on workshop on Django. Firstly, he explained about the MVC, MTV architecture to make them understand how architecture plays an important role in building an application.

The duration of this workshop was around 5 hours (excluding 1-hour lunch break). We worked on a building a basic Django app – writing notes something like Evernote. It was taught very well.

At last, we had an hour for open discussion. Students were made to as any question related to Django or anything related to technology. I and Farhaan spoke about our GSoC project ideas and motivated them to contribute to Free and Open source software projects.

Ramaseshan spoke about Free Software philosophy, mesh network, censorship, privacy, free software communities and lot other things. His talk was very much impressive, many students wanted to join GLUG as core members and contribute in whichever field they are interested in. πŸ™‚

A meeting was conducted soon after the workshop with the newly joined GLUG members.

Google Summer of Code 2016 – KDE – WikiToLearn

gsoc-2016

Something I’ve wanted to say for more than a year. Yes! I am a GSoCer now!
This was one among my biggest dreams. πŸ™‚

GSoC – Google Summer of Code is an annual program, in which Google awards healthy stipends to students for contributing to Open Source projects.

All these days, I was spending most of my time fixing bugs on different open source projects. Now I have got the opportunity to work with WikiToLearn,Β  a proud member of KDE community, for a long period of time, implementing a new feature to wiki editor.

I would like to tell a bit about our WikiToLearnWikiToLearn wants to provide free, collaborative and accessible textbooks to the whole world.
Our philosophy is synthesized in the sentence: β€œknowledge only grows if shared”. We provide a platform where learners and teachers can together complete, refine and re-assemble notes, lecture notes in order to create textbooks, tailored precisely to their needs so that you can β€œstand on the shoulders of giants”.

I should thank my mentors Cristian Baldi, Gianluca RigolettiΒ  and other community members for helping me in reviewing and getting a great project proposal done. I’m really excited to work with them this summer. πŸ™‚

Looking at previous GSOCers like Sayan, Sagar, Vignesh, Parth was always motivating me to contribute to open source and become a GSoCer.
I thank F.S.M.K, DGPLUG, and our GLUG-DSCE which taught me a lot about free/open source technologies.

More love to WikiToLearnΒ  folks for giving me this opportunity to work with them. πŸ™‚

 

You can have a look at my proposal abstract here.
Soon I’ll push my complete project proposal on GitHub.

The real fun begins now. πŸ™‚

What I did this winter ?

The reason I’m documenting these stuff is because I did quite a lot of useful things. πŸ™‚

I love the web

In 4th semester I used to play with HTML5 and CSS3. I had learned frameworks like Bootstrap and Material design. But now it was time to work on it professionally. Before I wasn’t following the right practice of using these frameworks. I learned how to add my own custom CSS properties by adding a new file and how to make use of !important declaration in it.

Before I used to work only Firefox browser.
Now, I test the web page even on other browsers like google chrome, internet explorer. YES, you read it right – INTERNET EXPLORER. Just because there are people who still use it.

jQuery

I had worked on JavaScript and bit on AngularJS, NodeJS.
This time, I used the jQuery library for creating simple animations, validations, front end apps like calculator, etc.
(I’ll build one simple app and share the link here.)

API

I watched several videos on REST API. You can find good collection of videos here – https://javabrains.io/courses/javaee_jaxrs

This site is too cool – http://rest.learncode.academy/
You can practice what you have learned here.
This video gives a short and sweet explanation on API – https://www.youtube.com/watch?v=ODlgfpLsFGk

Scrapy

Scrapy is a python framework for web scraping. I got to know about this while watching Pycon – Montreal 2015 video. I’m planning to build a small search engine out of it.

GIMP

New techniques.

Freedom Hack – A hackathon in memory of Aaron Swartz

I’m yet to blog on this.

DuckDuckHack Global Quack and Hack

This was a special event to me. I have made a blog post on this. You can read it here.

#SaveTheInternet – Netneutrality

The protest which we made against Free basics was featured in most of the newspapers like Deccan herald, Times of India, Vijaya Karnataka. Lot other online news media portals including Forbes had used our protest photo in their articles.

Peetzaaaa

Don’t know whether to write it here or not. The number of pizzas I have eaten in past 2 – 3 months is damn high. πŸ˜€

DuckDuckHack – Global Quack and Hack 2

 

duckduckhack-quack-and-hack-2

On 30th January, 2016 we had our 2nd global Quack and Hack meet-up. This meet-up was special to me because I got an opportunity to be a co-host. I should thank Abdul, DuckDuckGo community leader for giving me this opportunity.
It is great pleasure to be a host for this meet-up.

Daniel, the community manager of DuckDuckGo joined us over a video conference. He gave us some insights about the Global Quack and Hack meet-up which is happening at different parts of the world.

daniel
That’s Daniel on big screen.

After speaking with Daniel, I asked all participants to join our slack group.

I showed them the various features of DuckDuckGo search engine – instant answers, bangs, changing the UI theme, etc. I spoke about various ways to contribute to the DuckDuckGo’s open source platforms.

I gave a demonstration on how to build instant answers.

I tried to make them understand the code base of zeroclickinfo-goodies repository.
We were concentrating more on cheat sheets since it is good to start with for beginners, easy and can be finished in quick time.

Then we followed the documentation to set up the development environment. They didn’t faced any difficulties in doing this. Most of them were on Linux based OS.

Few of the participants were new to open source. They created an account on Github, forked the zeroclickinfo-goodies repository and cloned it.

Just to build confidence within themselves I made them to run the duckpan server on codio and test the existing instant answers on the local server. They were happy to see those search queries giving instant results.

This slideshow requires JavaScript.

Few of them selected ideas from the Instant Answers Ideas forum, few came up with their own ideas.
They started to hack on their ideas. I used to keep helping them whenever they find difficulties. Hemanth, another co-host joined the meet-up.

We took a break for lunch, had some yummy pizzas, sodas, chat with others, all these were fun. πŸ˜‰

This slideshow requires JavaScript.


By this time few of them were almost done with building their instant answers, they just needed to send the pull request.

All were new to git too. I and Hemanth, helped participants to configure git in their systems and thought them few basics of it.

Few were successful in sending the pull requests. It was really nice to see people making their first contribution to open source by building instant answers.

Thanks to Galaxy and Mozilla Bangalore community for providing their community space to host this event.

This slideshow requires JavaScript.


Happy to help more and more people to contribute to open source and DuckDuckGo anytime in future. πŸ™‚

Mistakes :

– We couldn’t watch these video collection. 😦
The blog post was published just few hours before the event. I’m missed to read this post, read after the event. My bad. 😦

– We started our event at 12.30 p.m IST, I felt if we had started by morning we could have stretched the duration till evening.

Issues faced :

– Few couldn’t send the pull requests though they had completed building instant answers. This is because more time was spent in configure git on their systems and explaining how git works. So, at the end we didn’t had enough time to complete it, we had to wind up.

What we can do for next event ?

– We could automate the process of sending invite link to subscriber to slack group. Similar to this.

– Need to do some more promotion of the event so that we can more crowd.

Totally, this meet-up was great fun and taught me new things. πŸ™‚

You can read about my post on 1st Global Quack and Hack meet-up here.

See you at next meet-up, until then happy quacking! πŸ˜€

#Quack #Quack

Git workflow

In my previous blog post, I wrote about why to use git ?

Now, let’s start working with it.

Since most of them prefer Github (proprietary) rather than Gitlab (Free). This will be in context with Github. There will not be much difference if you are using Gitlab, the workflow remains same.

I assume that you have created an account on Github and downloaded git in your system and configured it.
If not, follow this set up guide.

1. Fork the repository

First you need to fork the repository to your remote server. You can fork the repository by clicking on fork button (Ο’) which you see in the top right corner. Forking a repository is nothing but you have a copy of that repository on your account.

2. Clone the forked repository

If you want to make some changes to the forked repository, you need to clone it.
You can clone the repository by following command :

$ git clone {URL_of_the_repository}

In my case it will be :

$ git clone https://github.com/sagarhani/learn-git

In your case it will be :

$ git clone https://github.com/{your_username}/learn-git

3. Create a new branch

Now move inside the cloned directory by :

$ cd learn-git

It is always good practice to keep the master branch clean. So, create a new branch and work on that branch.
First, check currently which branch are you on, by doing :

$ git branch

It will show master.

You can create a new branch by doing :

$ git checkout -b my-feature

It automatically switch the current branch (master) to my-feature branch.

You can again verify it by doing :

$ git branch

This time it will show my-feature.

You can create any number of branches. You can switch to any branch at any point of time by :

$ git checkout {branch_name}

To switch to master branch :

$ git checkout master

4. Work on the feature

Now you can open your favourite text editor and work on the code. You can modify/add/delete files.

For example : Create a file hello.txt and add some text inside it.

5. Adding your work to staging area

Once you are done with working with code. You need to add them to staging area from your working directory.

Do :

$ git status

This will show all files which were modified and added or removed.

Now, you need to add these changes to staging area to tell git that you need to update these changes in you next commit.

You can add a file by :

$ git add {filename}

In this case it will be :

$ git add hello.txt

6. Commit your work

Git commit command commits the staged works snapshot to the project history. Committed snapshots can be thought of as β€œsafe” versions of a project. Git will never change these work unless you explicitly ask it to change it.

$ git commit

Commit the staged snapshot. This will launch a text editor prompting you for a commit message. After you’ve entered a message, save the file and close the editor to create the actual commit.

$ git commit -m "{message}"

Commit the staged snapshot, but instead of launching a text editor, use <message> as the commit message.

Commit a snapshot of all changes in the working directory. This only includes modifications to tracked files (those that have been added with git add at some point in their history).

$ git commit -a

Combining all the above you can simply do :

$ git commit -am "Added hello.txt file"

7. Update your remote repo with master branch of the original repo.

While you’re working, many other developers around the world have been busy merging changes to the original repository. Most likely there won’t be overlap, but there may be some merge conflicts if two people have made changes to the same Instant Answer.

It’s best practice to start each work session by updating your fork with the latest changes. This is one major reason we kept master free of changes. We can use it as an ongoing reflection of the original repository’s master branch.

To do this, you’ll need to add a ‘remote‘ that points to the original, main repository. We’ll call it upstream.

In this case the command will be :

$ git remote add upstream https://github.com/sagarhani/learn-git

Update your master branch. Move to master branch to by git checkout master

Pull the updates form the upstream

$ git pull upstream master

This will pull the changes from the latest master branch into yours, so you’re up-to-date.

Next, to update your working branches off of master, merge or rebase with the master branch.

If you encounter any merge conflicts, don’t worry, GitHub has a great guide for how to resolve them. πŸ˜€

8. Make a pull request

If you want to submit your changes, you need to make a pull request on the original (upstream) repository.

A pull request is the process of submitting changes to a collaborative project. It’s your way of asking that the changes made on your fork be incorporated into the original repository.

The first step to making a pull request is updating the clone of your repository that lives up on GitHub.com. Go to the branch you’re working on, and type:

$ git push origin my-feature

This updates the equivalent branch on GitHub.com. Next, visit your repository on github – https://github.com/{your_username}/learn-git. Find the branch you just pushed. Finally, click the Pull Request button.

9. Update your pull request

Once you have created a pull request, you pull request page will be the place where the feedback/discussion takes place. Usually the repo owner comments on the page if any changes is required.Β  You can continue to make ongoing changes to your pull request. Simply keep making commits – and push them your fork on Github – and the pull request will update automatically. Once it is satisfied by the repo owner he/she will merge it. πŸ™‚

Bingo! You made some contribution to that project. πŸ˜€