emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ANN: org-web-tools
@ 2017-07-21 17:53 Adam Porter
  0 siblings, 0 replies; 6+ messages in thread
From: Adam Porter @ 2017-07-21 17:53 UTC (permalink / raw)
  To: emacs-orgmode

Hi friends,

I've just uploaded a package containing some code that I've been using
in my personal Emacs config for a while.  It has commands and functions
useful for retrieving web page content and processing it into Org-mode
content.

For example, you can copy a URL to the clipboard or kill-ring, then run
a command that downloads the page, isolates the "readable" content with
eww-readable, converts it to Org-mode content with Pandoc, and displays
it in an Org-mode buffer.  Another command does all of that but inserts
it as an Org entry instead of displaying it in a new buffer.

So you can quickly and easily read a web page in an Org buffer, or
insert a page's content as an entry into an Org buffer.  You may also
find the support functions useful in building your own commands.

I haven't submitted it to MELPA yet; I'd like to get some feedback and
testing before doing that, so if any of these look useful to you, please
give it a test drive!

Here's a list of the commands and functions:

Commands

+  org-web-tools-insert-link-for-url: Insert an Org-mode link to the URL
in the clipboard or kill-ring.  Downloads the page to get the HTML
title.

+  org-web-tools-insert-web-page-as-entry: Insert the web page for the
URL in the clipboard or kill-ring as an Org-mode entry, as a sibling
heading of the current entry.

+  org-web-tools-read-url-as-org: Display the web page for the URL in
the clipboard or kill-ring as Org-mode text in a new buffer, processed
with eww-readable.

+ org-web-tools-convert-url-list-to-page-entries: With point on a list
of URLs in an Org-mode buffer, replace the list of URLs with a list of
Org headings, each containing the web page content of that URL,
converted to Org-mode text and processed with eww-readable.

Functions

+  org-web-tools--eww-readable: Return "readable" part of HTML with
title.

+  org-web-tools--get-url: Return content for URL as string.

+  org-web-tools--html-title: Return title of HTML page.

+  org-web-tools--html-to-org-with-pandoc: Return string of HTML
converted to Org with Pandoc.

+  org-web-tools--url-as-readable-org: Return string containing Org
entry of URLs web page content.  Content is processed with eww-readable
and Pandoc.  Entry will be a top-level heading, with article contents
below a second-level "Article" heading, and a timestamp in the
first-level entry for writing comments.

+  org-web-tools--demote-headings-below: Demote all headings in buffer
so the highest level is below LEVEL.

+  org-web-tools--get-first-url: Return URL in clipboard, or first URL
in the kill-ring, or nil if none.

+  org-web-tools--read-org-bracket-link: Return (TARGET . DESCRIPTION)
for Org bracket LINK or next link on current line.

+  org-web-tools--remove-dos-crlf: Remove all DOS CRLF (^M) in buffer.

Thanks,
Adam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ANN: org-web-tools
       [not found] <d6220956f0a848c495036c80fe0d3702@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-07-21 20:09 ` Eric S Fraga
  2017-07-22  0:33   ` Grant Rettke
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Eric S Fraga @ 2017-07-21 20:09 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]

On Friday, 21 Jul 2017 at 17:53, Adam Porter wrote:
> Hi friends,
>
> I've just uploaded a package containing some code that I've been using
> in my personal Emacs config for a while.  It has commands and functions
> useful for retrieving web page content and processing it into Org-mode
> content.

Sounds very useful.  Thanks.  Where have you uploaded this to?

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-573-g09e612

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ANN: org-web-tools
  2017-07-21 20:09 ` ANN: org-web-tools Eric S Fraga
@ 2017-07-22  0:33   ` Grant Rettke
       [not found]   ` <fed2d609f66a45e4af3d43eb9a8ce5e9@DB5PR01MB1895.eurprd01.prod.exchangelabs.com>
  2017-07-22 11:51   ` Adam Porter
  2 siblings, 0 replies; 6+ messages in thread
From: Grant Rettke @ 2017-07-22  0:33 UTC (permalink / raw)
  To: Eric S Fraga, emacs-orgmode@gnu.org

On Fri, Jul 21, 2017 at 3:09 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
> On Friday, 21 Jul 2017 at 17:53, Adam Porter wrote:
> > Hi friends,
> >
> > I've just uploaded a package containing some code that I've been using
> > in my personal Emacs config for a while.  It has commands and functions
> > useful for retrieving web page content and processing it into Org-mode
> > content.
>
> Sounds very useful.  Thanks.  Where have you uploaded this to?

https://github.com/alphapapa/org-web-tools

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ANN: org-web-tools
       [not found]   ` <fed2d609f66a45e4af3d43eb9a8ce5e9@DB5PR01MB1895.eurprd01.prod.exchangelabs.com>
@ 2017-07-22 10:15     ` Eric S Fraga
  2017-07-22 11:53       ` Adam Porter
  0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2017-07-22 10:15 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On Saturday, 22 Jul 2017 at 00:33, Grant Rettke wrote:
> https://github.com/alphapapa/org-web-tools

Thanks.  Installed it but realised I don't have pandoc on the system I'm
currently using.  Back later when I get a chance to try this!

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-573-g09e612

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ANN: org-web-tools
  2017-07-21 20:09 ` ANN: org-web-tools Eric S Fraga
  2017-07-22  0:33   ` Grant Rettke
       [not found]   ` <fed2d609f66a45e4af3d43eb9a8ce5e9@DB5PR01MB1895.eurprd01.prod.exchangelabs.com>
@ 2017-07-22 11:51   ` Adam Porter
  2 siblings, 0 replies; 6+ messages in thread
From: Adam Porter @ 2017-07-22 11:51 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Sounds very useful.  Thanks.  Where have you uploaded this to?

LOL, all that effort to be thorough in the description and I forgot the
URL.  Thanks to Grant for covering for me.  :)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ANN: org-web-tools
  2017-07-22 10:15     ` Eric S Fraga
@ 2017-07-22 11:53       ` Adam Porter
  0 siblings, 0 replies; 6+ messages in thread
From: Adam Porter @ 2017-07-22 11:53 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Saturday, 22 Jul 2017 at 00:33, Grant Rettke wrote:
>> https://github.com/alphapapa/org-web-tools
>
> Thanks.  Installed it but realised I don't have pandoc on the system I'm
> currently using.  Back later when I get a chance to try this!

Thanks, I would appreciate any feedback.  It's based on
org-protocol-capture-html and some code from my personal config.  I
figured it was about time to refactor and share it, so I'm sure it needs
more work.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-07-22 11:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <d6220956f0a848c495036c80fe0d3702@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-07-21 20:09 ` ANN: org-web-tools Eric S Fraga
2017-07-22  0:33   ` Grant Rettke
     [not found]   ` <fed2d609f66a45e4af3d43eb9a8ce5e9@DB5PR01MB1895.eurprd01.prod.exchangelabs.com>
2017-07-22 10:15     ` Eric S Fraga
2017-07-22 11:53       ` Adam Porter
2017-07-22 11:51   ` Adam Porter
2017-07-21 17:53 Adam Porter

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).