Spreadsheet output added
This commit is contained in:
191
mainwindow.ui
191
mainwindow.ui
@@ -67,8 +67,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<widget class="QPushButton" name="SearchButton">
|
<widget class="QPushButton" name="SearchButton">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>110</x>
|
<x>140</x>
|
||||||
<y>380</y>
|
<y>400</y>
|
||||||
<width>95</width>
|
<width>95</width>
|
||||||
<height>27</height>
|
<height>27</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -135,37 +135,11 @@ p, li { white-space: pre-wrap; }
|
|||||||
<string>FileName</string>
|
<string>FileName</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QTextBrowser" name="Output">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>390</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>571</width>
|
|
||||||
<height>341</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QCheckBox" name="Popular">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>300</y>
|
|
||||||
<width>94</width>
|
|
||||||
<height>24</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Popular?</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QDateEdit" name="Since">
|
<widget class="QDateEdit" name="Since">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>70</x>
|
<x>70</x>
|
||||||
<y>330</y>
|
<y>310</y>
|
||||||
<width>110</width>
|
<width>110</width>
|
||||||
<height>29</height>
|
<height>29</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -174,9 +148,9 @@ p, li { white-space: pre-wrap; }
|
|||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>10</x>
|
||||||
<y>330</y>
|
<y>310</y>
|
||||||
<width>66</width>
|
<width>41</width>
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -187,8 +161,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<widget class="QDateEdit" name="Until">
|
<widget class="QDateEdit" name="Until">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>270</x>
|
<x>260</x>
|
||||||
<y>330</y>
|
<y>310</y>
|
||||||
<width>110</width>
|
<width>110</width>
|
||||||
<height>29</height>
|
<height>29</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -197,9 +171,9 @@ p, li { white-space: pre-wrap; }
|
|||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>200</x>
|
<x>210</x>
|
||||||
<y>330</y>
|
<y>310</y>
|
||||||
<width>66</width>
|
<width>31</width>
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -207,28 +181,147 @@ p, li { white-space: pre-wrap; }
|
|||||||
<string>Until</string>
|
<string>Until</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
<widget class="QTableWidget" name="Output">
|
||||||
<widget class="QMenuBar" name="menubar">
|
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>400</x>
|
||||||
<y>0</y>
|
<y>21</y>
|
||||||
<width>980</width>
|
<width>571</width>
|
||||||
<height>29</height>
|
<height>361</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menukij">
|
<property name="rowCount">
|
||||||
<property name="title">
|
<number>100</number>
|
||||||
<string>TwintGUI</string>
|
</property>
|
||||||
|
<property name="columnCount">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||||
|
<number>140</number>
|
||||||
|
</attribute>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<row/>
|
||||||
|
<column/>
|
||||||
|
<column/>
|
||||||
|
<column/>
|
||||||
|
<column/>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="Popular">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>70</x>
|
||||||
|
<y>360</y>
|
||||||
|
<width>94</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Popular</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="action_Close"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menukij"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusbar"/>
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
<action name="action_Close">
|
<action name="action_Close">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>& Close</string>
|
<string> Close</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
25
twintgui.py
25
twintgui.py
@@ -1,6 +1,6 @@
|
|||||||
# main.py
|
# main.py
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
from PySide6 import *
|
from PySide6 import *
|
||||||
from PySide6 import QtWidgets
|
from PySide6 import QtWidgets
|
||||||
@@ -8,25 +8,23 @@ from PySide6.QtUiTools import QUiLoader
|
|||||||
import twint
|
import twint
|
||||||
from PySide6.QtWidgets import QApplication, QPushButton
|
from PySide6.QtWidgets import QApplication, QPushButton
|
||||||
from PySide6.QtCore import Slot
|
from PySide6.QtCore import Slot
|
||||||
|
import sqlite3
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
#Ggsya made this :D
|
#Ggsya made this :D
|
||||||
def backslash():
|
def backslash():
|
||||||
return('\ '[0])
|
return('\ '[0])
|
||||||
|
|
||||||
#def check_and_create_dir(path):
|
def check_and_create_dir(path):
|
||||||
# if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
# print('Dir already exists')
|
print('Dir already exists')
|
||||||
# print('Exiting')
|
print('Exiting')
|
||||||
# else:
|
else:
|
||||||
# os.mkdir(path)
|
os.mkdir(path)
|
||||||
|
|
||||||
def tweet_search():
|
def tweet_search():
|
||||||
|
|
||||||
#checking if output folder exists
|
#checking if output folder exists
|
||||||
# check_and_create_dir(os.getcwd() + '\output')
|
check_and_create_dir(os.getcwd() + '\output')
|
||||||
|
|
||||||
search = window.Keyword.toPlainText()
|
search = window.Keyword.toPlainText()
|
||||||
city = window.City.toPlainText()
|
city = window.City.toPlainText()
|
||||||
@@ -41,6 +39,7 @@ def tweet_search():
|
|||||||
c.Search = search
|
c.Search = search
|
||||||
c.Near = city
|
c.Near = city
|
||||||
c.Limit = limit
|
c.Limit = limit
|
||||||
|
c.Store_csv = True
|
||||||
c.Popular_tweets = window.Popular.checkState()
|
c.Popular_tweets = window.Popular.checkState()
|
||||||
|
|
||||||
#c.Since = window.Since
|
#c.Since = window.Since
|
||||||
@@ -48,8 +47,8 @@ def tweet_search():
|
|||||||
#c.Username =
|
#c.Username =
|
||||||
|
|
||||||
#filename becomes the file path
|
#filename becomes the file path
|
||||||
#filename = os.getcwd() + '\output' + backslash() + window.Filename.toPlainText() + '.txt'
|
filename = os.getcwd() + '\output' + backslash + window.Filename.toPlainText()
|
||||||
#c.Output = filename
|
c.Output = filename
|
||||||
|
|
||||||
twint.run.Search(c)
|
twint.run.Search(c)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 4.15.2, 2021-08-14T12:13:33. -->
|
<!-- Written by QtCreator 4.15.2, 2021-08-15T11:23:56. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
@@ -173,16 +173,16 @@
|
|||||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">/home/linly/Documents/Work/Apps/TwintGUI/twintgui.py</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">/home/linly/Work/Apps/TweetSearcherPOG/twintgui.py</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">PythonEditor.RunConfiguration./home/linly/Documents/Work/Apps/TwintGUI/twintgui.py</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">PythonEditor.RunConfiguration./home/linly/Work/Apps/TweetSearcherPOG/twintgui.py</value>
|
||||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/linly/Documents/Work/Apps/TwintGUI/twintgui.py</value>
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/linly/Work/Apps/TweetSearcherPOG/twintgui.py</value>
|
||||||
<value type="QString" key="PythonEditor.RunConfiguation.Interpreter">{f1c2d9db-f11e-401c-8982-385dc026078c}</value>
|
<value type="QString" key="PythonEditor.RunConfiguation.Interpreter">{f1c2d9db-f11e-401c-8982-385dc026078c}</value>
|
||||||
<value type="QString" key="PythonEditor.RunConfiguation.Script">/home/linly/Documents/Work/Apps/TwintGUI/twintgui.py</value>
|
<value type="QString" key="PythonEditor.RunConfiguation.Script">/home/linly/Work/Apps/TweetSearcherPOG/twintgui.py</value>
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/linly/Documents/Work/Apps/TwintGUI</value>
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/linly/Work/Apps/TweetSearcherPOG</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
|
|||||||
Reference in New Issue
Block a user