diff --git a/bin/ModuleInformation.py b/bin/ModuleInformation.py index 1538f57a..df07bf14 100755 --- a/bin/ModuleInformation.py +++ b/bin/ModuleInformation.py @@ -120,7 +120,8 @@ if __name__ == "__main__": lastTime = datetime.datetime.now() 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: module_file_array.add(line[:-1]) diff --git a/doc/generate_graph_data.py b/doc/generate_graph_data.py index c1b4b98e..282fa849 100755 --- a/doc/generate_graph_data.py +++ b/doc/generate_graph_data.py @@ -1,6 +1,8 @@ #!/usr/bin/env python2 # -*-coding:UTF-8 -* +import os + content = "" modules = {} all_modules = [] @@ -8,7 +10,9 @@ curr_module = "" streamingPub = {} 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: if line[0] != '#': if line[0] == '[': @@ -32,7 +36,7 @@ with open('../bin/packages/modules.cfg', 'r') as f: continue output_set_graph = set() - with open('all_modules.txt', 'w') as f2: + with open(path2, 'w') as f2: for e in all_modules: f2.write(e+"\n") diff --git a/doc/generate_modules_data_flow_graph.sh b/doc/generate_modules_data_flow_graph.sh index 90a578e0..bf758fde 100755 --- a/doc/generate_modules_data_flow_graph.sh +++ b/doc/generate_modules_data_flow_graph.sh @@ -1,3 +1,3 @@ #!/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 diff --git a/doc/module-data-flow.png b/doc/module-data-flow.png index 73ed3b1d..cea4cef5 100644 Binary files a/doc/module-data-flow.png and b/doc/module-data-flow.png differ diff --git a/installing_deps.sh b/installing_deps.sh index b3df3221..74a1b000 100755 --- a/installing_deps.sh +++ b/installing_deps.sh @@ -24,6 +24,7 @@ sudo apt-get install graphviz -y sudo easy_install -U distribute # ssdeep sudo apt-get install libfuzzy-dev +sudo apt-get install build-essential libffi-dev automake autoconf libtool -y # REDIS # 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 HOME=$(pwd) python -m textblob.download_corpora 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