From c467a51f1786566cab521815b3b5249adfeff762 Mon Sep 17 00:00:00 2001 From: Pranjal Joshi Date: Tue, 14 Dec 2021 20:46:01 +0530 Subject: [PATCH] v1.27 - Whats New Added --- src/classes/Changelog.py | 6 +++++- src/classes/OtaUpdater.py | 12 ++++++++++++ src/classes/Utility.py | 4 ++-- src/release.md | 15 ++++++++------- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/classes/Changelog.py b/src/classes/Changelog.py index 54126aa6..843273e7 100644 --- a/src/classes/Changelog.py +++ b/src/classes/Changelog.py @@ -7,7 +7,7 @@ from classes.ColorText import colorText -VERSION = "1.26" +VERSION = "1.27" changelog = colorText.BOLD + '[ChangeLog]\n' + colorText.END + colorText.BLUE + ''' [1.00 - Beta] @@ -127,5 +127,9 @@ [1.26] 1. New Feature: Screen for the MA Confluence pattern Option > 7 > 4. +[1.27] +1. Display more information about an update when it is available. +2. Minor Fixes (MA Confluence). + --- END --- ''' + colorText.END diff --git a/src/classes/OtaUpdater.py b/src/classes/OtaUpdater.py index 681e3426..0fcc4f54 100644 --- a/src/classes/OtaUpdater.py +++ b/src/classes/OtaUpdater.py @@ -11,6 +11,7 @@ import platform import sys import subprocess +import requests class OTAUpdater: @@ -77,6 +78,16 @@ def updateForMac(url): subprocess.Popen('bash updater.sh', shell=True) sys.exit(0) + # Parse changelog from release.md + def showWhatsNew(): + url = "https://raw.githubusercontent.com/pranjal-joshi/Screeni-py/main/src/release.md" + md = requests.get(url) + txt = md.text + txt = txt.split("New?")[1] + txt = txt.split("## Downloads")[0] + txt = txt.replace('**','').replace('`','').strip() + return (txt+"\n") + # Check for update and download if available def checkForUpdate(proxyServer, VERSION="1.0"): OTAUpdater.checkForUpdate.url = None @@ -97,6 +108,7 @@ def checkForUpdate(proxyServer, VERSION="1.0"): OTAUpdater.checkForUpdate.url = resp.json()['assets'][0]['browser_download_url'] size = int(resp.json()['assets'][0]['size']/(1024*1024)) if(float(resp.json()['tag_name']) > now): + print(colorText.BOLD + colorText.WARN + "[+] What's New in this Update?\n" + OTAUpdater.showWhatsNew() + colorText.END) action = str(input(colorText.BOLD + colorText.WARN + ('\n[+] New Software update (v%s) available. Download Now (Size: %dMB)? [Y/N]: ' % (str(resp.json()['tag_name']),size)))).lower() if(action == 'y'): try: diff --git a/src/classes/Utility.py b/src/classes/Utility.py index 43b97b45..0541dc33 100644 --- a/src/classes/Utility.py +++ b/src/classes/Utility.py @@ -201,7 +201,7 @@ def promptChartPatterns(): if resp == 3: return (resp, 1) if resp == 4: - percent = int(input(colorText.BOLD + colorText.WARN + + percent = float(input(colorText.BOLD + colorText.WARN + "\n[+] Enter Percentage within which all MA/EMAs should be (Ideal: 1-2%)? : " + colorText.END)) return (resp, percent/100.0) if resp >= 0 and resp <= 4: @@ -210,4 +210,4 @@ def promptChartPatterns(): except ValueError: input(colorText.BOLD + colorText.FAIL + "\n[+] Invalid Option Selected. Press Any Key to Continue..." + colorText.END) - return (None, None) + return (None, None) \ No newline at end of file diff --git a/src/release.md b/src/release.md index b7574f7f..312d651f 100644 --- a/src/release.md +++ b/src/release.md @@ -1,14 +1,15 @@ ![MADE-IN-INDIA](https://img.shields.io/badge/MADE%20WITH%20%E2%9D%A4%20IN-INDIA-orange?style=for-the-badge) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/pranjal-joshi/Screeni-py?style=for-the-badge) ![GitHub all releases](https://img.shields.io/github/downloads/pranjal-joshi/Screeni-py/total?color=Green&label=Downloads&style=for-the-badge) ![MADE_WITH](https://img.shields.io/badge/BUILT%20USING-PYTHON-yellow?style=for-the-badge&logo=python&logoColor=yellow) ## What's New? -1. New **Chart Patter** Added! **MA Confluence** of 2 MA Signals for high probability trades - Try `Option > 7 > 4` :rocket: -1. New **Chart Pattern** Added! **IPO Base Breakout** - Try `Option > 7 > 3` -2. Now, Open TradingView chart directly by clicking on the stock symbol! :tada: (Windows users should download and run the Application through the **Windows Terminal** from the Microsoft Store.) -4. Now **Create Your Own Watchlist** in Excel and screen for only those stocks! Try `Option > W` :chart_with_upwards_trend: +1. New **Chart Patter** Added! **MA Confluence** of 2 MA Signals for high probability trades - Try `Option > 7 > 4` +2. New **Chart Pattern** Added! **IPO Base Breakout** - Try `Option > 7 > 3` +3. Now, Open TradingView chart directly by clicking on the stock symbol! :tada: (Windows users should download and run the Application through the **Windows Terminal** from the Microsoft Store.) +4. Now **Create Your Own Watchlist** in Excel and screen for only those stocks! Try `Option > W` +5. Bug-Fixes and Performance Upgrades! ## Downloads -* For :desktop_computer: **Windows** users, download **[screenipy.exe](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.26/screenipy.exe)** -* For :penguin: **Linux** users, download **[screenipy.bin](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.26/screenipy.bin)** -* For :apple: **MacOS** users, download **[screenipy.run](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.26/screenipy.run)** ([Read Installation Guide](https://github.com/pranjal-joshi/Screeni-py/blob/main/INSTALLATION.md#for-macos)) +* For :desktop_computer: **Windows** users, download **[screenipy.exe](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.27/screenipy.exe)** +* For :penguin: **Linux** users, download **[screenipy.bin](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.27/screenipy.bin)** +* For :apple: **MacOS** users, download **[screenipy.run](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.27/screenipy.run)** ([Read Installation Guide](https://github.com/pranjal-joshi/Screeni-py/blob/main/INSTALLATION.md#for-macos)) ## How to use?