Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,161,647 members, 7,847,696 topics. Date: Sunday, 02 June 2024 at 02:02 AM

Building My TODO Terminal App Using Bash - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Building My TODO Terminal App Using Bash (348 Views)

This Is My Journey Building My Tech Startup. I Hope It Inspired You! / I Finally Built A Todo App. / Currently Building My First Ecommerce Site From Scratch (2) (3) (4)

(1) (Reply) (Go Down)

Building My TODO Terminal App Using Bash by Deicide: 10:25pm On May 16, 2022
Wanted to use python to build this just for fun but then I realised that using bash would be more flexible grin So Nlanders, join me on this journey wink any suggestions or ideas are welcomed.

PS
Am using termux terminal on Android to build this.

1 Like

Re: Building My TODO Terminal App Using Bash by Deicide: 10:34pm On May 16, 2022
First thing first. Where to store what to do? Since this is a simple Todo app we wouldn't be storing it in any kind of relational database like MySQL or sqllite etc. We'll be using simple ".txt" file. lipsrsealed though I might change to ".Json" format later? I think that would be more flexible.

For now this is the code I have.

1 Like

Re: Building My TODO Terminal App Using Bash by Deicide: 11:09am On May 20, 2022
After lots of thinking and well for flexibility, I decided to go with Json text format grin that way I can access data easily.

I also have to define data that would be needed for the Todo list. Honestly I don forget watin Todo list suppose to day do o cheesy

1 Like

Re: Building My TODO Terminal App Using Bash by Deicide: 11:19am On May 20, 2022
Now the logic for storing the task in Json. I did my research and discovered that I can use a tool called "Jo" to process data to JSON format. So....

pkg install jo
grin

The logic for storing the data in the Json file is in the picture below.

1 Like

Re: Building My TODO Terminal App Using Bash by Deicide: 11:23am On May 20, 2022
We could test this logic by adding some data Todo in the Json file.

./todo add "Go to the supermarket"

./todo add "Take friend out to the mall"


The processed output look something like this.

1 Like

(1) (Reply)

Is Cybersecurity Hard To Program / Simple Wordpress Delete User API / Learn How To Design A Standard Websites And Online Platforms With Your Phone

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.