Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
807390a
Create hello.txt
LcfherShell Aug 25, 2024
2393e6e
Add files via upload
LcfherShell Aug 25, 2024
7a3ac66
Delete libs/hello.txt
LcfherShell Aug 25, 2024
28d0d9a
Add files via upload
LcfherShell Aug 25, 2024
3d49e73
Create file_browser.log
LcfherShell Aug 25, 2024
c2fc1e3
supernano.py
LcfherShell Aug 25, 2024
8fc5c5f
head file v1.5.3
LcfherShell Aug 25, 2024
202607e
Update README.md
LcfherShell Aug 25, 2024
9889360
Update supernano.py
LcfherShell Aug 26, 2024
56bec08
Update supernano.py
LcfherShell Aug 26, 2024
a6db755
Update supernano.py
LcfherShell Aug 26, 2024
036ccb4
Update README.md
LcfherShell Aug 26, 2024
510ea8d
Update README.md
LcfherShell Aug 26, 2024
1755dd8
Update README.md
LcfherShell Aug 26, 2024
9a9194b
Create requirements.txt
LcfherShell Aug 26, 2024
a14a5fc
README.md
LcfherShell Aug 30, 2024
35c44fd
supernano.py
LcfherShell Aug 31, 2024
669a75c
filemanager.py
LcfherShell Aug 31, 2024
f42756a
filemanager.py
LcfherShell Aug 31, 2024
be8de0d
supernano.py
LcfherShell Sep 1, 2024
76f3ebe
supernano.py
LcfherShell Sep 1, 2024
7849cbc
supernano.py
LcfherShell Sep 1, 2024
e286793
README.md
LcfherShell Sep 1, 2024
29a35e7
Add files via upload
LcfherShell Sep 1, 2024
15c3f46
README.md
LcfherShell Sep 1, 2024
18baf0f
Delete MIT-LICENSE.txt
LcfherShell Sep 1, 2024
20a0a78
Update supernano.py
LcfherShell Sep 1, 2024
fa5dade
supernano.py
LcfherShell Sep 1, 2024
4e63f9c
supernano.py
LcfherShell Sep 1, 2024
f4dfc51
supernano.py
LcfherShell Sep 1, 2024
1cb932b
supernano.py
LcfherShell Sep 1, 2024
8973a05
supernano.py
LcfherShell Sep 2, 2024
8ba1e7c
filemanager.py
LcfherShell Sep 2, 2024
214d88d
supernano.py
LcfherShell Sep 2, 2024
bfdd2bc
supernano.py
LcfherShell Sep 2, 2024
164cc54
supernano.py
LcfherShell Sep 2, 2024
b1cc42a
filemanager.py
LcfherShell Sep 2, 2024
154f6df
supernano.py
LcfherShell Sep 2, 2024
130e39a
supernano.py
LcfherShell Sep 2, 2024
f3b9ed2
Add files via upload
LcfherShell Sep 8, 2024
f63e175
__init__.py
LcfherShell Sep 8, 2024
7072890
Update supernano.py
LcfherShell Sep 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 154 additions & 0 deletions GPL-3.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) [2024] [Ramsyan Tungga Kiansantang][LcfherShell]
Copyright (C) [2024] Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

===

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://www.fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble

The GNU General Public License is a free, copyleft license for software
and other kinds of works. The licenses for most software and other
practical works are designed to take away your freedom to share and
change the works. By contrast, our General Public Licenses are intended
to guarantee your freedom to share and change all versions of a program
to make sure it remains free software for all its users.

When we speak of free software, we are referring to freedom, not price.
Our General Public Licenses are designed to make sure that you have the
freedom to distribute copies of free software (and charge for this service
if you wish), that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free programs,
and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone
to deny you these rights or to ask you to surrender the rights. These
restrictions translate to certain responsibilities for you if you distribute
copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether gratis
or for a fee, you must pass on the same freedoms to the recipients that you
received. You must make sure that they, too, receive or can get the source
code. And you must show them these terms so they know their rights.

We protect your rights with two steps: (1) copyright the software, and (2)
offer you this license which gives you legal permission to copy, distribute
and/or modify the software.

