https://github.com/roneoorg/localstackedit
Open local files in Stackedit.io
https://github.com/roneoorg/localstackedit
Last synced: 4 months ago
JSON representation
Open local files in Stackedit.io
- Host: GitHub
- URL: https://github.com/roneoorg/localstackedit
- Owner: RoneoOrg
- License: gpl-3.0
- Created: 2021-10-10T12:08:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-22T10:59:10.000Z (about 5 years ago)
- Last Synced: 2025-02-27T23:46:50.647Z (over 1 year ago)
- Size: 21.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Local Stackedit
This script aims to bodge the limit of [StackEdit.io](https://stackedit.io/) which cannot access local files.
It opens in Brave (as an automated browser - Selenium) the file provided as first argument.
The file can be saved with ctrl + s and closed with ctrl + q (or the usual ways of closing a browser, but the stackedit state won't be saved).
For the moment, it allows only one instance running.
## Usage
`python LocalStackedit.py ""`
or (Linux only on a Python virtual env)
`StackEdit.sh `
Depends on Brave-browser (version `90.1.24.82`).
For future or ulterior versions of Brave, the proper driver can be downloaded on [Chrome's official website](https://chromedriver.storage.googleapis.com/index.html) and placed in the folder `Webdrivers`.
It _should_ work without too many modifications for chromium-based navigators:
- change `src/Browser.initialize` line 83 for the correct browser (`which` check)
- change the ugly hard-coded `windowName` in `LocalStackedit` line 40 by what the windows manager displays
- maybe something else
For Firefox: good luck, have fun.
## Platforms
Tested on Linux, depends on a x-server running (your distro has a windows manager).
Not tested on MacOS, but should work (?).
Edit `src/Browser.initialize` first to allow running on other platform than Linux, download the proper driver for MacOS and place it in the `Webdrivers` folder, and set the `WEBDRIVER` variable.
Not working on Windows due to the usage of a X11 library for `src/WindowManager`
## Installation
**Python**
Python version 3.6 or above
```bash
python --version
```
**Clone the repository**
Git is required
```bash
git --version
```
Clone it
```bash
git clone <++>
```
**Create a virtual environment** (Optional)
`python -m venv venv`
Activate it
`source ./venv/bin/activate`
**Dependencies**
Install dependencies:
```bash
pip install -r requirements.txt
```
**Executable**
Allows execution of the entry point
```bash
chmod +x ./LocalStackedit.py
```
or for the version in a virtual environment
```bash
chmod +x ./StackEdit.sh
```
**Bash shortcut**
If you want to access it directly from the terminal (Linux and MacOsX) with the command `stackedit`:
```bash
INSTALL_DIR="TODO SET ME"
printf "# Stackedit\nalias stackedit='${INSTALL_DIR}/StackEdit.py'" >> ~/.bash_aliases
```
**Update**
```bash
git pull
```
## License and EULA
See `LICENSE`