Skip to content

Instantly share code, notes, and snippets.

View Roshan-R's full-sized avatar

Roshan R Chandar Roshan-R

View GitHub Profile
@Roshan-R
Roshan-R / download.rs
Created April 3, 2023 19:48
Download file using ureq with progress bar
use indicatif::{ProgressBar, ProgressStyle};
use std::fs::File;
use std::io;
const DOWNLOAD_TEMPLATE: &str =
"{msg} {spinner:.green} [{elapsed_precise}] [{wide_bar:.cyan/blue}] {bytes}/{total_bytes} ({eta})";
pub fn download_file(url: &str) -> io::Result<()> {
let resp = ureq::get(&url).call().unwrap();
@Roshan-R
Roshan-R / gist:96c859fc551527284531f59fb52f18df
Created January 22, 2023 06:10
backup of channels.json with old iptv-org format
This file has been truncated, but you can view the full file.
[{"name":".black Russia","logo":"https://i.imgur.com/rzrOS3N.png","url":"https://okkotv-live.cdnvideo.ru/channel/Sony_Turbo.m3u8","categories":[{"name":"Entertainment","slug":"entertainment"}],"countries":[{"name":"Russia","code":"RU"}],"languages":[{"name":"Russian","code":"rus"}],"tvg":{"id":"BlackRussia.us","name":".black Russia","url":""}},{"name":".red Russia","logo":"https://i.imgur.com/xUGWmyh.png","url":"https://okkotv-live.cdnvideo.ru/channel/Sony_ET.m3u8","categories":[{"name":"Entertainment","slug":"entertainment"}],"countries":[{"name":"Russia","code":"RU"}],"languages":[{"name":"Russian","code":"rus"}],"tvg":{"id":"RedRussia.us","name":".red Russia","url":""}},{"name":".sci-fi Russia","logo":"https://i.imgur.com/5ezLSwB.png","url":"https://okkotv-live.cdnvideo.ru/channel/Sony_SciFi.m3u8","categories":[{"name":"Science","slug":"science"}],"countries":[{"name":"Russia","code":"RU"}],"languages":[{"name":"Russian","code":"rus"}],"tvg":{"id":"SciFiRussia.us","name":".sci-fi Russia","url":""}},{"name"
@Roshan-R
Roshan-R / channels.json
Created December 28, 2022 06:17
example for custom channels.json for termv
[
{
"name": "&Flix",
"logo": "https://static.epg.best/in/AndFlix.in.png",
"url": "https://sneh-z5api.herokuapp.com/?c=0-9-channel_2105335046",
"categories": [
{
"name": "Movies",
"slug": "movies"
}