Skip to content

Commit

Permalink
crlf fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xdrew committed Sep 16, 2018
1 parent fb5ebe2 commit 942aff3
Show file tree
Hide file tree
Showing 3 changed files with 306 additions and 306 deletions.
30 changes: 15 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM python:3.7-stretch

RUN apt-get update -y && apt-get install -y libav-tools

ENV APP_DIR=/app
ENV DATA_DIR=/data

RUN mkdir -p ${APP_DIR} ${DATA_DIR}

VOLUME ${DATA_DIR}

COPY ../jwdownload ${APP_DIR}

WORKDIR ${APP_DIR}

FROM python:3.7-stretch

RUN apt-get update -y && apt-get install -y libav-tools

ENV APP_DIR=/app
ENV DATA_DIR=/data

RUN mkdir -p ${APP_DIR} ${DATA_DIR}

VOLUME ${DATA_DIR}

COPY jwdownload.py ${APP_DIR}

WORKDIR ${APP_DIR}

ENTRYPOINT ["python", "-u", "jwdownload.py"]
130 changes: 65 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
jwdownloader
==============

A simple tool for downloading videos in jwplayer format

# Quick start

```bash
$ docker pull xdrew/jw
$ docker run --rm --name=jw -v `pwd`:/data xdrew/jw https://video.com/c/xxx.mp4/xxxxxxx/segment73.ts
```

# Parameters

```
usage: docker run --rm --name=jw -v `pwd`:/data xdrew/jw [-h] [--name NAME] [--first-segment FIRST_SEGMENT]
[--last-segment LAST_SEGMENT] [--segments TOTAL_SEGMENTS]
[--no-cleanup] [--skip-downloaded]
url
Download video in jwplayer format
positional arguments:
url Url to parse link from
(https://video.com/c/xxx.mp4/xxxxxxx/segment73.ts)
optional arguments:
-h, --help show this help message and exit
--name NAME Output filename without extension ("Super video from www")
--first-segment FIRST_SEGMENT
First segment index (5)
--last-segment LAST_SEGMENT
Last segment index (73)
--segments TOTAL_SEGMENTS
Total segment amount to fetch. (73)
--no-cleanup Do not delete segments
--skip-downloaded Do not process videos with existing output name
```

# Hints

It's convenient to have an alias for this command

```bash
$ echo 'alias jw="docker run --rm --name=jw -v `pwd`:/data xdrew/jw"' >> ~/.bashrc && source ~/.bashrc
```

Sometimes it's handy to put multiple videos into queues
```bash
$ cat queue.sh
jw https://video.com/c/xxxx.mp4/asdf/segment1.ts --name="Video 1"
jw https://video.com/c/yyyy.mp4/adsf/segment1.ts --name="Video 2"
```

To make alias work inside this queue file you can do the following
```bash
echo "function jw() {
docker run --rm --name=jw -v \`pwd\`:/data xdrew/jw \"\$@\"
}
export -f jw" >> ~/.bashrc && source ~/.bashrc
```

And just run the queue
```bash
./queue.sh
jwdownloader
==============

A simple tool for downloading videos in jwplayer format

# Quick start

```bash
$ docker pull xdrew/jw
$ docker run --rm --name=jw -v `pwd`:/data xdrew/jw https://video.com/c/xxx.mp4/xxxxxxx/segment73.ts
```

# Parameters

```
usage: docker run --rm --name=jw -v `pwd`:/data xdrew/jw [-h] [--name NAME] [--first-segment FIRST_SEGMENT]
[--last-segment LAST_SEGMENT] [--segments TOTAL_SEGMENTS]
[--no-cleanup] [--skip-downloaded]
url
Download video in jwplayer format
positional arguments:
url Url to parse link from
(https://video.com/c/xxx.mp4/xxxxxxx/segment73.ts)
optional arguments:
-h, --help show this help message and exit
--name NAME Output filename without extension ("Super video from www")
--first-segment FIRST_SEGMENT
First segment index (5)
--last-segment LAST_SEGMENT
Last segment index (73)
--segments TOTAL_SEGMENTS
Total segment amount to fetch. (73)
--no-cleanup Do not delete segments
--skip-downloaded Do not process videos with existing output name
```

# Hints

It's convenient to have an alias for this command

```bash
$ echo 'alias jw="docker run --rm --name=jw -v `pwd`:/data xdrew/jw"' >> ~/.bashrc && source ~/.bashrc
```

Sometimes it's handy to put multiple videos into queues
```bash
$ cat queue.sh
jw https://video.com/c/xxxx.mp4/asdf/segment1.ts --name="Video 1"
jw https://video.com/c/yyyy.mp4/adsf/segment1.ts --name="Video 2"
```

To make alias work inside this queue file you can do the following
```bash
echo "function jw() {
docker run --rm --name=jw -v \`pwd\`:/data xdrew/jw \"\$@\"
}
export -f jw" >> ~/.bashrc && source ~/.bashrc
```

And just run the queue
```bash
./queue.sh
```
Loading

0 comments on commit 942aff3

Please sign in to comment.