toddy 0.1.2.1
Library for development with toolskit for more works📈📊📚
License: MIT License
Keywords: kit tools dev works


<h1 align='center'>Toddy</h1>
<p align='center'>
<img height='150px' width='200px' src='https://raw.githubusercontent.com/perseu912/toddy/main/img/logo_toddy.png' style='height:275; witdh:200'>
 <br/>
<a href="https://github.com/perseu912"><img title="Autor" src="https://img.shields.io/badge/Autor-reinan_br-blue.svg?style=for-the-badge&logo=github"></a>
<br/>
<p align='center'>
<!-- github dados -->
<a href='https://python.org'><img src='https://img.shields.io/github/pipenv/locked/python-version/perseu912/toddy'></a>
<a href='#'><img src='https://img.shields.io/github/languages/code-size/perseu912/toddy'></a>
<a href='#'><img src='https://img.shields.io/github/commit-activity/w/perseu912/toddy'></a>
<a href='#'><img src='https://img.shields.io/github/last-commit/perseu912/toddy'></a>
<br/>
<!-- sites de pacotes -->
<a href='https://pypi.org/project/qfunction/'><img src='https://img.shields.io/pypi/v/toddy'></a>
<a href='#'><img src='https://img.shields.io/pypi/wheel/toddy'></a>
<a href='#'><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dd/toddy"></a>
<a href='#'><img src='https://img.shields.io/pypi/implementation/toddy'></a>
<br/>
<!-- outros premios e analises -->
<a href='#'><img alt="CodeFactor Grade" src="https://img.shields.io/codefactor/grade/github/perseu912/toddy?logo=codefactor">
</a>
<!-- redes sociais -->
<br/>
<a href='https://instagram.com/gpftc_ifsertao/'><img src='https://shields.io/badge/insta-gpftc_ifsertao-violet?logo=instagram&style=flat'></a>
</p>
</p>
<p align='center'> <b>Library for development in the works presents on the python 📈📊</b></p>

## First time
<br/>

## Installation:
<hr/>

this lib is found on the site of packages for python the <a href='https://pypi.org'>pypi</a> and on the site that is a repository for the codes and softwares with licenses from majority business of the word, the <a href='https://github.com'>github</a>.
### Linux
```bash
$ pip3 install toddy -U
```
### Windows
```cmd
C\:> python3 -m pip3 install qfunction -U
```
<br/><br/>
#  Examples

<hr/>

### puts
The puts function, is for works and prints that need
the show of date, use from RAM and CPU percent's.
This way is the best for any project's, major of project's.
```py
from toddy.tools import logs,puts

logs.show_cpu(True)
logs.show_ram(True)

puts('oi')
```
output:
```sh
[CPU: 11.1%][RAM: 84.1%]
[01/11/2021 22:54:31]
-> oi 
```
The puts is named in it way, in homenage the put from Ruby.
This function was created for me in 2019, in a project from nodejs.

## tools

```py
#show the date
from toddy.tools import date
print(date())
```
output:
```sh
[05/11/2021 11:53:41]
```
<hr/>

## tube
This module is for download and search video/music from YouTube.
This can get info as title, link,tumbhnail, duration, e file download from public video's YouTube.
The Tube module, is a old project in paper (from 2019),
and the wish is the work prime on termux.
making  download music from YouTube using just two lines in Python, and on Termux too.
Now, it's Possible
</br>

