Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Commit

Permalink
v1.6.6 - Change Window Sizes.
Browse files Browse the repository at this point in the history
Add Help Menu Item [build]
  • Loading branch information
Dev-I-J committed Dec 14, 2020
1 parent 95b7dd5 commit 5c985eb
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 74 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ And Many More Cool Features...

Download [Here](https://github.com/Dev-I-J/JNote/releases/latest)

## Help

Available At [Github Discussions](https://github.com/Dev-I-J/JNote/discussions)

## Build From Source

__Assuming you already have _Python along with 'pip'_ and _Git_ installed on your computer__,
Expand Down
102 changes: 51 additions & 51 deletions data/about.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
<h1>JNote - A Free NotePad</h1>
<p>
<a href="https://travis-ci.org/Dev-I-J/JNote"><img alt="Build Status" src="https://travis-ci.org/Dev-I-J/JNote.svg?branch=master" /></a>
<a href="https://jnote-notepad.readthedocs.io/en/latest/?badge=latest"><img alt="Documentation Status" src="https://readthedocs.org/projects/jnote-notepad/badge/?version=latest" /></a>
<a href="https://opensource.org/licenses/GPL-3.0"><img alt="License" src="https://img.shields.io/badge/license-GPL%203.0-green.svg" /></a>
<a href="https://deepsource.io/gh/Dev-I-J/JNote/?ref=repository-badge"><img alt="DeepSource" src="https://deepsource.io/gh/Dev-I-J/JNote.svg/?label=active+issues&amp;show_trend=true" /></a>
</p>
<p><a href="https://travis-ci.org/Dev-I-J/JNote"><img alt="Build Status" src="https://travis-ci.org/Dev-I-J/JNote.svg?branch=master" /></a>
<a href="https://jnote-notepad.readthedocs.io/en/latest/?badge=latest"><img alt="Documentation Status" src="https://readthedocs.org/projects/jnote-notepad/badge/?version=latest" /></a>
<a href="https://opensource.org/licenses/GPL-3.0"><img alt="License" src="https://img.shields.io/badge/license-GPL%203.0-green.svg" /></a>
<a href="https://deepsource.io/gh/Dev-I-J/JNote/?ref=repository-badge"><img alt="DeepSource" src="https://deepsource.io/gh/Dev-I-J/JNote.svg/?label=active+issues&amp;show_trend=true" /></a>
<p><img alt="JNote Logo" src="icons/logo.png" /></p>
<p><strong>JNote is a free NotePad</strong> application written in <em>Python and QML (PyQt5).</em> Binaries are available for Windows and Mac, but you can <em>build from source</em> for Linux (See Below).</p>
<h2>Features</h2>
<p>The current version is v1.6.5 and additional for basic functions of a note pad, it can</p>
<ul>
<li>Automatically Check For Updates,</li>
<li>Determine A File Is Binary Or Not And Show Message,</li>
<li>Automatically Guess and Use A Files Encoding While Opening,</li>
<li>Open the last opened file automatically when started,</li>
<li>Save and use the last used fonts when started,</li>
<li>Insert Date and Time,</li>
<li>Render Text As <code>HTML</code> Or <code>Markdown</code> In A Browser,</li>
<li>Execute Text In <code>cmd.exe</code> (Windows and Mac Only),</li>
<li>Super Clean Code.</li>
<li>Automatically Check For Updates,</li>
<li>Determine A File Is Binary Or Not And Show Message,</li>
<li>Automatically Guess and Use A Files Encoding While Opening,</li>
<li>Open the last opened file automatically when started,</li>
<li>Save and use the last used fonts when started,</li>
<li>Insert Date and Time,</li>
<li>Render Text As <code>HTML</code> Or <code>Markdown</code> In A Browser,</li>
<li>Execute Text In <code>cmd.exe</code> (Windows and Mac Only),</li>
<li>Super Clean Code.</li>
</ul>
<p>And Many More Cool Features...</p>
<h2>Download</h2>
<p>Download <a href="https://github.com/Dev-I-J/JNote/releases/latest">Here</a></p>
<h2>Help</h2>
<p>Available At <a href="https://github.com/Dev-I-J/JNote/discussions">Github Discussions</a></p>
<h2>Build From Source</h2>
<p><strong>Assuming you already have <em>Python along with 'pip'</em> and <em>Git</em> installed on your computer</strong>,</p>
<h3>Linux / Mac OS</h3>
<ol>
<li>Clone This Repo in: <code>git clone https://github.com/Dev-I-J/JNote</code></li>
<li>Install <code>shovel</code>: <code>python3 -m pip install shovel</code></li>
<li><code>cd</code> to JNote: <code>cd JNote</code></li>
<li>Build and Run App: <code>python3 -m shovel app.assembleAppRun</code></li>
<li>Run App Afterwards: <code>python3 -m shovel app.runApp</code></li>
<li>Clone This Repo in: <code>git clone https://github.com/Dev-I-J/JNote</code></li>
<li>Install <code>shovel</code>: <code>python3 -m pip install shovel</code></li>
<li><code>cd</code> to JNote: <code>cd JNote</code></li>
<li>Build and Run App: <code>python3 -m shovel app.assembleAppRun</code></li>
<li>Run App Afterwards: <code>python3 -m shovel app.runApp</code></li>
</ol>
<h3>Windows</h3>
<ol>
<li>Clone This Repo in: <code>git clone https://github.com/Dev-I-J/JNote</code></li>
<li>Install <code>shovel</code>: <code>python -m pip install shovel</code></li>
<li><code>cd</code> to JNote: <code>cd JNote</code></li>
<li>Build and Run App: <code>python -m shovel app.assembleAppRun</code></li>
<li>Run App Afterwards: <code>python -m shovel app.runApp</code></li>
<li>Clone This Repo in: <code>git clone https://github.com/Dev-I-J/JNote</code></li>
<li>Install <code>shovel</code>: <code>python -m pip install shovel</code></li>
<li><code>cd</code> to JNote: <code>cd JNote</code></li>
<li>Build and Run App: <code>python -m shovel app.assembleAppRun</code></li>
<li>Run App Afterwards: <code>python -m shovel app.runApp</code></li>
</ol>
<h2>Price</h2>
<p>It's completely FREE and Open Source!</p>
Expand All @@ -51,36 +51,36 @@ <h2>Additional Information</h2>
<p>Additional Information about JNote</p>
<h3>Credits</h3>
<ul>
<li>All The Icons are provided by <a href="https://icons8.com">Icons8</a> For Free.</li>
<li><a href="https://pypi.org/project/pipenv"><code>pipenv</code></a> Is Used For Dependency Management.</li>
<li><a href="https://pypi.org/project/shovel"><code>shovel</code></a> Is Used To Make The Development Process Easier.</li>
<li><a href="https://pypi.org/project/flake8"><code>flake8</code></a> Is Used For Linting Code.</li>
<li><a href="https://pypi.org/project/rope"><code>rope</code></a> Is Used For Refactoring Code.</li>
<li><a href="https://pypi.org/project/autopep8"><code>autopep8</code></a> Is Used For Formatting Code.</li>
<li><a href="https://pypi.org/project/Sphinx/"><code>sphinx</code></a> Is Used To Generate Documentation.</li>
<li>Code Hosted By <a href="https://github.com">GitHub</a>.</li>
<li>Documentation Hosted By <a href="https://readthedocs.org">ReadTheDocs</a>.</li>
<li>Continuous Integration (<code>CI/CD</code>) Provided By <a href="https://travis-ci.org">Travis CI</a>.</li>
<li>The app is build with <a href="https://pypi.org/project/PyInstaller"><code>PyInstaller</code></a>.</li>
<li>Special Thanks to <a href="https://vscode.com">VS Code</a> For Providing the Awesome Code Editor.</li>
<li>All The Icons are provided by <a href="https://icons8.com">Icons8</a> For Free.</li>
<li><a href="https://pypi.org/project/pipenv"><code>pipenv</code></a> Is Used For Dependency Management.</li>
<li><a href="https://pypi.org/project/shovel"><code>shovel</code></a> Is Used To Make The Development Process Easier.</li>
<li><a href="https://pypi.org/project/flake8"><code>flake8</code></a> Is Used For Linting Code.</li>
<li><a href="https://pypi.org/project/rope"><code>rope</code></a> Is Used For Refactoring Code.</li>
<li><a href="https://pypi.org/project/autopep8"><code>autopep8</code></a> Is Used For Formatting Code.</li>
<li><a href="https://pypi.org/project/Sphinx/"><code>sphinx</code></a> Is Used To Generate Documentation.</li>
<li>Code Hosted By <a href="https://github.com">GitHub</a>.</li>
<li>Documentation Hosted By <a href="https://readthedocs.org">ReadTheDocs</a>.</li>
<li>Continuous Integration (<code>CI/CD</code>) Provided By <a href="https://travis-ci.org">Travis CI</a>.</li>
<li>The app is build with <a href="https://pypi.org/project/PyInstaller"><code>PyInstaller</code></a>.</li>
<li>Special Thanks to <a href="https://vscode.com">VS Code</a> For Providing the Awesome Code Editor.</li>
</ul>
<h3>Python Modules Used in Development</h3>
<ul>
<li><a href="https://pypi.org/project/PyQt5/"><code>PyQt5</code></a> for the GUI.</li>
<li><a href="https://pypi.org/project/requests/"><code>requests</code></a> for Pinging the GitHub API to check for updates.</li>
<li><a href="https://pypi.org/project/version-parser/"><code>version-parser</code></a> for Comparing Versions.</li>
<li><a href="https://pypi.org/project/py-gfm/"><code>py-gfm</code></a> GitHub Flavored Markdown Extension for <code>markdown</code> module.</li>
<li><a href="https://pypi.org/project/markdown/"><code>markdown</code></a> for Converting markdown from GitHub to HTML.</li>
<li><a href="https://pypi.org/project/toml/"><code>toml</code></a> for parsing the settings file.</li>
<li><a href="https://pypi.org/project/binaryornot/"><code>binaryornot</code></a> for <em>guessing</em> if files are binary or not.</li>
<li><a href="https://pypi.org/project/cchardet/"><code>cchardet</code></a> for <em>guessing</em> the file encoding.</li>
<li><a href="https://pypi.org/project/chardet/"><code>chardet</code></a> for backup plan if <code>cchardet</code> fails to determine the correct encoding.</li>
<li><a href="https://pypi.org/project/PyQt5/"><code>PyQt5</code></a> for the GUI.</li>
<li><a href="https://pypi.org/project/requests/"><code>requests</code></a> for Pinging the GitHub API to check for updates.</li>
<li><a href="https://pypi.org/project/version-parser/"><code>version-parser</code></a> for Comparing Versions.</li>
<li><a href="https://pypi.org/project/py-gfm/"><code>py-gfm</code></a> GitHub Flavored Markdown Extension for <code>markdown</code> module.</li>
<li><a href="https://pypi.org/project/markdown/"><code>markdown</code></a> for Converting markdown from GitHub to HTML.</li>
<li><a href="https://pypi.org/project/toml/"><code>toml</code></a> for parsing the settings file.</li>
<li><a href="https://pypi.org/project/binaryornot/"><code>binaryornot</code></a> for <em>guessing</em> if files are binary or not.</li>
<li><a href="https://pypi.org/project/cchardet/"><code>cchardet</code></a> for <em>guessing</em> the file encoding.</li>
<li><a href="https://pypi.org/project/chardet/"><code>chardet</code></a> for backup plan if <code>cchardet</code> fails to determine the correct encoding.</li>
</ul>
<h2>Coming Soon</h2>
<p>These functionalities are scheduled to be shipped with the future major releases.</p>
<ul>
<li>Command Line Access,</li>
<li>Auto Updating,</li>
<li>Settings dialog to control your preferences,</li>
<li>Dark Mode!!</li>
</ul>
<li>Command Line Access,</li>
<li>Auto Updating,</li>
<li>Settings dialog to control your preferences,</li>
<li>Dark Mode!!</li>
</ul>
Binary file added icons/help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 18 additions & 2 deletions jnote.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def checkUpdates(self, isStartup: bool) -> None:
"https://api.github.com/repos/Dev-I-J/JNote/releases/latest"
)
with get(url) as r:
currentVersionStr: str = "v1.6.5"
currentVersionStr: str = "v1.6.6"
currentVersion: Version = Version(currentVersionStr)
newVersionStr: str = r.json()['tag_name']
newVersion: Version = Version(newVersionStr)
Expand Down Expand Up @@ -120,7 +120,7 @@ def shellExec(self, script: str) -> None:
@pyqtSlot()
def clean(self) -> None:
try:
self.addComments()
self.__addComments()
for file in self.__cleanupFiles:
try:
os.close(file[0])
Expand All @@ -132,6 +132,22 @@ def clean(self) -> None:
except Exception:
self.fatalError.emit()

@staticmethod
def __addComments() -> None:
comments: str = """\
# DO NOT DELETE OR MODIFY THIS FILE! DOING SO WILL DAMAGE JNOTE!!
# This File is Automatically Generated and is not for adding
# user's preferences.
# These are some small settings used to enhance your experience with
# JNote but not to, Edit or DELETE.
# Doing so will do nothing but only ruin your experience!!!
"""
with open("settings.toml", "r") as settings:
settingsString: str = settings.read()
with open("settings.toml", "w") as settings:
settings.write(comments + settingsString)

@pyqtProperty(str, constant=True)
def about(self) -> str:
"""About JNote"""
Expand Down
21 changes: 16 additions & 5 deletions main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ApplicationWindow {
property string winTitle: "JNote: A Free NotePad"
property bool closing: false
visible: true
width: 800
width: 900
height: 600
title: winTitle + " - Untitled"

Expand Down Expand Up @@ -221,6 +221,12 @@ ApplicationWindow {
onTriggered: licenseDialog.open()
}

MenuItem {
text: "Help"
icon.source: "icons/help.png"
onTriggered: Qt.openUrlExternally("https://github.com/Dev-I-J/JNote/discussions")
}

MenuItem {
text: "Documentation"
icon.source: "icons/documentation.png"
Expand Down Expand Up @@ -371,7 +377,7 @@ ApplicationWindow {

Dialog {
id: aboutDialog
width: 400
width: 600
height: 400
title: "About - JNote"
visible: false
Expand Down Expand Up @@ -403,7 +409,7 @@ ApplicationWindow {
id: licenseDialog
visible: false
title: 'License - JNote'
width: 400
width: 600
height: 400

Flickable {
Expand Down Expand Up @@ -434,8 +440,8 @@ ApplicationWindow {
visible: false
title: 'Update - JNote'
standardButtons: Dialog.No | Dialog.Yes
width: 400
height: 600
width: 600
height: 400
onYes: Qt.openUrlExternally("https://github.com/Dev-I-J/JNote/releases/tag/"+updateText.newVersion)

Flickable {
Expand Down Expand Up @@ -991,6 +997,11 @@ ApplicationWindow {
onActivated: JNote.checkUpdates(false)
}

Shortcut {
sequence: "Alt+Shift+H"
onActivated : Qt.openUrlExternally("https://github.com/Dev-I-J/JNote/discussions")
}

Shortcut {
sequence: "Alt+F4"
onActivated: confirmExit.open()
Expand Down
16 changes: 0 additions & 16 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,3 @@ def getSettings(self, category: str) -> Dict[str, Any]:
except Exception:
self.fatalError.emit()
return {}

@staticmethod
def addComments() -> None:
comments: str = """\
# DO NOT DELETE OR MODIFY THIS FILE! DOING SO WILL DAMAGE JNOTE!!
# This File is Automatically Generated and is not for adding
# user's preferences.
# These are some small settings used to enhance your experience with
# JNote but not to, Edit or DELETE.
# Doing so will do nothing but only ruin your experience!!!
"""
with open("settings.toml", "r") as settings:
settingsString: str = settings.read()
with open("settings.toml", "w") as settings:
settings.write(comments + settingsString)

0 comments on commit 5c985eb

Please sign in to comment.