My new app AfsaneDB (Beta) is now in PlayStore!

Those who love reading classic literature can now enjoy literary masterpieces in this beautifully designed app.

Thursday, 31 December 2020

My New Year Resolution for 2021

 Off you go 2020! Quite a year it was, wasn't it? 

It started with the best thing happened to me till date, the journey to the Holy cities of Mecca and Medina, Saudi Arabia, for 'Umrah. It was overwhelmingly wholesome. Alhamdulillaah! [1] I'm yet to document the experience, but I do have the poetry ready, which you will see on the blogs soon.

Then just about a month later, the covid pandemic started and finally the lock-down. Ramazan [2] came and went by, we couldn't offer prayers in the mosques. Eid-ul-fitr was same. So was Eid-ul-Azha. [3] Sad sad times those were. 

It did bring some positive changes too. We had a lot of free time. People actually started working on things they were passionate about. 

Resolutions

First of all, note that making resolution DOES help. 10/10 recommended. It keeps you focused. It gives you a list to work on. It tells you where to concentrate your efforts. 

When you make one, it might not seem realistic at first, even to yourself. Rather, specially to yourself. But the motivation and consistency it provides easily make you more productive than you were before. 

The key is being motivated. They say, around 90% of people who make resolutions drop them by the end of January. You don't want to be one of them. 

2020

Even when a lot of things which were in the resolution of 2020 are still in pending, I was pleasantly surprised by how much I did finish off. 

The only thing I miserably lagged in was "writing" stuff. I put more effort in development and left the actual writing behind. I miss it. 

2021

  • Releasing new apps consistently, many of which are in the queue right now, about ready for production
  • Hifz (Memorizing Quran)
  • Publishing book-reviews on blogs
  • Finishing incomplete Novel, Translations, Books/Booklets etc.
  • Magazines - Sarbakaf and Personal Bi-Weekly
  • Publishing Videos
  • Interviews
  • Portals Management
  • + Resolutions from last year

Last Words

As I'm writing this, the third decade of the 21st century is on the verge of knocking the doors of times - bringing joys and cries, hope and despair, turning the pages of  everyone's destiny. 

I don't know what this new year will bring, but I am nothing but my dreams. I will continue chasing after them.

________

Footnotes

[1] Alhamdulillah - An expression loosely equivalent to "Thank God", used for gratification/achievement. See Alhamdulillah.

[2] Ramazan is considered a holy month, 9th month as per Islamic Hijri calendar, which is observed worldwide as a month of fasting. See Ramadan.

[3] Eid-ul-Fitr and Eid-ul-Azha are the 2 major Muslim festivals celebrated worldwide.

iPhone Users! Here's a Web App for Qaafiyah Expert

Tldr;

If you are in a hurry, here's the link to Qaafiyah Expert - Web:

The Web App and its Journey

Right from the beginning when I launched an android app for Qaafiyah Expert (an app to assist Urdu poets with rhymes, meter, dictionary, diary, designing and much more), people were requesting the same for iPhone users. As I was using the cross-platform approach for the app, building the same thing for iPhone wouldn't have taken so long. But the problem was, apple AppStore's pricing. I couldn't afford it. Well, most of us can't.

Anyway, after some research on pricings, I decided to go for a PWA (Progressive Web App), which is an installable app, but you don't need to pay a single penny to Google or Apple whatsoever. 

It does bring some drawbacks, but there are alternatives for most of the incompatible native-app functionalities. For a naรฏve user though, PWAs and native Android/ios apps are indistinguishable. For instance:

  • Visiting a Progressive Web App asks you to "Add it to Home Screen", which is alternative to "Installing an app"
  • It does have an icon, just like a native app
  • It can work offline using service workers etc.
This PWA for Qaafiyah Expert had been hosted on my domain 'q.shakeeb.in' for quite a while now, as you can see in the "first commit" here. But some of the features were not working as expected, so I didn't announce it "officially." Now that the android app has been completely rewired, performance is improved and speed is optimized, I decided to use the new code-base, modified it for the web-app and deployed it. iPhone users can now finally use this app.

