Project

General

Profile

« Previous | Next » 

Revision bb550c36

Added by jahoti about 2 years ago

Incorporate patch for test/gorilla.py

Patch by Wojtek provides a bundle-all option and only reads Hydrilla files.

View differences:

copyright
56 56
   2021 jahoti <jahoti@tilde.team>
57 57
License: GPL-2+
58 58

  
59
Files: test/*
60
Copyright: 2021 jahoti <jahoti@tilde.team>
61
License: AGPL-3+
62

  
59 63
Files: test/proxy_core.py test/init.sh
60 64
Copyright: 2015, inaz2
61 65
   2021 jahoti <jahoti@tilde.team>
......
85 89
 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
86 90
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
87 91

  
88
Files: test/server.py
92
Files: test/gorilla.py
89 93
Copyright: 2021 jahoti <jahoti@tilde.team>
90
License: AGPL-3+
94
   2021 jahoti <jahoti@tilde.team>
95
License: AGPL-3+ or Alicense-1.0
91 96

  
92 97
Files: licenses/*
93 98
Copyright: 2001, 2002, 2011-2013 Creative Commons
test/gorilla.py
18 18
	
19 19
	DB['path'] = path
20 20
	for file in os.listdir(path):
21
		with open(path + file + os.sep + 'index.json') as f:
21
		subdir = path + file
22
		
23
		if (os.st.S_IFMT(os.stat(subdir).st_mode) & os.st.S_IFDIR) == 0:
24
			continue
25
		
26
		with open(subdir + os.sep + 'index.json') as f:
22 27
			data = json.load(f)
23 28
		
24 29
		type_, data['file'] = data['type'], file
......
34 39

  
35 40

  
36 41
def mkhachette(patterns):
42
	patterns = set(patterns)
43
	if '*' in patterns:
44
		patterns.remove('*')
45
		patterns.update(DB['page'].keys())
46
	
37 47
	scripts, bags, pages, new_bags = {}, {}, {}, []
38 48
	for pattern in patterns:
39 49
		pages[pattern] = data = DB['page'][pattern]

Also available in: Unified diff