Skip to content

Commit

Permalink
v2.05 - Download Results added, Bugfixes and Cosmetic updates
Browse files Browse the repository at this point in the history
- download results button added
- dependencies version bumped
- Dockerfile reverted after DNS fix attempts
- streamlit bumped to latest
- docs updated
- Updates YT thumbnail added
- fixed config save checkbox bug
- stage-2 URL added
- YT added to readme
  • Loading branch information
pranjal-joshi committed Oct 9, 2023
1 parent 6d23232 commit 14fcd09
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 12 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ Screenipy is totally customizable and it can screen stocks with the settings tha

## How to use? (New Version - GUI Based)

[![Screeni-py - Detailed Installation Guide](https://markdown-videos-api.jorgenkh.no/url?url=https%3A%2F%2Fyoutu.be%2F2HMN0ac4H20)](https://youtu.be/2HMN0ac4H20)
[![Screeni-py - Configuration and Usage | Screenipy - Python NSE Stock Screener](https://markdown-videos-api.jorgenkh.no/url?url=https%3A%2F%2Fyoutu.be%2FJCn6z1A7INI)](https://youtu.be/JCn6z1A7INI)
[![Screeni-py - How to install Software Updates? | Screenipy - Python NSE Stock Screener](https://markdown-videos-api.jorgenkh.no/url?url=https%3A%2F%2Fyoutu.be%2FT41m13iMyJc)](https://youtu.be/T41m13iMyJc)


* Install Docker Desktop and pull the `latest` docker image from the [release](https://github.com/pranjal-joshi/Screeni-py/releases/latest) page.
* Checkout this [YouTube Video](https://youtu.be/2HMN0ac4H20) for detailed installation guide.
Expand Down Expand Up @@ -105,17 +108,15 @@ Try to tweak these parameters as per your trading styles. For example, If you're
| Executable/Binary File | Docker |
| :-- | :-- |
| [![GitHub all releases](https://img.shields.io/github/downloads/pranjal-joshi/Screeni-py/total?color=Green&label=Downloads&style=for-the-badge)](#) | ![Docker Pulls](https://img.shields.io/docker/pulls/joshipranjal/screeni-py?style=for-the-badge&logo=docker) |
| Download Directly from the [Release](https://github.com/pranjal-joshi/Screeni-py/releases/latest) page | Need to Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) ⚠️|
| Download Directly from the [Release](https://github.com/pranjal-joshi/Screeni-py/releases/latest) page (DEPRECATED) | Need to Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) ⚠️|
| May take a long time to open the app | Loads quickly |
| Slower screening | Performance boosted as per your CPU capabilities |
| Supports Excel Watchlist screening, Export results as excel | Excel features are not supported ⚠️ |
| You may face errors/warnings due to different CPU arch of your system ⚠️ | Compatible with all x86_64/amd64/arm64 CPUs irrespective of OS (including Mac M1/M2) |
| Works only with Windows 10/11 ⚠️ | Works with older versions of Windows as well |
| Different file for each OS | Same container is compatible with everyone |
| Antivirus may block this as untrusted file ⚠️ | No issues with Antivirus |
| Need to download new file for every update | Updates quickly with minimal downloading |
| No need of commands/technical knowledge | Very basic command execution skills may be required |
| Custom configuration works and persists accross the runs/restarts | Config file resets at every run but your custom config can be uploaded in GUI mode |
| Incompatible with Vector Database ⚠️ | Compatible with all Python libraries |

### How to set up and use Screeni-py with Docker?
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ webencodings # Installed as dependency for html5lib
pandas_ta
# protobuf==3.19.6
protobuf
streamlit==1.26.0
# streamlit==1.26.0
streamlit
tensorflow
chromadb==0.4.10
6 changes: 5 additions & 1 deletion src/classes/Changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from classes.ColorText import colorText

VERSION = "2.04"
VERSION = "2.05"

changelog = colorText.BOLD + '[ChangeLog]\n' + colorText.END + colorText.BLUE + '''
[1.00 - Beta]
Expand Down Expand Up @@ -228,4 +228,8 @@
3. Progressbar added for screening to GUI
4. Documentation updated
[2.05]
1. Download Results button added
2. Docker DNS moved to Google DNS
''' + colorText.END
8 changes: 6 additions & 2 deletions src/classes/ConfigManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def setConfig(self, parser, default=False, showFileCreatedText=True):
str(self.consolidationPercentage))
parser.set('config', 'shuffle', 'y')
parser.set('config', 'cacheStockData', 'y')
parser.set('config', 'onlyStageTwoStocks', 'y')
parser.set('config', 'useEMA', 'n')
parser.set('config', 'onlyStageTwoStocks', 'y' if self.stageTwo else 'n')
parser.set('config', 'useEMA', 'y' if self.useEMA else 'n')
try:
fp = open('screenipy.ini', 'w')
parser.write(fp)
Expand Down Expand Up @@ -157,8 +157,12 @@ def getConfig(self, parser):
self.cacheEnabled = True
if 'n' not in str(parser.get('config', 'onlyStageTwoStocks')).lower():
self.stageTwo = True
else:
self.stageTwo = False
if 'y' not in str(parser.get('config', 'useEMA')).lower():
self.useEMA = False
else:
self.useEMA = True
except configparser.NoOptionError:
input(colorText.BOLD + colorText.FAIL +
'[+] Screenipy requires user configuration again. Press enter to continue..' + colorText.END)
Expand Down
5 changes: 2 additions & 3 deletions src/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Celebrating more than 7K+ Downloads - Thank You for your support :tada:

## Installation Guide

[![Screeni-py - How to install Software Updates? | Screenipy - Python NSE Stock Screener](https://markdown-videos-api.jorgenkh.no/url?url=https%3A%2F%2Fyoutu.be%2FT41m13iMyJc)](https://youtu.be/T41m13iMyJc)
[![Screeni-py - Detailed Installation Guide](https://markdown-videos-api.jorgenkh.no/url?url=https%3A%2F%2Fyoutu.be%2F2HMN0ac4H20)](https://youtu.be/2HMN0ac4H20)

## Downloads
Expand All @@ -41,17 +42,15 @@ Celebrating more than 7K+ Downloads - Thank You for your support :tada:
| Executable/Binary File | Docker |
| :-- | :-- |
| [![GitHub all releases](https://img.shields.io/github/downloads/pranjal-joshi/Screeni-py/total?color=Green&label=Downloads&style=for-the-badge)](#) | ![Docker Pulls](https://img.shields.io/docker/pulls/joshipranjal/screeni-py?style=for-the-badge&logo=docker) |
| Download Directly from the [Release](https://github.com/pranjal-joshi/Screeni-py/releases/latest) page | Need to Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) ⚠️|
| Download Directly from the [Release](https://github.com/pranjal-joshi/Screeni-py/releases/latest) page (DEPRECATED) | Need to Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) ⚠️|
| May take a long time to open the app | Loads quickly |
| Slower screening | Performance boosted as per your CPU capabilities |
| Supports Excel Watchlist screening, Export results as excel | Excel features are not supported ⚠️ |
| You may face errors/warnings due to different CPU arch of your system ⚠️ | Compatible with all x86_64/amd64/arm64 CPUs irrespective of OS (including Mac M1/M2) |
| Works only with Windows 10/11 ⚠️ | Works with older versions of Windows as well |
| Different file for each OS | Same container is compatible with everyone |
| Antivirus may block this as untrusted file ⚠️ | No issues with Antivirus |
| Need to download new file for every update | Updates quickly with minimal downloading |
| No need of commands/technical knowledge | Very basic command execution skills may be required |
| Custom configuration works and persists accross the runs/restarts | Config file resets at every run but your custom config can be uploaded in GUI mode |
| Incompatible with Vector Database ⚠️ | Compatible with all Python libraries |


Expand Down
14 changes: 12 additions & 2 deletions src/streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import configparser
import urllib
import datetime
from time import sleep
from pathlib import Path
from threading import Thread
Expand Down Expand Up @@ -41,7 +42,16 @@ def check_updates():
def show_df_as_result_table():
try:
df = pd.read_pickle('last_screened_unformatted_results.pkl')
st.markdown(f'#### 🔍 Found {len(df)} Results')
ac, bc = st.columns([6,1])
ac.markdown(f'#### 🔍 Found {len(df)} Results')
bc.download_button(
label="Download Results",
data=df.to_csv().encode('utf-8'),
file_name=f'screenipy_results_{datetime.datetime.now().strftime("%H:%M:%S_%d-%m-%Y")}.csv',
mime='text/csv',
type='secondary',
use_container_width=True
)
df.index = df.index.map(lambda x: "https://in.tradingview.com/chart?symbol=NSE%3A" + x)
df.index = df.index.map(lambda x: f'<a href="{x}" target="_blank">{x.split("%3A")[-1]}</a>')
df['Stock'] = df.index
Expand Down Expand Up @@ -391,7 +401,7 @@ def get_extra_inputs(tickerOption, executeOption, c_index=None, c_criteria=None,
ac, bc, cc, dc = st.columns([1,1,1,1])
shuffle = ac.checkbox('Shuffle stocks while screening', value=configManager.shuffleEnabled, disabled=True)
cache = bc.checkbox('Enable caching of stock data after market hours', value=configManager.cacheEnabled, disabled=True)
stagetwo = cc.checkbox('Screen only for Stage-2 stocks', value=configManager.stageTwo)
stagetwo = cc.checkbox('Screen only for [Stage-2](https://www.investopedia.com/articles/investing/070715/trading-stage-analysis.asp#:~:text=placed%20stops.-,Stage%202%3A%20Uptrends,-Image%20by%20Sabrina) stocks', value=configManager.stageTwo)
useema = dc.checkbox('Use EMA instead of SMA', value=configManager.useEMA)

save_button = st.button('Save Configuration', on_click=on_config_change, type='primary', use_container_width=True)
Expand Down

0 comments on commit 14fcd09

Please sign in to comment.