copy-as-markdown
copy-as-markdown copied to clipboard
Per-site link formatting
Problem
Personally I use this extension a lot for aggregating pull requests.
When copying with GitHub issues, we get string like this:
* [Web extension by chitsaou · Pull Request #48 · chitsaou/copy-as-markdown](https://github.com/chitsaou/copy-as-markdown/pull/48)
result is:
For GitHub, instead of links, we can also copy title only -- GitHub will handle link referencing automatically:
* Web extension by chitsaou · Pull Request #48 · chitsaou/copy-as-markdown
becomes
- Web extension by chitsaou · Pull Request #48 · chitsaou/copy-as-markdown
But the string itself can be reformatted to make it look better:
* #48 Web extension by @chitsaou
becomes
- #48 Web extension by @chitsaou
Idea
Add a setting to let user customize title style per domain.
Make it per site because usually the title are same under the same domain.
For example:
/(.+) by ([\S]+) · Pull Request (#\d+) · (.+)
replaces to
$3 $1 by @$2 ($4)
Furthermore, it should be able to be imported, so users can "install a plugin" for common sites.
Some of the features discussed here look like features provided by https://addons.mozilla.org/en-US/firefox/addon/easy-copy/ (which became obsolete with Firefox 57). This information may provide help/insight/inspiration to evolve copy-as-markdown?
For example:
@sgourichon Thanks for your input. I also read your comment in https://github.com/chitsaou/copy-as-markdown/issues/12#issuecomment-345250185 . You proved a hypothesis in my mind: there must already be an app doing the thing I was thinking about :)
Although Easy Copy provides extensive support to many use cases, I prefer not to make the UI too complex -- keep it as simple as possible, yet powerful to most users.
That's okay, you are the master of your project. In the meantime I've discovered asamuzaK/url2clipboard: Copy document URL / link URL to clipboard as HTML, Markdown, BBCode, Text, etc. which has similar features.
If the user can customize the output of copy-as-markdown. I think we are as org user, can benefit from this feature and changes the output to match org format.
Interesting thoughts... I might consider changing the extension name to make it sounds more powerful 💪
Is it still active? I would be happy to use such a nice tooling in my daily routine