emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bring up a screen giving option to open a series of orgmode files


From: Ihor Radchenko
Subject: Re: Bring up a screen giving option to open a series of orgmode files
Date: Wed, 25 Nov 2020 15:15:55 +0800

> Thank you Ihor. I know this all could be in the manual, and I read
> manuals all the time but never read it fully. Without these references
> I would not easily discover those useful functions.

Yeah. It is even worth re-reading manuals from time to time as you use
the corresponding tool. With growing experience, many initially
unnoticed features can be discovered and used efficiently.

>> I just listed the possibilities. I personally use qutebrowser where I
>> can directly call external scripts.
>
> While I did use qutebrowser many times, did not know about the
> scripts. Please state some examples how you call those external
> scripts. I am interested if:

- https://www.qutebrowser.org/doc/userscripts.html
- 
https://github.com/qutebrowser/experiments/blob/83c2e32bca05023026578ac9b64f7a5938772e9d/misc/userscripts/README.md

> - qutebrowser, once HTML is loaded or any file, can transmit this file
>   in a script to external program to parse it, collect meta data and
>   index it somewhere

.html version of the current page is always available to userscripts via
$QUTE_HTML variable.

I use it in my capture package:
https://github.com/yantar92/org-capture-ref#qute_integration

> - in particular I would be interested if qutebrowser could be used to
>   convert the HTML on the fly to OPML by using external script so to
>   get chunks finely grained such as paragraphs, headings of course are
>   included making HTML better outlined and structured for further
>   import into both Org files and yet private Hyperscope database.

Since you have access to the html file, you can pass it to any app in
your system. For example, you might convert the page to any other format
with pandoc or parse it with beautifulsoap in python. However, the file
will not contain the multimedia content - only bare html.

Best,
Ihor

Jean Louis <bugs@gnu.support> writes:

> * Ihor Radchenko <yantar92@gmail.com> [2020-11-25 06:43]:
>> > Now I hope that I can use org-capture to invoke other functions from
>> > external programs.
>> 
>> In general, you can define your own protocols. See
>> org-protocol-protocol-alist docstring for details how to define custom
>> protocols executing arbitrary elisp code.
>
> Thank you Ihor. I know this all could be in the manual, and I read
> manuals all the time but never read it fully. Without these references
> I would not easily discover those useful functions.
>
> When there is reference such as URL, I am actually following it and
> researching the subject. Few minutes research here and then are
> sparing me time on repetitive tasks in futures. 
>
>> > I would like to use org-capture to get data while invoking some
>> > Elisp, that I can capture into database. Do you think that is
>> > possible straight somehow?
>> >
>> > That capture does not go into Org but that I can redirect it to other
>> > elisp function?
>> 
>> You can add your own function to org-capture-prepare-finalize-hook and
>> do whatever you want with the captured text, like passing it to external
>> program. Once done, you can just call (org-capture-kill) to abort the
>> capture and not save the data to org.
>> 
>> > Chrome is no go here as I do not like getting tracked by Google. But
>> > it is similar extension
>> 
>> I just listed the possibilities. I personally use qutebrowser where I
>> can directly call external scripts.
>
> While I did use qutebrowser many times, did not know about the
> scripts. Please state some examples how you call those external
> scripts. I am interested if:
>
> - qutebrowser, once HTML is loaded or any file, can transmit this file
>   in a script to external program to parse it, collect meta data and
>   index it somewhere
>
> - in particular I would be interested if qutebrowser could be used to
>   convert the HTML on the fly to OPML by using external script so to
>   get chunks finely grained such as paragraphs, headings of course are
>   included making HTML better outlined and structured for further
>   import into both Org files and yet private Hyperscope database.
>
> You think that could work?
>
> Any examples how you use qutebrowser with external scripts?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]