Fixed path issues in doc + added dependencies related to ssdeep

This commit is contained in:
Mokaddem 2016-10-14 14:26:33 +02:00
parent 0bd93e22e2
commit 5a4ea734a2
5 changed files with 13 additions and 4 deletions

View file

@ -120,7 +120,8 @@ if __name__ == "__main__":
lastTime = datetime.datetime.now() lastTime = datetime.datetime.now()
module_file_array = set() module_file_array = set()
with open('../doc/all_modules.txt', 'r') as module_file: path_allmod = os.path.join(os.environ['AIL_HOME'], 'doc/all_modules.txt')
with open(path_allmod, 'r') as module_file:
for line in module_file: for line in module_file:
module_file_array.add(line[:-1]) module_file_array.add(line[:-1])

View file

@ -1,6 +1,8 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# -*-coding:UTF-8 -* # -*-coding:UTF-8 -*
import os
content = "" content = ""
modules = {} modules = {}
all_modules = [] all_modules = []
@ -8,7 +10,9 @@ curr_module = ""
streamingPub = {} streamingPub = {}
streamingSub = {} streamingSub = {}
with open('../bin/packages/modules.cfg', 'r') as f: path = os.path.join(os.environ['AIL_BIN'], 'packages/modules.cfg')
path2 = os.path.join(os.environ['AIL_HOME'], 'doc/all_modules.txt')
with open(path, 'r') as f:
for line in f: for line in f:
if line[0] != '#': if line[0] != '#':
if line[0] == '[': if line[0] == '[':
@ -32,7 +36,7 @@ with open('../bin/packages/modules.cfg', 'r') as f:
continue continue
output_set_graph = set() output_set_graph = set()
with open('all_modules.txt', 'w') as f2: with open(path2, 'w') as f2:
for e in all_modules: for e in all_modules:
f2.write(e+"\n") f2.write(e+"\n")

View file

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
python generate_graph_data.py | dot -T png -o module-data-flow.png python $AIL_HOME/doc/generate_graph_data.py | dot -T png -o $AIL_HOME/doc/module-data-flow.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 169 KiB

View file

@ -24,6 +24,7 @@ sudo apt-get install graphviz -y
sudo easy_install -U distribute sudo easy_install -U distribute
# ssdeep # ssdeep
sudo apt-get install libfuzzy-dev sudo apt-get install libfuzzy-dev
sudo apt-get install build-essential libffi-dev automake autoconf libtool -y
# REDIS # # REDIS #
test ! -d redis/ && git clone https://github.com/antirez/redis.git test ! -d redis/ && git clone https://github.com/antirez/redis.git
@ -104,3 +105,6 @@ python setup.py install
# Download the necessary NLTK corpora and sentiment vader # Download the necessary NLTK corpora and sentiment vader
HOME=$(pwd) python -m textblob.download_corpora HOME=$(pwd) python -m textblob.download_corpora
python -m nltk.downloader vader_lexicon python -m nltk.downloader vader_lexicon
#Create the file all_module and update the graph in doc
$AIL_HOME/doc/generate_modules_data_flow_graph.sh