A repository with all you need to generate a Dash docset for the electron documentation.
I regularly pack electron docsets and submit them. You can download your version of choice right from Dash on your Mac: Open Dash and go to Preferences > Downloads > User Contributed
Instead, if you want to make yours by hand keep on reading.
- OS X or Linux with bash
- Python 2.7.x
- wget
- A pushbullet account (optional, only for Auto Mode, read below)
- clone this repo
cd
into it- install pip dependencies running
pip install -r requirements.txt
This is best for manual docset generation right on your Mac.
Execute in order:
./prepare.sh
./build.py
./pack.sh
- Since electron maintainers removed older doc versions from the website, you'll get the latest doc available.
- You'll found files in the
output
folder.
After you've generated the docset and copied it where you need to, run the clean script.
./clean.sh
- You can leave compressed files in their folders inside the output dir. They won't be overwritten by future script runs.
- Don't worry if you forget to clean before preparing another docset, the
prepare.sh
script will do it for you. - Cleaning up is not done by default so you can keep the uncompressed docset file. That's useful to test it in Dash right after running the script.
- Open Dash
- Go to Preferences > Docsets
- Click on the '+' button in the bottom-left corner and select the just-made docset
Why?
Just because electron website now keeps only the most recent doc, their development is incredibly fast and noboby wants to spend time checking their website afraid to miss a specific doc version to pack for Dash.
The script will:
- check for and notify you via Pushbullet in case a new electron doc version is found
- run all the scripts and create the updated version of the docset
- let you know once it's done.
It's best to set it up in crontab on some VPS.
FYI:
- Auto Mode requires you to have a Pushbullet account and their app installed at least on one device (e.g. your smartphone). No worries, it's free!
- Notifications will be sent to all your devices (so you don't have to remember to change the device_id in case you change device)
- create an API token from your Pushbullet account from here and copy it
- clone this repo and
cd
to this repo dir echo "your_token_here" > userdata/pushbullet_api_token.txt
- run
crontab -e
and enter something like0 */12 * * * python2 /path/to/this/repo/update_checker.py
This will run the script twice a day - Done! No more need to edit files in
userdata
dir.
Logs are saved in ~/.config/electron-dash-docset/
(only in Auto Mode).
Simply delete the repo folder. This has been designed so no files (config or downloaded) go outside the repo root.
Want to contribute? Feel free to do it!
- Fork this repo
- Make it better
- Send me a PR
Thanks to Bhargav Nookala (nooknb[at]gmail[dot]com) for is input to tidy up some things in v1.x
.
The software in this repository are released under the GNU GPLv3 License by Francesco Pira (dev[at]fpira[dot]com, fpira.com). You can read the terms of the license here.