Skip to content

Commit 3030fd0

Browse files
committed
Refactor import paths to use the new repository structure; update README for clarity and remove obsolete documentation.
1 parent 9690f1e commit 3030fd0

File tree

23 files changed

+60
-354
lines changed

23 files changed

+60
-354
lines changed

README.md

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# JW Scripts (Go Version)
22

3+
This project is a Go-based reimplementation of the [original Python scripts](https://github.com/allejok96/jw-scripts) for interacting with jw.org content. It offers improved performance and modern features while maintaining compatibility with the original command-line flags.
4+
35
*These methods of accessing jw.org are, while legal, not officially supported by the organisation. Use them if you find it worth the time, pain and risk. But first, please take the time to read [w18.04 30-31](https://wol.jw.org/en/wol/d/r1/lp-e/2018364). Then consider buying a device which has official support for JW Broadcasting app. Like a Roku, Apple TV or Amazon Fire TV. It will give you a better and safer experience.*
46

57
### JW Broadcasting and Publications anywhere
68

79
With these scripts you can get the latest JW Broadcasting videos and publications automatically downloaded. You can turn a computer (like a Raspberry Pi) into a JW TV, either by streaming directly, or by playing downloaded videos from your collection.
810

9-
**Note**: The publication download feature (`jwb-books`) is currently a framework implementation. The JW.org API does not currently provide access to publications/books - only broadcasting content (videos and audio). See [docs/BOOK_DOWNLOAD_ANALYSIS.md](docs/BOOK_DOWNLOAD_ANALYSIS.md) for details.
10-
1111
## Get started
1212

13-
This project is now written in Go. You have two options to get started:
13+
You have two options to get started with the Go version of JW Scripts:
1414

1515
### Option 1: Download Pre-built Binaries (Recommended)
1616

@@ -31,10 +31,10 @@ If you prefer to build from source, you will need to have Go installed on your s
3131

3232
### Building the project
3333

34-
To build the `jwb-index` and `jwb-offline` executables, run the following command from the root of the project:
34+
To build all the command-line tools, run the following command from the root of the project:
3535

3636
```bash
37-
go build -o bin/ ./...
37+
go build -o bin/ ./cmd/...
3838
```
3939

4040
This will create the executables in a `bin` directory.
@@ -46,7 +46,7 @@ This will create the executables in a `bin` directory.
4646
For example, to download the latest videos in Swedish, you would run:
4747

4848
```bash
49-
./bin/jwb-index --download --latest --lang=Z
49+
./bin/jwb-index --download --latest --lang=S
5050
```
5151

5252
To play downloaded videos, you can use the `jwb-offline` command:
@@ -87,20 +87,26 @@ The command downloads from all music-related categories including:
8787
**Note**: This feature is currently a framework implementation as the JW.org API does not provide access to publications.
8888

8989
```bash
90-
# Check API status and limitations
91-
./bin/jwb-books
90+
# Display help information
91+
./bin/jwb-books --help
92+
93+
# List supported languages
94+
./bin/jwb-books --list-languages
95+
96+
# List available book categories
97+
./bin/jwb-books --list-categories --language E
9298

93-
# List available book categories (when API becomes available)
94-
./bin/jwb-books --list-categories
99+
# List supported download formats
100+
./bin/jwb-books --list-formats
95101

96-
# Download books by category in PDF format (when API becomes available)
97-
./bin/jwb-books --category=bible-study --format=pdf --output=./books
102+
# Search for specific publications
103+
./bin/jwb-books --search="watchtower" --language E
98104

99-
# Download magazines in EPUB format (when API becomes available)
100-
./bin/jwb-books --category=magazines --format=epub --output=./publications
105+
# Download books by category in PDF format
106+
./bin/jwb-books --category=bible-study --language E --format=pdf --output=./books
101107

102-
# Search for specific publications (when API becomes available)
103-
./bin/jwb-books --search="watchtower 2024"
108+
# Download magazines in EPUB format
109+
./bin/jwb-books --category=magazines --language E --format=epub --output=./publications
104110
```
105111

106112
See [docs/BOOK_DOWNLOAD_ANALYSIS.md](docs/BOOK_DOWNLOAD_ANALYSIS.md) for detailed information about the API analysis and framework implementation.
@@ -109,24 +115,6 @@ Next, check out the [Wiki pages](https://github.com/allejok96/jw-scripts/wiki) f
109115

110116
## Questions
111117

112-
#### Isn't there an easier way to watch JW Broadcasting in Kodi?
113-
114-
Yes, I'm keeping an add-on alive [here](https://github.com/allejok96/plugin.video.jwb-unofficial).
115-
116-
#### Why is the video download so slow?
117-
118-
~~It seems to be realated to the `--limit-rate` flag ([why?](https://github.com/allejok96/jw-scripts/wiki/How-it-works#batch-downloading)).~~
119-
120-
**Fixed!** The rate limiting implementation has been improved to provide smooth downloads at the specified rate limits without the previous throttling issues.
121-
122-
*But please, somebody think of the servers!* :-)
123-
124-
#### What happened to the script for Bible recordings?
125-
126-
Since all recordings can be easily downloaded from the website, and the script couldn't do more than one publication at a time I didn't see any practical use for it.
127-
128-
But checkout [@vbastianpc](https://github.com/vbastianpc)'s nice fork of it that can download sign language publications.
129-
130118
#### Is this legal?
131119

132120
Yes. The [Terms of Service](http://www.jw.org/en/terms-of-use/) allows:

cmd/api-analysis/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"sort"
1010
"strings"
1111

12-
"github.com/allejok96/jwb-go/internal/api"
13-
"github.com/allejok96/jwb-go/internal/config"
12+
"github.com/darkace1998/jw-scripts/internal/api"
13+
"github.com/darkace1998/jw-scripts/internal/config"
1414
)
1515

1616
func main() {

cmd/category-analysis/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"sort"
88
"strings"
99

10-
"github.com/allejok96/jwb-go/internal/api"
11-
"github.com/allejok96/jwb-go/internal/config"
10+
"github.com/darkace1998/jw-scripts/internal/api"
11+
"github.com/darkace1998/jw-scripts/internal/config"
1212
)
1313

1414
func main() {

cmd/character-analysis/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"strings"
1010
"unicode/utf8"
1111

12-
"github.com/allejok96/jwb-go/internal/api"
13-
"github.com/allejok96/jwb-go/internal/config"
12+
"github.com/darkace1998/jw-scripts/internal/api"
13+
"github.com/darkace1998/jw-scripts/internal/config"
1414
)
1515

1616
func main() {

cmd/comprehensive-analysis/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"sort"
99
"strings"
1010

11-
"github.com/allejok96/jwb-go/internal/api"
12-
"github.com/allejok96/jwb-go/internal/config"
11+
"github.com/darkace1998/jw-scripts/internal/api"
12+
"github.com/darkace1998/jw-scripts/internal/config"
1313
)
1414

1515
func main() {

cmd/jwb-books/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"os"
88
"strings"
99

10-
"github.com/allejok96/jwb-go/internal/books"
11-
"github.com/allejok96/jwb-go/internal/config"
10+
"github.com/darkace1998/jw-scripts/internal/books"
11+
"github.com/darkace1998/jw-scripts/internal/config"
1212
)
1313

1414
func main() {

cmd/jwb-index/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import (
88
"strings"
99
"time"
1010

11-
"github.com/allejok96/jwb-go/internal/api"
12-
"github.com/allejok96/jwb-go/internal/config"
13-
"github.com/allejok96/jwb-go/internal/downloader"
14-
"github.com/allejok96/jwb-go/internal/output"
11+
"github.com/darkace1998/jw-scripts/internal/api"
12+
"github.com/darkace1998/jw-scripts/internal/config"
13+
"github.com/darkace1998/jw-scripts/internal/downloader"
14+
"github.com/darkace1998/jw-scripts/internal/output"
1515
"github.com/spf13/cobra"
1616
)
1717

cmd/jwb-music/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import (
77
"runtime"
88
"strings"
99

10-
"github.com/allejok96/jwb-go/internal/api"
11-
"github.com/allejok96/jwb-go/internal/config"
12-
"github.com/allejok96/jwb-go/internal/downloader"
13-
"github.com/allejok96/jwb-go/internal/output"
10+
"github.com/darkace1998/jw-scripts/internal/api"
11+
"github.com/darkace1998/jw-scripts/internal/config"
12+
"github.com/darkace1998/jw-scripts/internal/downloader"
13+
"github.com/darkace1998/jw-scripts/internal/output"
1414
"github.com/spf13/cobra"
1515
)
1616

cmd/jwb-offline/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"fmt"
66
"os"
77

8-
"github.com/allejok96/jwb-go/internal/config"
9-
"github.com/allejok96/jwb-go/internal/player"
8+
"github.com/darkace1998/jw-scripts/internal/config"
9+
"github.com/darkace1998/jw-scripts/internal/player"
1010
"github.com/spf13/cobra"
1111
)
1212

cmd/media-analysis/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"os"
99
"strings"
1010

11-
"github.com/allejok96/jwb-go/internal/api"
12-
"github.com/allejok96/jwb-go/internal/config"
11+
"github.com/darkace1998/jw-scripts/internal/api"
12+
"github.com/darkace1998/jw-scripts/internal/config"
1313
)
1414

1515
func main() {

0 commit comments

Comments
 (0)