Skip to content

Commit 56fee4a

Browse files
committed
add split dbs info
1 parent 073eb78 commit 56fee4a

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

.github/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,14 @@ To stop playing press Ctrl+C in either the terminal or mpv
284284

285285
library fsadd --audio audiobooks.db ./audiobooks/
286286
library fsadd --audio podcasts.db ./podcasts/ ./another/more/secret/podcasts_folder/
287+
288+
# merge later if you want
287289
library merge-dbs --pk path -t playlists,media both.db audiobooks.db podcasts.db
288290

291+
# or split
292+
library merge-dbs --pk path -t playlists,media audiobooks.db both.db -w 'path like "%/audiobooks/%"'
293+
library merge-dbs --pk path -t playlists,media podcasts.db both.db -w 'path like "%/podcasts%"'
294+
289295
## Guides
290296

291297
### Music alarm clock
@@ -2368,6 +2374,10 @@ BTW, for some cols like time_deleted you'll need to specify a where clause so th
23682374

23692375
To skip copying primary-keys from the source table(s) use --business-keys instead of --primary-keys
23702376

2377+
Split DBs using --where
2378+
2379+
library merge-dbs --pk path specific-site.db big.db -v --only-new-rows -t media,playlists -w 'path like "https://specific-site%"'
2380+
23712381

23722382
</details>
23732383

xklb/readme.py

+6
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,14 @@
157157
158158
library fsadd --audio audiobooks.db ./audiobooks/
159159
library fsadd --audio podcasts.db ./podcasts/ ./another/more/secret/podcasts_folder/
160+
161+
# merge later if you want
160162
library merge-dbs --pk path -t playlists,media both.db audiobooks.db podcasts.db
161163
164+
# or split
165+
library merge-dbs --pk path -t playlists,media audiobooks.db both.db -w 'path like "%/audiobooks/%"'
166+
library merge-dbs --pk path -t playlists,media podcasts.db both.db -w 'path like "%/podcasts%"'
167+
162168
## Guides
163169
164170
### Music alarm clock

xklb/usage.py

+4
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,10 @@ def play(action) -> str:
10961096
library merge-dbs --only-new-rows --pk subreddit,path --only-tables reddit_posts reddit/81_New_Music.db audio.db -v
10971097
10981098
To skip copying primary-keys from the source table(s) use --business-keys instead of --primary-keys
1099+
1100+
Split DBs using --where
1101+
1102+
library merge-dbs --pk path specific-site.db big.db -v --only-new-rows -t media,playlists -w 'path like "https://specific-site%"'
10991103
"""
11001104

11011105
merge_folders = """library merge-folders [--replace] [--skip] [--simulate] SOURCES ... DESTINATION

0 commit comments

Comments
 (0)