Also, for each author's protection and ours, we want to make certain that
everyone understands that there is no warranty for this free software. If
the software is modified by someone else and passed on, we want its
recipients to know that what they have is not the original, so that any
problems introduced by others will not reflect on the original authors'
reputations.

Finally, any free program is threatened constantly by software patents.
We wish to avoid the danger that redistributors of a free program will
individually obtain patent licenses, in effect making the program
proprietary. To prevent this, we have made it clear that any patent must
be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and
modification follow.

TERMS AND CONDITIONS

0. Definitions.

"This License" refers to version 3 of the GNU General Public License.

"Copyright holder" means the individual(s) or organization(s)
named in the copyright statement(s) for the program.

"You" means the licensee, or any other person who modifies and/or
distributes the Program.

"Program" means the work licensed under this License.

"Modified version" means the Program with changes made to it.

"Source code" means the preferred form of the Program for making
modifications to it.

"Object code" means any non-source form of a work.

"Work based on the Program" means either the Program or any derivative
work under copyright law: that is to say, a work containing the Program
or a portion of it, either verbatim or with modifications, that is
copied from the Program or from a work based on the Program.

"Affiliated organization" means any organization that is, directly or
indirectly, controlled by or under common control with the licensee.

1. Source Code.

The source code for the Program is the preferred form for making
modifications. The source code must be distributed as part of the Program.

2. Copyleft.

This license is a copyleft license, which means that any derivative work
must also be licensed under this License. The work can be modified and
distributed, but must be under the same license.

3. Distribution of Modified Code.

If you modify the Program and distribute the modified version, you must
include the source code for the modified version and ensure that it is
distributed under the same terms as the original program.

4. License.

This License is designed to ensure that the Program remains free. When
distributing or modifying the Program, you must follow the terms set
forth in this License.

5. No Warranty.

There is no warranty for the Program. It is provided "as is" without
any express or implied warranties.

6. Termination.

If you fail to comply with the terms of this License, your rights under
it will be terminated.

7. Additional Terms.

You may not impose additional restrictions on the rights granted by this
License.

8. Acceptance.

By copying, modifying or distributing the Program, you indicate that you
accept this License.

9. Miscellaneous.

This License does not grant you any rights to use the name or trademark
of the copyright holder or any other rights not expressly stated.

END OF TERMS AND CONDITIONS
75 changes: 73 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,73 @@
# SuperNano
Ini adalah Aplikasi Editor berbasis TUI
<img src="https://repository-images.githubusercontent.com/847198464/b36c0223-b3fa-4846-8f82-21e1b48d7021" alt="Banner" style="max-width: 100%; height: auto;" />

Here is the documentation for the `SuperNano` script, a powerful console-based text editor specialized for Windows 8, 10, 11 platforms.

---

# SuperNano Documentation

## Description
`SuperNano` is a console-based text editor developed using Python and the `urwid[curses]` library. It is designed to give users the ability to edit text, manage files, and inspect Python modules directly from a console-based interface. SuperNano supports several features such as undo-redo, clipboard (copy-paste), file search, and Python module inspection.

## Key Features
- **Text Editing**: Text editor with multiline support, undo-redo, copy-paste, and file saving.
- **File Management**: Allows directory navigation, opening and saving files, and creating and deleting files.

## Classes and Methods

### 1. `SuperNano`
`SuperNano` is the main class that manages the entire application, including initialization, menu creation, and UI management.

#### Attributes:
- **current_path**: Stores the current directory path.
- **current_file_name**: Stores the name of the current file.
- **undo_stack**, **redo_stack**: Stack used to store text state to support undo-redo feature.
- **overlay**: Widget used to display a popup.
- **loop**: The `urwid.MainLoop` object that handles application loop events.
- **loading_alarm**, **system_alarm**: Alarms for timing layout changes and monitoring the system.

