diff --git a/.travis.yml b/.travis.yml index 8080e7d..6b6f566 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,51 @@ language: node_js -node_js: '10.18.0' +os: linux +dist: xenial +node_js: '11.6.0' + +jobs: + include: + - os: linux + dist: trusty + services: docker + language: generic + + - os: windows + language: node_js + node_js: '10' + env: + - YARN_GPG=no + - ELECTRON_CACHE=$HOME/.cache/electron + - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder cache: + yarn: true directories: - node_modules - $HOME/.cache/electron - $HOME/.cache/electron-builder - - $HOME/.npm/_prebuilds -env: - global: - - ELECTRON_CACHE=$HOME/.cache/electron - - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder +script: + - yarn build + - | + if [ "$TRAVIS_OS_NAME" == "linux" ]; then + docker run --rm \ + -v ${PWD}:/project \ + -v ~/.cache/electron:/root/.cache/electron \ + -v ~/.cache/electron-builder:/root/.cache/electron-builder \ + electronuserland/builder:wine \ + /bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn dist:linux" + else + yarn dist:win + fi -jobs: - include: - - stage: Deploy linux - if: tag IS present - os: linux - dist: trusty - script: - - npm run release +deploy: + provider: releases + token: $GH_TOKEN + file_glob: true + file: + - 'dist/*.AppImage' + - 'dist/*.exe' + overwrite: true + on: + all_branches: true diff --git a/README.md b/README.md index aa64a34..b606763 100644 --- a/README.md +++ b/README.md @@ -5,17 +5,28 @@ ## What it is -This tool downloads a Youtube video to `videos` folder and cuts it given a starting and an ending time.\ -The time must be in the format `HH:MM:SS` and the duration can't be longer than 24 hours. +This app downloads youtube videos using youtube-dl and cuts them with ffmpeg given starting and ending times. +Currently only Windows e Linux platforms are supported. ## How to use -- Install NodeJS and ffmpeg -- Clone or download this repository -- Run `npm start` inside the project's folder -- Provide required information -- Check `videos` folder +Download the binary according to your OS: -## User Options +- Linux +- Windows -![An example of user options](http://i.imgur.com/avvmjF8.png) +## How to develop + +Clone this repository and run `yarn` to install dependencies. +Make sure to have `node` and `npm` installed. + +## Options + +- Youtube url (required) + Can be a shortened version or a normal one + +- Starting and ending times (required) + In the HH:MM:SS format. It can't be longer than 24h + +- Convert to mp3 + It converts the same output to mp3 diff --git a/package.json b/package.json index 56242ad..f0873c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yt-dlandcut", - "version": "2.0.0", + "version": "2.0.1", "description": "Download and Cut an Youtube video by its starting and ending times", "repository": "github:markkop/yt-dlandcut", "main": "build/electron/main.js", @@ -12,7 +12,7 @@ "dist:win": "electron-builder build --win portable ", "dist": "electron-builder build --win portable --linux AppImage ", "build": "babel src --out-dir build", - "release": "build" + "release": "yarn build && electron-builder" }, "keywords": [], "author": "Marcelo 'Mark' Kopmann",