Code Monkey home page Code Monkey logo

rjdl's Introduction

rjdl

PyPI Python 3 Downloads LICENSE Codacy Badge Documentation Status

  • This package can be used in two different ways:
    • If you want to use it as a downloader only, then you can simply use its CLI.
    • But if you are a more advanced user and want to use this package in your projects, then you can import it in your project and you're good to go.
  • With this package you will be able to save any Music, Video (Music Video & RJ-TV Show), Album, Podcast and Playlist from RadioJavan to your personal computer.
  • Podcasts will be saved in 192 kbps quality only, while you can choose between 256 kbps and 320 kbps for Songs (Albums & Playlists as well), and 480p, 720p and 1080p for Videos if available.
  • If you are currently living in Iran, you need to turn on your VPN while using this package.

Installation

  • Use pip install rjdl to install the latest release of the package. (Of course to be able to use pip, you need python to be installed and added to computer's path first)
  • If you want to install the latest version directly from GitHub, then you can use this:
    pip install git+git://github.com/reza00farjam/rjdl

Usage

Command Line

The rjdl as a command, is a well behaved Unix style command line tool that provides you the following optional arguments to use based on the content of your url. You can also list them by running rjdl -h or rjdl --help:

Usage: rjdl [OPTIONS] URLS...

  Download Music, Video, Album, Podcast & Playlists from Radio Javan

  URLs: Links of desired media.

Options:
  --version                       Show the version and exit.
  -p, --path DIRECTORY            Download path  [default: (current working
                                  directory)]
  -m, --music-quality [256|320]   Download quality on Music, Album and
                                  Playlist URLs  [default: 320]
  -v, --video-quality [480|720|1080]
                                  Download quality on Video URLs  [default:
                                  720]
  -i, --info                      Only show info about the URL
  -h, --help                      Show this message and exit.

How it works

Simply, just pass rjdl a valid url along with your desired options for it and enjoy your download! Example.

Another simple example
rjdl "https://www.radiojavan.com/mp3s/mp3/Yas-Nameyi-Be-Farzand"

Script

The rjdl as a package, provides enough class and methods to work with RadioJavan for your development purposes. For a good understanding of what it does and how it works, you can take a look at rjdl documentation.

Development Setup

To start developing rjdl, you need to install a recent version of python and pip and then run the following commands (for linux):

git clone https://github.com/reza00farjam/rjdl
cd rjdl
python3 -m venv .venv
source .venv/bin/activate
pip install -e .[dev]

Code Style

Keeping to a consistent code style throughout the project makes it easier to contribute and collaborate.

We enforce the following check for all PRs:

tox -e flake8

Contributing

  • Contributions of all sizes are welcomed and precious. You can follow the steps below for this purpose:
    • Fork the repository.
    • Make all the changes you want to see in the original repository.
    • Push your changes to a new branch in your fork and create a pull request along with an explanation of your changes.
  • Also you can help us by reporting bugs and sharing your ideas.

Copyright & License

rjdl's People

Contributors

o4x avatar reza00farjam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

maozinha159 o4x

rjdl's Issues

Bad printing

The print method by using a small window size in terminal, doesn't work well :

Screenshot from 2020-08-06 19-06-59

It is ok with big screen size :

Screenshot from 2020-08-06 19-09-26

Use arguments

The best way to pass some values to the program is passing a value to an argument.

Instead of using the pattern: rjdl "url" "quality" , use arguments like rjdl -u url -q quality. The good point will be, no matter which argument comes first and seems more cleaner.

Generally an argument like -h or --help included in most packages for users to know how to use the package.

Improvement

Catch SIGINT (CTRL-C)

When downloading a file, after quitting the program using CTRL+C, I get some errors of python :

image

It would be nice to catch this signal and print something else like "Quitting..." and then remove the file.

This link shall be helpful to create this feature.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.