If you are an android user though, I strongly recommend the android version, which has some cool extra features and obvious UX advantages.

Once again, here's the link to the web-app:

Qaafiyah Expert - Live Demo

Hope this will assist in your poetry-writing journey. 

Rab raakha! ๐Ÿ‘‹

Thursday, 24 December 2020

Rekhta Content Scraper by Shakeeb Ahmad | For Programmers Only

Note: This is not yet available for non-programmers. Soon I'll make an easy-to-use version for all, iA.

This scraper with Node.js works for both prose and poetry. Check the GitHub repo for installation instructions.

You would need a text file with all the links you want to download the contents from. To get the list of links, you could manually collect all which interests you, or use the following to scrape all links from an author/poet page.

Bookmarklets - One Click Solution to get the links etc.

Rekhta loads 50 links at a time, and if user scrolls, it adds more content to the DOM. This extra fetch has not been automated in my code yet. (Well I tried, but parsing it wasted so much time that I preferred using manual scroll. Just let the page load, then press "end" on your keyboard. Wait for a moment, it will add all the remaining links.)

Anyway, once you have the complete list on the page, you can use the bookmarklets below to copy all of them with a click.

I've been testing this in browser console for a while now, i.e. open browser console, then paste the script, then change the page text to only what I need, then select and copy them manually. 

Later on I decided to use magic of bookmarklets to automate these tasks I've been doing repeatedly: 

  • Copy all the links from the Poet/Author page.
  • For LitUrdu specifically, turn them into an "object" with required properties (title, author, link, description, text) and copy it.
  • Use the "object" to automatically fill-in text-boxes on new Blogger post.
Ultimate plan is to use Blogger API and post it directly, but this bookmarklet approach doesn't hurt much because most of the things I'm doing are just a click away.

Bookmarklets
Drag and drop the links to the bookmarks bar in your browser. (Ctrl+Shift+b to toggle the bar)
Use on author/poet's page to copy all the links to their enlisted work
Use on individual poem/story page to copy an object with properties (title, author, link, description, text). Modify as per your needs.
Use on a new Blogger post after pasting the "object" from rekhta in console. This will fill in all the required fields in the new post automatically.

Saturday, 3 October 2020

Magic of Browser Bookmarks - Automate Simple Tasks using JavaScript

Automation using Bookmarklet

As I promised in #LearnedToday, I'm going to show you how much you can achieve with this little bookmark feature in the browsers.

Ever wondered how to easily remove citations from a Wikipedia page? 

What are bookmarks?

The bookmarks in the browsers are to save the links to the pages you wish to visit again, or you just find them useful and save them for later. 

