From bd092ba60fdb458532505f704c1110135a7c8f54 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Sun, 6 Jan 2019 22:15:53 +0000 Subject: [PATCH] Update readme, set up icon --- README.md | 138 ++++++++++++------------------------------- TODO.org | 33 +++++++++-- package.json | 2 +- publish | 9 +++ server/run | 2 +- src/img/icon-128.png | Bin 13531 -> 0 bytes src/img/icon-34.png | Bin 1368 -> 0 bytes src/img/unicorn.png | Bin 0 -> 2860 bytes src/js/options.js | 2 +- src/manifest.json | 5 +- webpack.config.js | 3 + 11 files changed, 83 insertions(+), 111 deletions(-) create mode 100755 publish delete mode 100644 src/img/icon-128.png delete mode 100644 src/img/icon-34.png create mode 100644 src/img/unicorn.png diff --git a/README.md b/README.md index cf03fc1..7d196f3 100644 --- a/README.md +++ b/README.md @@ -1,117 +1,53 @@ Build status: [![CircleCI](https://circleci.com/gh/karlicoss/grasp.svg?style=svg)](https://circleci.com/gh/karlicoss/grasp) -# TODO add some docs.. +Grasp is an extension for Chrome (Firefox support is in progress), which adds a button/keybinding to capture current page title and url, +possibly selected text, additional comments or tags and send it into your [Org Mode](https://orgmode.org/) file. -# Chrome Extension Webpack Boilerplate +# Requirements +* `pip3 install --user hug` for [Hug](http://www.hug.rest/) HTTP server. -A basic foundation boilerplate for rich Chrome Extensions using [Webpack](https://webpack.github.io/) to help you write modular and modern Javascript code, load CSS easily and [automatic reload the browser on code changes](https://webpack.github.io/docs/webpack-dev-server.html#automatic-refresh). +# Running +1. Install server counterpart as systemd service: `server/setup`. +2. Install chrome extension and configure hotkeys -## Developing a new extension -_I'll assume that you already read the [Webpack docs](https://webpack.github.io/docs) and the [Chrome Extension](https://developer.chrome.com/extensions/getstarted) docs._ +That's it! Currently port `12212` is hardcoded, but it will be configurable. +# Motivation +Why use org-capture? Well, it's hard to explain, maybe some other time... However if you do know you want to use it instead/alongside your browser bookmarks, by default +you don't have much choice and have to copy everything manually. For an average Org Mode user it's a torture. -1. Check if your Node.js version is >= 6. -2. Clone the repository. -3. Install [yarn](https://yarnpkg.com/lang/en/docs/install/). -4. Run `yarn`. -5. Change the package's name and description on `package.json`. -6. Change the name of your extension on `src/manifest.json`. -7. Run `npm run start` -8. Load your extension on Chrome following: - 1. Access `chrome://extensions/` - 2. Check `Developer mode` - 3. Click on `Load unpacked extension` - 4. Select the `build` folder. -8. Have fun. +For a while, I used [the only](https://github.com/sprig/org-capture-extension) Chrome extension for that (as for January 2019). However, it relies on setting up MIME +handler which is quite flaky for many people. What is more, capturing via org template requires always running emacs daemon, which might be too much for some people. +But the worst thing is if capturing fails, you have to way of knowing about it. After losing few days of captured stuff due to MIME handler mysteriously not working, +I got fed up and figured it's time to implement something more reliable. -## Structure -All your extension's development code must be placed in `src` folder, including the extension manifest. +My approach still requires a running server, but it's a simple python script which simply appends a text entry to a text file. The backend always responds back and in case anything +fails, you get a notification. -The boilerplate is already prepared to have a popup, a options page and a background page. You can easily customize this. +Extra collateral benefit is that you can potentially add anything as a backend, e.g. you might be more of a Markdown or Todo.txt fan (let me know if you are interested in that!). -Each page has its own [assets package defined](https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate/blob/master/webpack.config.js#L16-L20). So, to code on popup you must start your code on `src/js/popup.js`, for example. +# Potentional improvements +* due to server counterpart, one could even run it elsewhere, not necessarily on localhost +* also see [todos](./TODO.org) -You must use the [ES6 modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) to a better code organization. The boilerplate is already prepared to that and [here you have a little example](https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate/blob/master/src/js/popup.js#L2-L4). +# Building extension +The most up-to-date instructions should be in [CI config](./.circleci/config.yml). -## Webpack auto-reload and HRM -To make your workflow much more efficient this boilerplate uses the [webpack server](https://webpack.github.io/docs/webpack-dev-server.html) to development (started with `npm run server`) with auto reload feature that reloads the browser automatically every time that you save some file o your editor. +You're gonna need `npm` for building extension. -You can run the dev mode on other port if you want. Just specify the env var `port` like this: + npm install + npm run build + +After that you can find the extension in `build` directory and 'Load unpacked' if necessary. There is also Flow and Eslint set up. -``` -$ PORT=6002 npm run start -``` +# Permissions used +* `notifications` for showing error notification +* `activeTab` for requesting url, title and selected text +* `http://*/capture` for talking with backend. This is a bit too broad, but don't think there is a stricter way of doing that? Let me know if there is. -## Content Scripts +* `content_security_policy` needed for webpack. -Although this boilerplate uses the webpack dev server, it's also prepared to write all your bundles files on the disk at every code change, so you can point, on your extension manifest, to your bundles that you want to use as [content scripts](https://developer.chrome.com/extensions/content_scripts), but you need to exclude these entry points from hot reloading [(why?)](https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate/issues/4#issuecomment-261788690). To do so you need to expose which entry points are content scripts on the `webpack.config.js` using the `chromeExtensionBoilerplate -> notHotReload` config. Look the example below. - -Let's say that you want use the `myContentScript` entry point as content script, so on your `webpack.config.js` you will configure the entry point and exclude it from hot reloading, like this: - -```js -{ - … - entry: { - myContentScript: "./src/js/myContentScript.js" - }, - chromeExtensionBoilerplate: { - notHotReload: ["myContentScript"] - } - … -} -``` - -and on your `src/manifest.json`: - -```json -{ - "content_scripts": [ - { - "matches": ["https://www.google.com/*"], - "js": ["myContentScript.bundle.js"] - } - ] -} - -``` - -## Packing -After the development of your extension run the command - -``` -$ NODE_ENV=production npm run build -``` -Now, the content of `build` folder will be the extension ready to be submitted to the Chrome Web Store. Just take a look at the [official guide](https://developer.chrome.com/webstore/publish) to more infos about publishing. - -## Secrets -If you are developing an extension that talks with some API you probably are using different keys for testing and production. Is a good practice you not commit your secret keys and expose to anyone that have access to the repository. - -To this task this boilerplate import the file `./secrets..js` on your modules through the module named as `secrets`, so you can do things like this: - -_./secrets.development.js_ - -```js -export default { key: "123" }; -``` - -_./src/popup.js_ - -```js -import secrets from "secrets"; -ApiCall({ key: secrets.key }); -``` -:point_right: The files with name `secrets.*.js` already are ignored on the repository. - -## With React.js -:bulb: If you want use [React.js](https://facebook.github.io/react/) with this boilerplate, check the **[react branch](https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate/tree/react)**. - - -## Contributing - -1. **Please!! Do not create a pull request without an issue before discussing the problem.** -2. On your PR make sure that you are following the current codebase style. -3. Your PR must be single purpose. Resolve just one problem on your PR. -4. Make sure to commit in the same style that we are committing until now on the project. - -------------- -Samuel Simões ~ [@samuelsimoes](https://twitter.com/samuelsimoes) ~ [Blog](http://blog.samuelsimoes.com/) +# Credits +* Icon made by Freepik from www.flaticon.com, licensed by CC 3.0 BY +* [Original Org Capture extension](https://github.com/sprig/org-capture-extension) +* [Boilerplate for Webpack Chrome extension](https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate)) diff --git a/TODO.org b/TODO.org index 016fb13..2a3d44a 100644 --- a/TODO.org +++ b/TODO.org @@ -1,29 +1,50 @@ -* TODO [#B] release somewhere? not sure if necessary -* TODO [#B] docs on using +* TODO [#A] adjust permissions... I guess gonna have to make it include /capture endpoint? + + + +* START [#B] release somewhere? not sure if necessary +* TODO [#B] get rid of kython, run ci for python too? + * TODO [#B] doesn't look like hotkey working unless you manually rebind.. wtf? -* TODO [#C] motivation -** TODO the benefit is that you can also add anything as a backend, e.g. you might be more of markdown fan or todo.txt - * TODO [#C] how to test it? try on different pages? * TODO [#C] some sort of append logic? e.g. don't dump immediately and add as subitems? +* TODO [#C] make notification configurable or only in case of errors * TODO [#D] do not minfy for dev * TODO not sure, maybe extension press should be default? control it via option? -* TODO or, add menu to extension? +* TODO [#C] or, add menu to extension? * TODO unsafe-eval in content security policy?? * TODO make manifest templated so we don't have to hardcode actions +* TODO +## Packing +After the development of your extension run the command + +``` +$ NODE_ENV=production npm run build +``` +Now, the content of `build` folder will be the extension ready to be submitted to the Chrome Web Store. Just take a look at the [official guide](https://developer.chrome.com/webstore/publish) to more infos about publishing. + + * DONE [#A] move server to a separate folder, systemd install script CLOSED: [2019-01-05 Sat 14:38] * DONE [#A] entering additional information and tags CLOSED: [2019-01-06 Sun 20:41] +* DONE [#B] docs on using + CLOSED: [2019-01-06 Sun 21:39] * DONE [#B] circleci? CLOSED: [2019-01-06 Sun 13:50] +* DONE [#C] motivation + CLOSED: [2019-01-06 Sun 21:35] +** DONE the benefit is that you can also add anything as a backend, e.g. you might be more of markdown fan or todo.txt + CLOSED: [2019-01-06 Sun 21:35] + * DONE [#D] nicer manifest? CLOSED: [2019-01-06 Sun 13:43] + diff --git a/package.json b/package.json index 3159802..1373f64 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grasp-extension", - "version": "0.3.1", + "version": "0.3.2", "description": "A reliable way of capturing web pages and content", "scripts": { "build": "webpack --progress --profile --colors", diff --git a/publish b/publish new file mode 100755 index 0000000..18ba948 --- /dev/null +++ b/publish @@ -0,0 +1,9 @@ +#!/bin/bash +set -eu + + +VERSION="$(git tag --points-at)" +[[ -n $VERSION ]] + +npm run build +zip "grasp-$VERSION.zip" build/ \ No newline at end of file diff --git a/server/run b/server/run index 987e517..e8a71cb 100755 --- a/server/run +++ b/server/run @@ -3,6 +3,6 @@ set -eux cd "$(dirname "$0")" -PORT=8090 +PORT=12212 hug -p "$PORT" -f server.py diff --git a/src/img/icon-128.png b/src/img/icon-128.png deleted file mode 100644 index 38d0a06221ff2508c84e9eadd8b99d6e3e77860c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13531 zcmV<1G$hN3P)PyUl}SWFRCodHoq4pKMV06)1B5^l0%0aV7-XI!A}9g^3W~2)a6oK8LBWAZeci9$ zvX|QHb+_HC8KniD;8O&Fw@`Qu3$+0O5t&2?4G0K?84{8ZNJt2f@ak9h{!aF(eCOVC zZ|+U_gS}Rrs@k>pu3dZYs;|D`eBX%F0NZZ6?O_>xxTJ`OHuo1%>5VtuNKG=k#dRZZ)TmL3G!R%( z`eWM&^y}Eo(H;9+hn{k_=fYf^oy&J+zDpi@=%HUkS(JOc+Kb&`haGm!2LDNB*ac^h z6iylE+evJvTtgGCrlF3^B}kuS$}9Y_NBRD9E}Q%WpE0Nvp&+|FdZr_?IxXp zTmgCpw<00xANzHNq5IoafAm8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TiIuf=pPv>W0u`EV+q4t!`9`eDGf;rLZOu8Yes)X$G9%d6_~#RLsZ{ z8}Vjw1j+_;3Gx_9o%bQy0OTA^{jLS;7h)M&_rk~eweV?k(owF;7NJqZVt)#mc-=|D z+(mh}czss2lS@qd!N3|a28F;Sy^U*fw`3g^e8M0<@E6`Do?mtoTZPR$>MOr^3`P94 z?)cxg^LKV0 ACIA2c literal 0 HcmV?d00001 diff --git a/src/js/options.js b/src/js/options.js index ab6c369..6872b90 100644 --- a/src/js/options.js +++ b/src/js/options.js @@ -3,7 +3,7 @@ const capture_endpoint = 'capture'; function port(): string { - return "8090"; + return "12212"; } // none means do not use tags diff --git a/src/manifest.json b/src/manifest.json index 982c778..fde363e 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,5 +1,8 @@ { "name": "Grasp Extension", + "icons": { + "128": "unicorn.png" + }, "options_page": "options.html", "background": { "page": "background.html" @@ -11,7 +14,7 @@ "permissions": [ "notifications", "activeTab", - "http://*/" + "http://*/capture" ], "commands": { "capture-simple": { diff --git a/webpack.config.js b/webpack.config.js index ea84d8e..c9f339c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -65,6 +65,9 @@ var options = { plugins: [ // clean the build folder new CleanWebpackPlugin(["build/*"]), + new CopyWebpackPlugin([ + { from: 'src/img/unicorn.png' }, + ]), // expose and write the allowed env vars on the compiled bundle new webpack.DefinePlugin({ "process.env.NODE_ENV": JSON.stringify(env.NODE_ENV)