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.

Friday, 12 March 2021

App Release: OneSignal Push Manager - Secure & Free (Android+Web)

OneSignal Push Manager - Secure & Free (Android)
OneSignal Push Manager - Secure & Free
This app helps you manage your app credentials and provides intuitive UI for sending the notifications to your users.

Android: https://play.google.com/store/apps/details?id=com.sarbakaf.onesignalpush

Android app to manage & send push notifications via OneSignal

Features

  • Manage all your apps
  • Stores all your credentials in your phone
  • Offline storage, open-source and hence trustworthy
  • CRUD for app info with lovely UI
  • Simple notepad to save other necessary stuff
  • Send notifications to any of your apps, in any segment
  • From simple heading + message notifs to fancy ones, with icon, banner and extra data to pass-in the app (useful for deeplinks)

User Guide

  1. Get your "App ID" and "REST API Key" from OneSignal Dashboard.
  2. It is recommended by OneSignal NOT to save API key anywhere, therefore our app doesn't save it by default. It's optional.
  3. In the "APPS" section of our app (Push Manager), make a list of app names and IDs.
  4. In the "SEND NEW" section, fill the details and send in a segment of your choice.
  5. Button 1 can be used to send in a segment named 'Test', which you can configure from OneSignal Dashboard for your test devices.
  6. Button 2 can be used to send in a segment named 'All'.
  7. Button 3 can be used to send in any custom segment.
  8. Notepad can be used to jot down & save other necessary stuff.
  9. Profit?

Questions, suggessions and contributions are welcome.

The app is also available as a webapp for testing purposes here:  https://onesignal.netlify.app/

Shakeeb Ahmad

shakesvision

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!πŸ‘‹