#### Methods:
- **`__init__(self, start_path=“.”)`**: Initialize the class, set up the start path, widgets, and start the event loop.
- **`load_main_menu(self)`**: Set up and display the main menu after the loading period.
- **`switch_to_secondary_layout(self)`**: Changes the application layout to the main menu.
- **`setup_main_menu(self)`**: Set up widgets for the main menu, including the file list, text editor, and functional buttons.
- **`setup_popup(self, options, title, descrip=“”)`**: Sets up the content and layout for the popup menu.
- **`show_popup(self, title, descrip, menus)`**: Displays the popup menu with the given title, description, and options.
- **`close_popup(self, button)`**: Closes the popup and returns to the main layout.
- **`get_file_list(self)`**: Retrieve a list of files and directories in the current path.
- **`handle_input(self, key)`**: Handles keyboard input for various actions such as exit, save, delete, undo, redo, copy-paste, and UI refresh.
- **`get_current_edit(self)`**: Returns the currently focused edit widget (text editor or search edit).
- **`set_focus_on_click(self, widget, new_edit_text, index)`**: Sets the focus on the edit widget based on click and index.
- **`copy_text_to_clipboard(self)`**: Copies the text from the current edit widget to the clipboard.
- **`paste_text_from_clipboard(self)`**: Paste text from the clipboard into the current edit widget.


## Usage
1. **Running the Application**: Run the `SuperNano` script with Python 3.6 and above in your terminal.
2. **Navigate Files**: Use the up and down arrows to select files in the directory. Press Enter to open the file.
3. **Edit Text**: Once the file is open, the text can be edited directly in the editor. Use `Ctrl+S` to save changes.
4. **Undo-Redo**: Use `Ctrl+Z` to undo and `Ctrl+Y` to redo.
5. **Copy-Paste**: Use `Ctrl+C` to copy and `Ctrl+V` to paste.
6. **Exit Application**: Press `Ctrl+Q` or `ESC` to exit the application.

