Commit Graph

219 Commits

Author SHA1 Message Date
aditya-K2 24f94fc4e5 Minor Changes : Rename totalPath -> absolutePath 2021-10-17 21:53:39 +05:30
aditya-K2 680b41cb6e Updated FileNode Struct
Added New Field `absolutePath` to FileNode struct. This helps in adding
the song to the playlist through the Add Button.
2021-10-17 21:51:01 +05:30
aditya-K2 eecb86ed8f Updated the Client Functions
Before the Update Function needed the currentDirectoryMap ( the
Functionality was not confirmed ) as a parameter but now I have removed
the currentDirectoryMap. Instead I have added totalPath ( going to
rename this to `absolutePath` )  to the FileNode Struct which is added
during the generation of the directory Tree whenever the selected field
is called we can just pass the totalPath.
2021-10-17 21:42:02 +05:30
aditya-K2 b6133cd1c9 Added Title To progressBar
The progressBar now has title which displays
the Current Status.
2021-10-17 13:15:52 +05:30
aditya-K2 7ce6def361 rename convertToStrings -> strTime 2021-10-17 11:21:26 +05:30
aditya-K2 a8f6c78461 A Simple Implementation of ProgressBar
The ProgressBar is just a string which has a length equal to the
innerRect of the table. The length of the innerRect is considered to be
100% and the rest of the progress is tracked in relation to it.
The Progress is displayed with the help of the color formatting strings
in tview
       link: https://pkg.go.dev/github.com/rivo/tview#hdr-Colors

the progress length which is calculated by finding the percentage of the
innerRect that matches with the given completion and then at that length
the "[-:-:-]" is inserted with the help of the insertAt function in
utils.go. "[-:-:-]" represents resetting of colors.
2021-10-17 11:10:38 +05:30
aditya-K2 0b08b284ab Refactoring of the Components
To Achieve focus functionality we need to separate each of this
Components so I have extracted the Components out.
2021-10-14 22:04:16 +05:30
aditya-K2 b4e6402a25 Added Update Function
This function will be useful to update the expanded view whenever user
navigates the file browser. The expanded view is a table which shows the
directory content.
2021-10-14 22:02:29 +05:30
aditya-K2 a41e060866 minor changes in formatting 2021-10-13 00:07:39 +05:30
aditya-K2 5f9c5fde52 Added Basic Layout and Using tview package for TUI
Decided to Go with tview package for building TUIs and
just added the basic layout of the app.
The Idea is to have a side menu to navigate between the other options.
Just like spotify-tui ( Which has taken inspiration from the orignal
spotify Client) and Having a progress bar at bottom ( Still figuring out
how to implement this )
2021-10-13 00:00:16 +05:30
aditya-K2 b722d53684 Update go.mod 2021-10-11 14:17:26 +05:30
Aditya Kurdunkar c5997251e4
Update README.md 2021-10-11 14:12:51 +05:30
aditya-K2 91de613758 Added Print() Method to FileNode Struct
This Method Is Useful for Printing the Children of the Node
recursively. Useful for debugging Purpose.
2021-10-11 13:54:51 +05:30
aditya-K2 99e0e8e615 Added generateDirectoryTree()
This function which generates a Directory Tree
from a given path string
for e.g
    if the String that is given is "home/what/dir" , "home/hello/foo"
	then it will return a FileNode ( Struct )
	which looks like this
	head{
	    [{
		[
		    {
			[ { [] dir } ]
			what
		    },
		    {
			[ { [] foo } ]
			hello
		    }
		]
		home
	    }]
	    "root"
	}
2021-10-11 12:09:24 +05:30
aditya-K2 94e86335b2 Added addChild and addChildNode functions (WIP) 2021-10-10 01:29:22 +05:30
aditya-K2 0c107c3a72 All the File Browsing Related Functions and Structs are inside the FileBrowser.go file.
The Idea is to Implement a tree of sorts (At least for now) and then displaying the children of the current Node and traversing them.
2021-10-09 22:34:11 +05:30
aditya-K2 c0f3b6e920 All the Client related activities are in client.go 2021-10-09 17:21:47 +05:30
aditya-K2 17ad4df66b intial commit 2021-10-08 23:24:45 +05:30
Aditya Kurdunkar 6c38ce3074
Initial commit 2021-10-08 20:22:09 +05:30