Instead of creating a text file "Imp Links" and saving all the links there (I've done it a lot), you could use the browser's bookmark feature.

The shortcut to bookmark a webpage in most browsers is ctrl+b.

What more can they do?

To sum up, they can run JavaScript on a page. So instead of opening the browser console to do run a couple lines of code, you could create a bookmark and click that instead.

Example?

Whenever I needed to copy something from Wikipedia, I usually had to deal with the references/citations they have. You must've seen those, with squared brackets around numbers, something like this [1] or with a disclaimer like [citation needed], etc. I needed to remove all those. 

Initially, I used to do it in MS Word manually, by Find and Replace. I don't remember that now, doesn't matter anyway. 

Finally, I came to know about these browser bookmarklets, and then a simple regex was enough to do the work for me.

Now I have a simple bookmark. I go to any Wikipedia page, select the text I need, and click the bookmark. Viola! Citations are removed.

How to create a bookmarklet?

Got to Bookmarks Manager

1. Click three vertical dots in the upper right corner > Bookmark > Bookmark Manager

Or chrome shortcut: ctrl+shift+o

Or type in the address bar: chrome://bookmarks/

2. Click three vertical dots in the upper right corner of Bookmark manager (Shows tooltip: Organize) 

3. Add new bookmark

4. It will show a popup with two fields: Name and URL. 

5. Give any appropriate name, and in the URL bar, paste the JavaScript code you want to execute.

6. Click Save. 


You have your bookmarklet ready. 

Show/Hide Bookmarks bar with ctrl+shift+b. Clicking on the name of your bookmark will run the underlying code. 

Any easier way to do this?

If you don't want to go through all those steps, there's a simple tool called Bookmarkleter. Paste your JS code, it will generate a link that you can drag and drop to the bookmarks bar. 

For example, drag and drop the following link to your bookmarks bar. This will allow you to change fonts on any website. 

Which bookmarklets am I using?

  1. Citation Remover: Removes citations from a Wikipedia page. Drag&drop this link to the bookmarks bar: Citation Remover
  2. Set Font: If a website is using bad font, use this. As I use Urdu a lot, and Urdu without Nastaleeq font looks ugly. So I apply any font to the page available in my system. Payami Nastaleeq is the default one for me.
  3. Calci: A tiny calculator which returns results of simple arithmetic operations.
  4. StyleStripper: Strips all CSS styles from a webpage. Helpful if I don't want to load an entire page I want to copy something from. Also works on most of the sites which disable copying using JavaScript. Click StyleStripper and you can copy the text. 

Misc. bookmarklets I created

QuoraSkip: Skip Quora-enforced 'login' popup by removing added elements and blur overlay.

To those who requested, don't complain now. (Abuzar :D) I have shared it finally. More such tips will follow. Keep visiting! And I know you will. :wink:

Rab Raakha!

Friday, 2 October 2020

PDF to Single Image - A Tutorial by 17 Year Old Me

Back in the days when I had a small Nokia phone, I wanted to do EVERTHING in that tiny device. It wasn't actually mine but because I was going to college, I was more "in need" of it than my sister.

Nokia-C1-01 Phone I had in my Engineering
Source: gsmarena.com [1]

The one on your right with maroon border. That was it.

Anyway, with a screen of 144x160px, I wanted to read PDFs which were stored in our desktop + laptop. Lots of books, of almost all genres I was interested in. Interestingly enough, the same neatly arranged folders are copied over to every computer I have used. So I still have all those books, plus what was added later on.

Initially, the idea to "read PDF on phone" was for the Quran, so that I could read it in the Indo-Pak Naskh font. Actually I had a Quran app in it, full text with super fast search engine, but the font used in that wasn't good enough for long tilaawat. In fact, even after getting android phone I've been searching something as fast as that app. I had been a fan of that guy who built it. Just looked it up, he goes by the name of Raza Mahi. His "Mahi Dictionary" was awesome too. All java .jar applications are things of the past now, but he has also moved on and started to build the similar apps for Android now. Good for him. I've linked his website in the references. [2]

So where was I? Yes. As I had difficulty reading the Quran in that app, I selected a PDF copy of Quran which had Arabic text in one column and its Urdu translation side-by-side. I cropped-out the translation part (making the text narrow enough to fit on my phone) and then started thinking about a way to achieve the result.

Necessity is the mother of invention they say, so I came up with two methods (discussed in the booklet below). Will attach the Quran files too for the record. Wow! Time flies. Seems like yesterday to me.

Later on when I converted many books to 'single image' using the same method, I compiled a short tutorial in the form of a booklet. I've left the whole text as is, without any correction in grammar or sentence structure, because

  1. It's a reminder of my journey (read the booklet and see for yourself how writing styles change)
  2. It's cute. ;)
Here's the summary of the two methods discussed in the booklet:

Method 1: Microsoft Office OneNote + MS Paint
Method 2: PDF to Images + IrfanView

Read the booklet and know how to use them. And remember it's an OLD tutorial.

DOWNLOADS

PDF to Single Image Tutorial (Booklet) : Read online or download

https://archive.org/details/PDFToSingleImageShakes.Ahmad

IrfanView: I came to know later on that this was very popular image-manipulation tool back then, and still is. Its first release was in June 1996. Now it's more powerful than ever. Check its Wikipedia page.[3]

https://www.irfanview.com

PDF to Images Converter: I still use it. Small size, works smoothly.

https://www.weenysoft.com/free-pdf-to-image-converter.html


Enjoy!


Reference

[1] Specifications of Nokia C1-01 via gsmarena [link]

[2] Raza Mahi Team - Old Apps [link]

[3] IrfanView on Wikipedia [link]

Wednesday, 1 July 2020

Beginning second half of 2020 — Resolutions?

Yep! That's it. It doesn't stop. 

And sadly enough, the past 4 months we all have been locked up in the lock-down. People like me are in luck, because we don't go out much anyway. Now that we have loads of free time, a lot of my friends planned interesting activities they've been dying to involve in for ages. And guess what? They are actually doing them. I know right?



Anyway! The things I'd planned have really been a mess in my head as always, but writing the resolution actually made me do some work this time. So folks, writing down ideas help. 

Resolutions

Time to see what I did from things I planned in the beginning of this year. 

Maintaining my personal log/diary/rant etc. 

Nope. Never doing that. Because it needs time and I'm busy stuffing my head with new "knowledge" all the time. ๐Ÿ˜ It's not a priority anyway. I don't know why I chose this in the first place. ๐Ÿ˜ค

LearnedToday

I started writing this with a hashtag on facebook, and till date I've written 29 of them. In six months, minus 15 days of Umra, It should've been at least a hundred, but anyway. After a long time I did something consistently. And I'm proud of it. 


Weekly – Start posting the stuff I learn every week

Actually a good idea. Did I do something? Nope. Will do? iA. ๐Ÿ˜

Sharing – Personal experience + Psychology + Self-help + Philosophy etc.

OK no joking from here. This is actually not on the priority, when I'll be done with the REAL work, I'd start spreading my gyaan. I hope I start it this very year though. 

Works – previous & current (writing+projects)

Red alert. This ranks highest on my priority list. And I'm pretty positive about this with myself. Alhamdulillah! You'll see in the upcoming days.

Tutorials for absolute beginners

Yep, but not unless I find something which has not been done before in the way I'm planning. Have worked on some tutorials actually.

Reading

Finished more than five books of different lenghts. I'm also planning to start writing reviews of them both in English and Urdu. Not quite sure how writing English reviews for Urdu stuff would go. 

Reviewing English stuff in Urdu would be fun. So that ain't going anywhere.

___

That was a little overview. 

Lastly, an exciting news! Urdu Mehfil has completed its 15 years. May Allah keep it alive and make it more beneficial for the Urdu community. 

The birthday celebrations of Urdu Mehfil always push us to contribute. Good for me. 

Rab raakha!๐Ÿ‘‹

Monday, 15 June 2020

Ham Pe Saaqi Ki Inaayat - Ghazal

To read in Urdu (Perso-Arabic script), click here.

English (Roman)


Ham pe saaqee ki inaayat se jale jaate hain
Ye jo ab tak kaf-e-afsos male jaate hain

Yaad aa jaatee hain besaakhta baaten unki
Besabab hont tabassum mein dhale jaate hain

Vaqt-e-rukhsat ki pas-o-pesh unhen kya maaloom
Dil ruka jaata hai jaane se vale jaate hain

Rafta-rafta dam-e-aakheer bhi aa pahunchega
Raat-din vasl ke vaadon pe tale jaate hain

Jaaiye kuchh nahin kehte, jo hua hai so hua
Saare ilzaam muqaddar ke gale jaate hain

Zabt-e-girya men Shakeeb aapne paaya hai kamaal
Unki galiyon se bhi chup-chaap chale jaate hain


Hindi (Devanagari)


เคนเคฎ เคชे เคธाเฅ˜ी เค•ी เค‡เคจाเคฏเคค เคธे เคœเคฒे เคœाเคคे เคนैं
เคฏे เคœो เค…เคฌ เคคเค• เค•เคซ-เค-เค…เฅžเคธोเคธ เคฎเคฒे เคœाเคคे เคนैं

เคฏाเคฆ เค† เคœाเคคी เคนैं เคฌेเคธाเฅ™เคคा เคฌाเคคें เค‰เคจเค•ी
เคฌेเคธเคฌเคฌ เคนोंเคŸ เคคเคฌเคธ्เคธुเคฎ เคฎें เคขเคฒे เคœाเคคे เคนैं

เคตเฅ˜्เคค-เค-เคฐुเฅ™เคธเคค เค•ी เคชเคธ-เค“-เคชेเคถ เค‰เคจ्เคนें เค•्เคฏा เคฎाเคฒूเคฎ
เคฆिเคฒ เคฐुเค•ा เคœाเคคा เคนै เคœाเคจे เคธे เคตเคฒे เคœाเคคे เคนैं

เคฐเคซ़्เคคा-เคฐเคซ़्เคคा เคฆเคฎ-เค-เค†เฅ™ीเคฐ เคญी เค† เคชเคนुँเคšेเค—ा
เคฐाเคค-เคฆिเคจ เคตเคธ्เคฒ เค•े เคตाเคฆों เคชे เคŸเคฒे เคœाเคคे เคนैं

เคœाเคˆเค เค•ुเค› เคจเคนीं เค•เคนเคคे, เคœो เคนुเค† เคนै เคธो เคนुเค†
เคธाเคฐे เค‡เคฒ्เคœ़ाเคฎ เคฎुเค•़เคฆ्เคฆเคฐ เค•े เค—เคฒे เคœाเคคे เคนैं

เฅ›เคฌ्เคค-เค-เค—िเคฐ्เคฏा เคฎें เคถเค•ीเคฌ เค†เคชเคจे เคชाเคฏा เคนै เค•เคฎाเคฒ
เค‰เคจเค•ी เค—เคฒीเคฏों เคธे เคญी เคšुเคช-เคšाเคช เคšเคฒे เคœाเคคे เคนैं

Meanings

Saaqi (เคธाเฅ˜ी): one who serves wine, a sweetheart, เคถเคฐाเคฌ เคชिเคฒाเคจे เคตाเคฒा , เคฏाเคจी เคฎेเคนเคฌूเคฌ 

Inaayat (เค‡เคจाเคฏเคค): blessings, เค•เคฐเคฎ, เคจเคตाเฅ›เคจा 

Kaf-e-afsos malna (เค•เคซ-เค-เค…เฅžเคธोเคธ เคฎเคฒเคจा): hand wrung in distress, เค…เฅžเคธोเคธ เค•เคฐเคคे เคนुเค เคนเคฅेเคฒिเคฏों เค•ो เคฎเคฒเคจा 

Be-saakhta (เคฌे-เคธाเฅ™्เคคा): spontaneously, extempore, เค…เคšाเคจเค•, เคธเคนเคธा

Be-sabab (เคฌेเคธเคฌเคฌ): without any reason, เคฌे เคตเคœเคน 

Tabassum (เคคเคฌเคธ्เคธुเคฎ):  smile, เคฎुเคธ्เค•ुเคฐाเคนเคŸ

Pas-o-pesh (เคชเคธ-เค“-เคชेเคถ): hesitation, indecision, เค†เค—े เคชीเค›े เคนोเคจा, เคिเคœเค•, เคนिเคšเค•िเคšाเคนเคŸ 

Vale (เคตเคฒे): yet, however, เคฒेเค•िเคจ 

Vasl (เคตเคธ्เคฒ): union, meeting,เคฎिเคฒเคจ

Zabt-e-Girya (เฅ›เคฌ्เคค-เค-เค—िเคฐ्เคฏा): holding back tears, เคฐोเคจे เคชเคฐ เฅ˜ाเคฌू เคชाเคจा, เค†ँเคธू เคจा เคจिเค•เคฒเคจे เคฆेเคจा