Commit Graph

251 Commits

Author SHA1 Message Date
aditya-K2
452d6913f2 minor changes: Rename t -> inputTable 2021-10-29 09:44:55 +05:30
Aditya Kurdunkar
d1374f8c99
Update README.md 2021-10-28 14:50:16 +05:30
aditya-K2
1df874fb6a UPDATE README 2021-10-28 14:42:13 +05:30
aditya-K2
e7843cedf1 Information for #1 added to README 2021-10-28 14:32:58 +05:30
Aditya Kurdunkar
eb1fcda1af
Update README.md 2021-10-28 11:45:14 +05:30
Aditya Kurdunkar
c5086126ec
Update README.md 2021-10-24 13:43:06 +05:30
aditya-K2
758fd710fe UPDATE README 2021-10-24 13:32:07 +05:30
aditya-K2
52d8009396 UPDATE README 2021-10-24 13:30:50 +05:30
aditya-K2
3ad3e58019 Image Previews Implementation 2021-10-24 13:26:10 +05:30
aditya-K2
9b1e8fd4f7 Image Preview Utilities
render.go : This File Contains the implementation for the Renderer which
is a channel that will receive strings to the path of decoded images)
the path is sent with the help of Send() method. The Start() method
starts the go routine OpenImage() this function blocks the image as it
keeps listening over the channel. which helps in not drawing the image
again and again.

imageUtils.go: This file contains the helper function for decoding
images.
2021-10-24 13:15:45 +05:30
aditya-K2
daaf99a1a7 Added a new Preview Box which will render album covers 2021-10-24 01:38:55 +05:30
aditya-K2
98a6b0717a minor Changes 2021-10-24 01:34:28 +05:30
aditya-K2
46d721ffb4 pressing q now quits out of the application 2021-10-24 01:33:20 +05:30
aditya-K2
930cc2b83f Merge branch 'master' of github.com:aditya-K2/goMP 2021-10-24 01:31:13 +05:30
aditya-K2
62bf15ea27 Ueberzug Integration
`https://gitlab.com/diamondburned/ueberzug-go` is a go implementation of
ueberzug. Also The Cover Art is being retrived through the metadata
parser from `dhowden` called `tag`.
2021-10-24 01:28:11 +05:30
Aditya Kurdunkar
5275ac497f
Update README.md 2021-10-19 18:58:11 +05:30
aditya-K2
e5e0dad16c Added Padding Between the name and progressBar
Also added color to the title
2021-10-19 11:59:40 +05:30
aditya-K2
c60a780358 Fixed the Resizing Problem of ProgressBar
the progressBar previously when resized could not sustain the artist
name and title now the progressBar size is fixed.
2021-10-19 11:58:01 +05:30
Aditya Kurdunkar
cf2ecbf5f3
Delete demo.gif 2021-10-18 13:51:59 +05:30
Aditya Kurdunkar
42aaadbbd3
Update README.md 2021-10-18 13:51:41 +05:30
aditya-K2
4231228703 Minor changes to README 2021-10-18 13:29:23 +05:30
aditya-K2
3ded1e6431 Update README 2021-10-18 13:28:53 +05:30
aditya-K2
ac6cf03765 UPDATE README & Minor changes to App.go 2021-10-18 13:21:09 +05:30
aditya-K2
fb3a70a1ee color changes 2021-10-18 13:18:56 +05:30
aditya-K2
e137dc6c1e added Draw Function for expanded View
The Draw function is decided with the help of the InsidePlaylist boolean
value.
2021-10-18 12:18:51 +05:30
aditya-K2
1fa411fb1d Layout for Playlist/ Song View
There are two ways the information is shown if the Node is a directory
then the relativePath is shown else the attributes of the song are
shown.
For this Layout ( song attributes ) We can divide the Screen three Part

|   Title     |     Artist    |   Album     |
|             |               |             |
|             |               |             |
|             |               |             |
|             |               |             |

~~~~~~~~~~~~~  Screen Width  ~~~~~~~~~~~~~~~~~~~~~~

if the length of each of the attribute is less than ( Screen Width / 3 )
    then we can add spaces to the end else we can shorten the string to
    fit into the screen width
    this functionality is done with the help of `getFormattedString()`
2021-10-18 12:12:10 +05:30
aditya-K2
e84e317079 Refactored the Startup Setup into A new Struct
- Added A new Struct Application which has all the other components as
  its fields
  -- the `newApplication()` Function returns a pointer to the newly
  created Application from which other fields can be accessed. The
  fields are as follows

	|   App          *tview.Application
	|   expandedView *tview.Table
	|   Navbar       *tview.Table
	|   searchBar    *tview.Table
	|   pBar         *progressBar

- Minor changes to main.go
2021-10-18 08:13:21 +05:30
aditya-K2
c6d2e8d8af Added Playlist Functionality
Using Switch case for mappings and removed Cycling

The Feature of Cycling through all the windows now seems useless instead
I am assigning each of the windows a number and one can cycle through
them using the number keys.

Also now the default window is the playlist window instead of the files
tab. The mappings are separated with the help of the global boolean value
InPlaylist
2021-10-18 07:51:57 +05:30
aditya-K2
db9887c041 Added UpdatePlaylist Function
the UpdatePlaylist function updates the table `t` that has been passed
to it and fills it with the current playlist. Also I have removed the
addsong function which felt unneccesary and unused.
2021-10-18 01:27:30 +05:30
aditya-K2
11eb7c35b6 Working Prototype for the Files Navigation
Heavy Refactoring is needed for this. The Required Mappings have been
added and the Delay in keyboard input has been fixed. The Delay in
keyboard input was due to Queueing the events ( although it was a go
routine ). The Solution was to use just Draw() Method from tview.Application.
2021-10-17 22:30:57 +05:30
aditya-K2
9e69ed9f1e Minor Changes to ProgressBar
Some Information from the ProgressBar has been removed.
2021-10-17 22:29:56 +05:30
aditya-K2
c3ede5403e minor changes in formatting
fixed the blinking text issue
2021-10-17 22:28:06 +05:30
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