Skip to content

Mas9311/task-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

List of Tasks

image

Consolidate your todo lists.

Usage

  1. Download this repo, and open a Terminal window.
  2. Extract or unzip the task-list-1.0.2.zip file, then delete the zip.
    • I recommend creating a general Software folder, mkdir ~/Software/, so your applications/software don't accumulate in ~/Downloads/ or ~/Desktop/.
    • Move the new task-list-1.0.2/ folder into the ~/Software/ folder.
  3. cd into task-list-1.0.2/.
  4. To run the menu-driven program, type python3 run.py
  5. Or to just print all of your lists, type python3 run.py print

Want to Make an Executable?

Personally, I don't want to cd into ~/Software/task-list-1.0.2/, and type python3 run.py to run the menu program every time, so follow these steps to either create an executable or an alias.
I named mine tasks and ptasks, short for print tasks.
I know it looks like a lot to read, but it's a step-by-step walkthrough, so bear with me.

Note: only one version of this program can be in ~/Software/ at a time.
If you've downloaded two versions of this program, move the preexisting my_lists/ folder to the newer version, then delete the older version entirely.

Linux users

First, you have to decide if you want to create a desktop launcher or just create an alias.
Both will allow you type the given name into Terminal to run the commands we're about to create.

Note: If you did not move the task-list-1.0.2/ folder into ~/Software/ , then replace the '~/Software/' path with the actual path in the text found below.

Create a Desktop Launcher

These steps will assist you in creating the executables and desktop launchers for tasks and ptasks.

  1. sudo -s and type your password to elevate privileges to root until you type exit or close the Terminal window.
  2. Now that you are root, copy and paste the following blocks into Terminal:
echo $"\n# tasks can be executed from anywhere, including a desktop launcher!\n" >> /usr/bin/tasks
echo "cd ~/Software/task-list*/;" >> /usr/bin/tasks
echo "python3 run.py" >> /usr/bin/tasks
chmod +x tasks
echo $"\n# ptasks can be executed from anywhere, including a desktop launcher!\n" >> /usr/bin/ptasks
echo "cd ~/Software/task-list*/;" >> /usr/bin/ptasks
echo "python3 run.py print" >> /usr/bin/ptasks
chmod +x ptasks

Your executables, tasks and ptasks, are now able to be called, in Terminal, from any folder!
Let's go make that desktop launcher.

  1. Right click any spot on the Desktop.
  2. Select [Create Launcher...] and do the following:
    • Name: Task-List
    • Command: tasks
    • [✓] Run in Terminal
  3. Click [Create].
  4. Open the new launcher and click [Mark Executable] when prompted.
  5. To make ptasks, follow the same general steps, but set the configuration to be:
    • Name: Print Tasks
    • Command: ptasks
    • [✓] Run in Terminal
    • Icon: Print Tasks icon which can be downloaded here!

You do not need to continue to the next section, as the executables in /usr/local/bin/ have elevated privileges.
If you end up hating this program, you can remove the executables with:

  • sudo rm /usr/local/bin/tasks /usr/local/bin/ptasks.

Create an Alias

Instead of doing the 7 steps listed above, these will achieve the same goal.
BUT you cannot properly run a desktop launcher via an alias.

  1. Copy and paste the following block into Terminal:
echo $'\n# task-list program aliases' >> ~/.bash_aliases
echo 'alias tasks="cd ~/Software/task-list*/; python3 run.py"' >> ~/.bash_aliases
echo 'alias ptasks="cd ~/Software/task-list*/; python3 run.py print"'  >> ~/.bash_aliases
source ~/.bash_aliases

Your aliases, tasks and ptasks, are now able to be called, in Terminal, from any folder!

If you end up hating this program, you will have to manually remove the aliases with:

  • nano ~/.bash_aliases.
  • Delete the task-list entires found at the bottom.
  • Press [Ctrl X] to exit.
  • Press [Y] to save your changes.
  • Press [Enter] to save the name of the file as is.
  • source ~/.bash_aliases