From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 5tzOLUMPvl/3HAAA0tVLHw (envelope-from ) for ; Wed, 25 Nov 2020 08:01:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4FakKUMPvl+0IAAA1q6Kng (envelope-from ) for ; Wed, 25 Nov 2020 08:01:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 22110940363 for ; Wed, 25 Nov 2020 07:18:59 +0000 (UTC) Received: from localhost ([::1]:34958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khp4q-00018Q-4X for larch@yhetil.org; Wed, 25 Nov 2020 02:18:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khp3B-00017m-48 for emacs-orgmode@gnu.org; Wed, 25 Nov 2020 02:17:13 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:46707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khp38-0006fe-Va for emacs-orgmode@gnu.org; Wed, 25 Nov 2020 02:17:12 -0500 Received: by mail-pg1-x541.google.com with SMTP id w4so1573228pgg.13 for ; Tue, 24 Nov 2020 23:17:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=ZS0lO/bHh4xthEEcqKqXlz1EKCsUjMrpnwC46Q8G7bU=; b=XAbnCvQGwaItdD/+l+RwZPRv1e1xiwhbNwomQOJToJZOMPOpB8RsrroVjvjLeaXnIi FhiW2VgXQY/TApyK1BhJyL0f8K6cjQ4iuqIipmtkeIHmIX4usxhPugXqKtQAAukoqnkp K5HL+XoTWS2wyTbZcqEvzwoSq7agyDC5H+enxWPMikvLA0mGhK178InTF3WitODn+XOi i0w6UWJ/Zrm1gQKdVH8zuJsEK7OYWyLqrLi7m39T7FqdkLvZYgXM64M0KPeoGrvY3H6K fN3O6ge+6xe1ZywBYszbPq8UzlnfjOF1KsLn1Wa25Sdbdg3vXRqILgkcuv8CMIjL8WSL R/1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=ZS0lO/bHh4xthEEcqKqXlz1EKCsUjMrpnwC46Q8G7bU=; b=EVDcqEdSy/BJsZgQKQAK/y05p06vDPdZEJKqGD//rG/uoyYjFyg9D0Yh+9Aak3Sb9F dNxknMPnzKGsjQaWBb7L7knUmeUN0xG8/IuzugMGlHlbTjZw6/nh8lrRrKj8RfaLRm7J MeIDUnX5J2GCxOr0KFgISxCjxqAN6dIzq1EmVYiDCnp5EMYJSRHq+2LQcXUCblSj97IH may2oG4ghNiTWlgBW3OmjrJ17/BH6zNRo70pP1MKGGzC2a0zDYV4na22SkfUat/4sClv yL3ruJJ9o4QBhZzknZwqQICt02o8so0Ykp4OHlDJV74UXwyAyDf68b7piCe+NT0izQCz ui3w== X-Gm-Message-State: AOAM532IMsonN9m0t5VPxvhs+NUjLTumqrKNTyWyaxdHBXFS3o/u/wh7 SvIW4gTFnEB4u2NhQ+z8fac= X-Google-Smtp-Source: ABdhPJyzmtllqvGOL6FHvuLcvUCaNB40ew5ZwJhw2ABzg3NAU/ZZzTyc5lcdGEcwyJidQMVeqVZqaA== X-Received: by 2002:a17:90b:19d2:: with SMTP id nm18mr2640079pjb.159.1606288629429; Tue, 24 Nov 2020 23:17:09 -0800 (PST) Received: from localhost ([23.27.206.160]) by smtp.gmail.com with ESMTPSA id z5sm1217469pgp.79.2020.11.24.23.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 23:17:07 -0800 (PST) From: Ihor Radchenko To: Jean Louis Subject: Re: Bring up a screen giving option to open a series of orgmode files In-Reply-To: References: <87eekkcwzs.fsf@localhost> <874klfcj5k.fsf@localhost> <87tutfaxgm.fsf@localhost> <87r1oiays5.fsf@localhost> Date: Wed, 25 Nov 2020 15:15:55 +0800 Message-ID: <87o8jlc3f8.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::541; envelope-from=yantar92@gmail.com; helo=mail-pg1-x541.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Berry, Charles" , Gerardo Moro , emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=XAbnCvQG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 0.59 X-TUID: ctFGdUTMZL0h > 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 writes: > * Ihor Radchenko [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?