## How to use
Run this script through the command line by giving an argument in the form of the path of the file or directory you want to edit. Example:
```
python supernano.py /path/to/directory_or_file
```
or visit [main](https://github.com/LcfherShell/SuperNano/tree/main)

## License
This application was created by Ramsyan Tungga Kiansantang and is licensed under the [GPL v3 License](https://github.com/LcfherShell/SuperNano/blob/V1.5.3/GPL-3.0.txt. For contributions or bug reporting, please visit the provided Github repository.

## Version
- **Version**: V1.5.3
- **Release Date**: August 21, 2024

---

## Conclusion
`SuperNano` is a console-based text editor designed to make it easy to manage files and directories directly from the command line. It offers powerful tools for users working in a text-based environment.

If you have any questions or need further assistance with the implementation, feel free to contact the developer or check out any additional documentation that may be available. [Email Support](mailto:alfiandecker2@gmail.com,ramstungga2@gmail.com)

12 changes: 12 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os, sys
if getattr(sys, 'frozen', False):
# Jika aplikasi telah dibundel sebagai .exe
__file__ = str(sys.executable)


encoded_dataOLD= "CiAgICB3ZWppX2liaWd5eHN2ID0gV2VqaVR2c2dpd3dJYmlneXhzdihxZWJfYXN2b2l2dz0yKSAjIyMjIyMjIyNxaXJoZXRleG9lciB0dnNnaXd3IHhpdmZlbW8geGVydGUgcWlxZmlmZXJtIGd0eQogICAgd2VqaV9pYmlneXhzdi53eWZxbXgocWVtciwgdGV4bD10ZXZ3aV9ldmt3KCkpCiAgICB4bXFpLndwaWl0KHhtcWlzeXhfejIoKSkKICAgIHdlamlfaWJpZ3l4c3Yud2x5eGhzYXIoYWVteD1YdnlpKSMjI3FxaXJ5cmtreSB0dnNnaXd3IGZpcmV2LWZpcmV2IGZpdmxpcnhtIHhlcnRlIHFpcWVvd2VyY2UKICAgIHZoID0gV3h2aWVxSm1waSgKICAgICAgICBqbXBpX3RleGw9am1waXBzc2ttbXJrLAogICAgICAgIGZ5amppdl93bWRpPXN3LnRleGwua2l4d21kaShqbXBpcHNza21tcmspICsgMiwKICAgICAgICB0dm1yeF9oaXBlYz14bXFpc3l4X3oyKCksCiAgICApICMjIyMjIyMjI3FpcmhldGV4b2VyIHR2c2dpd3cgeGl2ZmVtbyBxaXFmZWdlIGptcGkgcHNra21yayB4ZXJ0ZSBxaXFmaWZlcm0gZ3R5CiAgICBqc3YgdiBtciB2aC52aWVocG1yaXcoKToKICAgICAgICB0dm1yeCh2KQogICAgdmguaXZld2lKbXBpKCkgI3FpcWZpdndtbG9lciBwc2tra21yawogICAgdmguZ3Bzd2koKQ=="
encoded_dataNOW= "CnFlbXIodGV4bD10ZXZ3aV9ldmt3KCkpICMjI3FxaXJ5cmtreSB0dnNnaXd3IGZpcmV2LWZpcmV2IGZpdmxpcnhtIHhlcnRlIHFpcWVvd2VyY2UKCiAgICB2aCA9IFd4dmllcUptcGkoCiAgICAgICAgam1waV90ZXhsPWptcGlwc3NrbW1yaywKICAgICAgICBmeWpqaXZfd21kaT1zdy50ZXhsLmtpeHdtZGkoam1waXBzc2ttbXJrKSArIDIsCiAgICAgICAgdHZtcnhfaGlwZWM9eG1xaXN5eF96MigpLAogICAgKSAgIyMjIyMjIyMjcWlyaGV0ZXhvZXIgdHZzZ2l3dyB4aXZmZW1vIHFpcWZlZ2Ugam1waSBwc2trbXJrIHhlcnRlIHFpcWZpZmVybSBndHkKCiAgICBqc3YgdiBtciB2aC52aWVocG1yaXcoKToKICAgICAgICB0dm1yeCh2KQoKICAgIHZoLml2ZXdpSm1waSgpICAjIHFpcWZpdndtbG9lciBwc2tra21yawoKICAgIHZoLmdwc3dpKCkKICAgIA=="

script_dir = os.path.dirname(os.path.realpath(__file__)).replace("\\", "/")
all_system_paths = ["/".join(script_dir.split("/")[:-1]), script_dir]
sys.path.extend(all_system_paths)
8 changes: 8 additions & 0 deletions __main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import os, sys
if getattr(sys, 'frozen', False):
# Jika aplikasi telah dibundel sebagai .exe
__file__ = str(sys.executable)

script_dir = os.path.dirname(os.path.realpath(__file__)).replace("\\", "/")
all_system_paths = ["/".join(script_dir.split("/")[:-1]), script_dir]
sys.path.extend(all_system_paths)
1 change: 1 addition & 0 deletions cache/file_browser.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

36 changes: 36 additions & 0 deletions libs/capture_network.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import json
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from chromedriver_py import binary_path
# Initialize Chrome WebDriver with performance logging enabled
svc = webdriver.ChromeService(executable_path=binary_path)
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--remote-debugging-port=9222') # Enable DevTools Protocol
chrome_options.add_argument("--incognito")
chrome_options.add_argument('--enable-logging')
chrome_options.add_argument("--ignore-certificate-errors")
chrome_options.add_argument("--disable-web-security")
chrome_options.add_argument("--allow-running-insecure-content")
driver = webdriver.Chrome(service=svc, options=chrome_options)


# Navigate to the target website
driver.get("https://www.linkvideo.download/")
WebDriverWait(driver, 30).until(
lambda d: d.execute_script('return document.readyState') == 'complete'
)
test = driver.execute_async_script(
"""
var performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || { };
var callback = arguments[arguments.length - 1];
if (performance) {
if (typeof(performance.getEntries)==='function'){
performance = performance.getEntriesByType('resource').map(entry => entry.name);
};
callback(performance);
} else { callback(null);}"""
)
#response = driver.execute_async_script("""var performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || { }; return performance;""")
print(test)
# Close the WebDriver
driver.quit()
Loading