Skip to content

Commit

Permalink
Extended the project documentation and cleaned the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
egeres committed Mar 22, 2019
1 parent 94f27fb commit 6bf9a5a
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 91 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# simple-chat-graph
Something to see the people you speak with colors and visual stuff
Small web application to display a graph with the message intensity of telegram chats.

![](https://github.com/egeres/asiic/blob/master/simple-chat-graph/screenshot_0.png)

https://github.com/vysheng/tg/blob/master/README-Cygwin.md is needed
## How to use :

or https://github.com/pigpagnet/save-telegram-chat-history
### Step 0 : Export your Telegram chats to a JSON file.
Install the Telegram desktop app. Navigate to Settings > Advanced, then click "Export Telegram data". Disable all the options except for "Personal chats". At the bottom, select "Machine-readable JSON". You can change the download path to set the destination folder of the exported information. Whe you are ready, click "EXPORT" at the bottom. The process might take a few minutes to complete. Once it has finished, you will see a folder named "DataExport_<current date>" in the selected directory.

### Step 1 : Generate your chat files
You must have Python installed to complete the next step (any version greater than 2.7). Execute the generator_files.py script as shown :

```
cd repository_directory/test_multifiles
python generator_files.py ..DataExport_<current date>/result.json repository_directory/test_multifiles/files
```

This will generate a list of .json files at repository_directory/test_multifiles/files.

### Step 2 : Update the test_multifiles.html file.
Change the value of the variable filenames by the output of the python script : list_of_exported_files = [...]
2 changes: 1 addition & 1 deletion js/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var response = $.getJSON( "data_1.json", function(obtained_data) {
.always(function() { console.log( "complete" ); });


console.log(data);
// console.log(data);

function getBaseLog(x, y) {
return Math.log(y) / Math.log(x);
Expand Down
86 changes: 0 additions & 86 deletions new_index.html

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions old files/new_index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<header>
<meta charset="utf-8">
<title>Chats</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/d3.v4.3.0.js"></script>
<script src="js/jquery-3.3.1.js"></script>
<script src="js/d3-scale-chromatic.v1.min.js"></script>
</header>
<body>
<div id="graph_container"></div>
<script src="js/graph.js"></script>
</body>
</html>
Binary file added others/screenshot_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion test_multifiles/generator_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
else:
print "it's empthy..."

print ("list_of_exported_files = " + str(list_of_exported_files))
print ("\nlist_of_exported_files = " + str(list_of_exported_files))


# with open(working_directory+'\\files\\data_1.json', 'w') as outfile:
Expand Down

0 comments on commit 6bf9a5a

Please sign in to comment.