-
Notifications
You must be signed in to change notification settings - Fork 0
/
rsync_filter
123 lines (110 loc) · 2.3 KB
/
rsync_filter
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# The rsync filter function is a bit stupid, that's why this file is a little strange.
# Basically, it will look through these files sequentially to see if there's a match.
#
# If a match is found, all else is ignored, so something like this won't work:
# - .config
# + .config/somedir
#
# It has to be done in this order
# + .config/somedir
# - .config
#
# The general approach here is to filter out some things and copy the rest,
# with a few exceptions for files that we commonly want to keep.
# General rules: Big bulky directories
- /**/*Cache*
- /**/*cache*
- /**/*Cookies*
- /**/*cookies*
- /**/__pycache__
- /**/.git/index
- /**/node_modules
- /**/.mypy_cache
# Filter out all kinds of video files because they take ages to transfer
# Except for some directories that I want to save.
+ /video/ytdl*
+ /video/mina_demo
- /**/*mp4
- /**/*avi
- /**/*avi
- /**/*mkv
# Negative filters
- /.dotfiles/.config/Cypress
- /.dotfiles/.config/coc
- /.dotfiles/.config/npm
- /.dotfiles/.config/pyenv
- /.dotfiles/.config/rbenv
- /.dotfiles/.local/lib
- /.dotfiles/.local/share/rustup
- /.dotfiles/.local/share/gradle
- /.dotfiles/.local/share/Steam
- /.dotfiles/.local/share/stack
- /.dotfiles/.local/share/virtualenvs
- /.dotfiles/.local/share/JetBrains
- /.dotfiles/.local/share/torbrowser
- /.dotfiles/.local/share/cargo
- /.dotfiles/.local/share/npm
- /.dotfiles/.local/share/node_modules
# File types - Image Files
+ /**/*.png
+ /**/*.jpg
+ /**/*.jpeg
+ /**/*.gif
+ /**/*.tiff
+ /**/*.bmp
+ /**/*.svg
+ /**/*.kra
+ /**/*.xcf*
# File types - Audio Files
+ /**/*.mp3
+ /**/*.flac
+ /**/*.m4a
# File types - Archive Files
+ /**/*.zip
+ /**/*.rar
+ /**/*.tar.*
# File types - Microsoft Office Files
+ /**/*.doc
+ /**/*.docx
+ /**/*.xls
+ /**/*.xlsx
+ /**/*.ppt
+ /**/*.pptx
# File types - Text files / Non-office Documents
+ /**/*.md
+ /**/*.csv
+ /**/*.json
+ /**/*.tsv
+ /**/*.pdf
+ /**/*.epub
# File types - Scripts and Source Code
+ /**/*.html
+ /**/*.css
+ /**/*.js
+ /**/*.vim
+ /**/*.sh
+ /**/*.hs
+ /**/*.py
+ /**/*.rb
+ /**/*.kt
+ /**/*.java
+ /**/*.rs
+ /**/*.gradle
+ /**/*.bat
+ /**/*.properties
+ /**/gradlew
# File types - Other
+ /**/*.key
+ /**/*.gpg
# Directories to add, unless caught in filters above
+ /.dotfiles/.config
+ /.dotfiles/.local
+ /audio
+ /box
+ /code
+ /games
+ /pics
+ /text
+ /vbox
# Ignore all other folders
- /*