README.md with update to requirements

This commit is contained in:
Xevion
2019-10-27 19:17:53 -05:00
parent acb3b7d0d4
commit 5659f2c4d7
5 changed files with 72 additions and 12 deletions

61
README.md Normal file
View File

@@ -0,0 +1,61 @@
# spotify-data
## About
The purpose of this repository/project is to capture my liked songs from my Spotify account, and then create a stacked bar graph representing my explicit vs non explicit songs.
Yes, the project is super simple and doesn't have that much usefulness, but it's the first time I've genuinely used `matplotlib` or `logger` in a serious context and it was definitely interesting.
## Demonstration
![Output Matplotlib Stacked Bar-graph](./graph.png)
```python
> python main.py
INFO:root:Pulling data from Spotify
INFO:root:Authorizing with Spotify via Spotipy
WARNING:root:May require User Interaction to authenticate properly!
INFO:root:Authorized with Spotify via Spotipy
WARNING:root:Clearing all files in tracks folder for new files
INFO:root:Cleared folder, ready to download new track files
INFO:root:Requesting 0 to 50
INFO:root:Received 0 to 50
INFO:root:Saved at "\tracks\saved-tracks-0-50.json" (150K)
INFO:root:Requesting 50 to 100
INFO:root:Received 50 to 100
INFO:root:Saved at "\tracks\saved-tracks-50-100.json" (151K)
INFO:root:Requesting 100 to 150
INFO:root:Received 100 to 150
INFO:root:Saved at "\tracks\saved-tracks-100-150.json" (146K)
INFO:root:Requesting 150 to 200
INFO:root:Received 150 to 200
INFO:root:Saved at "\tracks\saved-tracks-150-200.json" (147K)
...............................................................
INFO:root:Requesting 850 to 900
INFO:root:Received 850 to 900
INFO:root:Saved at "\tracks\saved-tracks-850-900.json" (143K)
INFO:root:Requesting 900 to 950
INFO:root:Received 900 to 919
INFO:root:Saved at "\tracks\saved-tracks-900-919.json" (55K)
INFO:root:Requested and saved 919 tracks split over 19 files (2 MB)
INFO:root:Reading track files
INFO:root:Read and parse 19 track files
INFO:root:Combining into single track file for ease of access
INFO:root:File combined with 919 items
INFO:root:Processing file...
INFO:root:Processed data, creating plot from data
INFO:root:Saving the figure to the 'export' folder
INFO:root:Showing plot to User
INFO:root:Done
>
```
# Requirements
The requirements for this project are outlined in the [requirements.txt](requirements.txt) file.
You can use the `pip` tool to instantly download and install all required modules via `pip install -r requirements.txt`.
## License
This project uses the GNU General Public License, see the [LICENSE](./LICENSE) file for more information.

BIN
graph.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -27,4 +27,5 @@ def refresh():
logging.info('Spotify data deemed to be recent enough (under {} seconds old)'.format(cache['expires_in'])) logging.info('Spotify data deemed to be recent enough (under {} seconds old)'.format(cache['expires_in']))
else: else:
pull.main() pull.main()
main() main()

View File

@@ -104,7 +104,7 @@ def copy(months, safe, explicit):
])) ]))
def main(): def main():
logging.basicConfig(level=logging.INFO) # logging.basicConfig(level=logging.INFO)
logging.info("Reading track files") logging.info("Reading track files")
files = get_files() files = get_files()
logging.info(f"Read and parse {len(files)} track files") logging.info(f"Read and parse {len(files)} track files")
@@ -114,5 +114,3 @@ def main():
logging.info(f'File combined with {len(data)} items') logging.info(f'File combined with {len(data)} items')
logging.info('Processing file...') logging.info('Processing file...')
process_data(data) process_data(data)
main()

View File

@@ -1,8 +1,8 @@
hurry.filesize==0.9 hurry.filesize
pyperclip==1.7.0 pyperclip
numpy==1.17.3 numpy
spotipy==2.4.4 spotipy
matplotlib==3.1.1 matplotlib
Pillow==6.2.1 Pillow
python_dateutil==2.8.0 python_dateutil
hurry==1.1 hurry