first, install the [ffmpeg](http://www.ffmpeg.org/)
<br>

On linux is just:
```sh
sudo apt install ffmpeg -y
```

#### getting and downloading a music
```py
from toddy.tube import search_google_yt as gy
from toddy.tube import music_from_video_s as dy

res_gy = (gy('intercooler dj jacob'))
print(res_gy)
dy(res_gy[0])
```
output:
```sh
[youtube] JHpyKTOaRC4: Downloading webpage
[youtube] DLI0xlott1w: Downloading webpage
[youtube] bC9r4qqWhqw: Downloading webpage
[youtube] OZhmvp_HakI: Downloading webpage
[youtube] VrRYNtdyj1Q: Downloading webpage
[youtube] VrRYNtdyj1Q: Downloading MPD manifest
[youtube] Fi7DsC7pPWE: Downloading webpage
[youtube] WkMPNj62PBQ: Downloading webpage
[youtube] Egq-HxLQwMw: Downloading webpage
[{'title': 'Dj Jacob- Intercooler', 'duration': 101, 'url': None, 'thumbnail': 'https://i.ytimg.com/vi_webp/JHpyKTOaRC4/maxresdefault.webp', 'link_g': 'https://www.youtube.com/watch?v=JHpyKTOaRC4', 'q': 'intercooler dj jacob'}, {'title': 'Dj Jacob - Intercooler', 'duration': 91, 'url': None, 'thumbnail': 'https://i.ytimg.com/vi_webp/DLI0xlott1w/maxresdefault.webp', 'link_g': 'https://www.youtube.com/watch?v=DLI0xlott1w', 'q': 'intercooler dj jacob'}, {'title': 'Intercooler', 'duration': 102, 'url': None, 'thumbnail': 'https://i.ytimg.com/vi_webp/bC9r4qqWhqw/maxresdefault.webp', 'link_g': 'https://www.youtube.com/watch?v=bC9r4qqWhqw', 'q': 'intercooler dj jacob'}, {'title': 'Dj Jacob - Intercooler [Bass Boosted]', 'duration': 91, 'url': None, 'thumbnail': 'https://i.ytimg.com/vi/OZhmvp_HakI/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDS0VQjBC7gi9juRQxnrAGZwieYyw', 'link_g': 'https://www.youtube.com/watch?v=OZhmvp_HakI', 'q': 'intercooler dj jacob'}, {'title': 'DJ Jacob - Intercooler', 'duration': 102, 'url': None, 'thumbnail': 'https://i.ytimg.com/vi_webp/VrRYNtdyj1Q/maxresdefault.webp?v=619cc431', 'link_g': 'https://www.youtube.com/watch?v=VrRYNtdyj1Q', 'q': 'intercooler dj jacob'}, {'title': 'DJ Jacob- Intercooler', 'duration': 101, 'url': None, 'thumbnail': 'https://i.ytimg.com/vi_webp/Fi7DsC7pPWE/maxresdefault.webp', 'link_g': 'https://www.youtube.com/watch?v=Fi7DsC7pPWE', 'q': 'intercooler dj jacob'}, {'title': 'dj Jacob intercooler ((EXTREME BASS BOOSTED COM GRAVE FORTE ))🔊🔊', 'duration': 91, 'url': None, 'thumbnail': 'https://i.ytimg.com/vi_webp/WkMPNj62PBQ/maxresdefault.webp', 'link_g': 'https://www.youtube.com/watch?v=WkMPNj62PBQ', 'q': 'intercooler dj jacob'}, {'title': 'Dj Jacob - Intercooler    1 HOUR', 'duration': 3637, 'url': None, 'thumbnail': 'https://i.ytimg.com/vi/Egq-HxLQwMw/maxresdefault.jpg', 'link_g': 'https://www.youtube.com/watch?v=Egq-HxLQwMw', 'q': 'intercooler dj jacob'}]
[youtube] JHpyKTOaRC4: Downloading webpage
[download] Destination: mp3/intercooler_dj_jacob.webm
[download] 100% of 1.63MiB in 00:24
[ffmpeg] Destination: mp3/intercooler_dj_jacob.mp3
Deleting original file mp3/intercooler_dj_jacob.webm (pass -k to keep)

```

files added:
```sh
$ ls mp3/
intercooler_dj_jacob.mp3
```


#### using just the link from video/music
```py
from toddy.tube import music_from_link as mlf

mlf('https://music.youtube.com/watch?v=ibbw_TXQnRc')
```
output:
```sh
[youtube] ibbw_TXQnRc: Downloading webpage
[download] mp3/None.webm has already been downloaded
[download] 100% of 3.44MiB
[ffmpeg] Destination: mp3/None.mp3
Deleting original file mp3/None.webm (pass -k to keep)
```
files added:
```sh
$ls /mp3
Jane.mp3
```
<hr/>

### Downloading music on terminal
installing this lib using just the pip, you will can use this comand on your linux.
```sh
$get_music 'https://music.youtube.com/watch?v=s3I8Y0H_Qd0'
```
output
```sh
[youtube] s3I8Y0H_Qd0: Downloading webpage
LeahTheBeast
[youtube] s3I8Y0H_Qd0: Downloading webpage
[download] Destination: mp3/Kang_The_Conqueror_Theme_Song_LeahTheBeast.m4a
[download] 100% of 2.37MiB in 00:35
[ffmpeg] Correcting container in "mp3/Kang_The_Conqueror_Theme_Song_LeahTheBeast.m4a"
[ffmpeg] Destination: mp3/Kang_The_Conqueror_Theme_Song_LeahTheBeast.mp3
Deleting original file mp3/Kang_The_Conqueror_Theme_Song_LeahTheBeast.m4a (pass -k to keep)
```
files mp3 added:
```sh
$ls mp3/
Kang_The_Conqueror_Theme_Song_LeahTheBeast.mp3
```
example play this file:
<br/>
<img src='https://raw.githubusercontent.com/perseu912/toddy/main/img/get_music_example.jpg' height='470px' width='240'/>