From: Maxim Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Bring up a screen giving option to open a series of orgmode files
Date: Wed, 2 Dec 2020 23:41:03 +0700 [thread overview]
Message-ID: <rq8g30$66u$1@ciao.gmane.io> (raw)
In-Reply-To: <X8U67ayDH3aem7es@protected.rcdrun.com>
2020-12-01 Jean Louis wrote:
> * Maxim Nikulin [2020-11-30 20:10]:
> To note is that not every PDF has text inside. They may be made from
> images.
Images do not necessary mean absence of text. Tesseract can generate PDF
files with text layer in addition to original scans.
> and prepares `capturexpdf.sh' to be executable and contains following:
>
> ,----
> | #!/bin/bash
> | capture="/home/data1/protected/xpdfcaptured.org"
> | entry=`zenity --entry`
> | hyperlink="[[$1:$2][$entry]]"
> | echo $hyperlink >> $capture
> `----
Personally I am considering something like (not ready to use, just quick
and dirty proof of concept)
------->8-----------
#!/bin/bash
set -e
set -o pipefail
getmeta() {
file="$1"
page="$2"
sel_x="${3:-0}"
sel_x="${sel_x%.*}"
sel_y="${4:-0}"
sel_y="${sel_y%.*}"
sel_X="${5:-0}"
sel_X="${sel_X%.*}"
sel_Y="${6:-0}"
sel_Y="${sel_Y%.*}"
url="${7:-}"
# FIXME obtain page height using pdfinfo
page_height=792
echo "[[${file}#page=${page}]]"
pdfinfo "$file" | sed -n -e
's/^\(CreationDate\|ModDate\|Author\|Title\|Subject\):\s*\([^ ]\)/- \1
:: \2/p'
if [ -n "$sel_Y" ] ; then
echo "#+begin_quote"
pdftotext -layout -f "$page" -l "$page" \
-x "$sel_x" -y "$((page_height - sel_Y))" -W "$((sel_X-sel_x))" -H
"$((sel_y-sel_Y))" "$file" - \
| sed -e 's/^[#*]/,&/' -e 's/\s*$//'
echo "#+end_quote"
fi
if [ -n "$url" ] ; then
echo -e "\n- Link: [[$url]]"
fi
}
if [ -z "$1" ] || [ -z "$2" ] ; then
echo "No file or page" 1>&2
exit 1
fi
# or emacsclient calling org-capture
getmeta "$@" | xsel -b
--------->8---------
Unfortunately Xpdf quite slow works with large raster images. Evince
better handles PDF files with wide spread problems (e.g. relying on
fonts that are not embedded into the document) or with text in non UTF-8
encodings.
>> Surprisingly PDF viewers built in into browser have fences
>> preventing access of browser extensions to the text content. I did
>> not expect such limitations.
>
> It does not sound as progress. Evince maybe originates from xpdf but
> does not have nearly these options as xpdf. We go back and become more
> beautiful with software but less useful.
Maybe it is possible to add necessary features to pdf.js and to serve
the viewer from purely static site (no authorization and no API endpoints).
>> And finally, running browser under a different user is likely not enough.
>> Browser for working with "external" resources should be isolated from home
>> or office network (network namespace, container, virtual machine). There are
>> enough web sites that checks which ports are open at least on the localhost.
>> Local network could be scanned through browser as well.
>
> I agree, only that it is not practical for majority of us. In my
> opinion browsing machines should be separate with few sensitive
> files if any.
https://stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/
https://gudok.xyz/lxcdeb/
> When I get
> mobile device in my hand it allows me to share pictures to email,
> chat, web server, to other file managers, and so on. Desktop operating
> systems are not so well integrated as mobile systems.
Desktop has a convenient keyboard and a mouse to allow *authoring*,
mobile devices are more limited in that sense, they are more suitable
for *sharing* content generated by others or "liking" it. On desktop one
could add a couple of valuable phrases in several seconds: why the item
to share is important for particular person at particular moment,
copy-paste is just a few more keystrokes.
next prev parent reply other threads:[~2020-12-02 16:49 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-22 10:01 Bring up a screen giving option to open a series of orgmode files Gerardo Moro
2020-11-22 10:09 ` Jean Louis
2020-11-22 17:35 ` Berry, Charles via General discussions about Org-mode.
2020-11-22 18:33 ` Jean Louis
2020-11-22 19:03 ` Gerardo Moro
2020-11-22 19:15 ` Jean Louis
2020-11-23 3:59 ` Gerardo Moro
2020-11-23 5:21 ` Jean Louis
2020-11-23 8:12 ` Ihor Radchenko
2020-11-23 8:40 ` Gerardo Moro
2020-11-23 9:11 ` Ihor Radchenko
2020-11-23 9:14 ` Gerardo Moro
2020-11-23 9:14 ` Jean Louis
2020-11-24 4:07 ` Gerardo Moro
2020-11-24 7:26 ` Ihor Radchenko
2020-11-24 7:23 ` Ihor Radchenko
2020-11-24 9:28 ` Gerardo Moro
2020-11-24 9:57 ` Ihor Radchenko
2020-11-24 16:26 ` Jean Louis
2020-11-25 3:41 ` Ihor Radchenko
2020-11-25 5:36 ` Jean Louis
2020-11-25 7:15 ` Ihor Radchenko
2020-11-25 11:20 ` Browser org-capture bookmarklet Jean Louis
2020-11-25 12:51 ` Ihor Radchenko
2020-11-25 14:12 ` Jean Louis
2020-11-25 14:50 ` Jean Louis
2020-12-02 9:07 ` Bring up a screen giving option to open a series of orgmode files Jean Louis
2020-12-02 9:53 ` Ihor Radchenko
2020-12-02 10:19 ` Jean Louis
2020-12-02 9:24 ` Jean Louis
2020-12-02 9:56 ` Ihor Radchenko
2020-12-02 10:14 ` Jean Louis
2020-11-24 17:41 ` Jean Louis
2020-12-02 10:17 ` Maxim Nikulin
2020-11-27 2:40 ` Jean Louis
2020-11-27 8:15 ` Alan Schmitt
2020-11-27 12:04 ` Jean Louis
2020-11-28 16:12 ` Maxim Nikulin
2020-11-28 18:10 ` Jean Louis
2020-11-28 15:51 ` Maxim Nikulin
2020-11-28 17:59 ` Jean Louis
2020-11-30 9:35 ` Ihor Radchenko
2020-11-30 10:45 ` Jean Louis
2020-12-01 2:38 ` Ihor Radchenko
2020-12-01 10:30 ` Jean Louis
2020-11-30 17:08 ` Maxim Nikulin
2020-11-30 18:33 ` Jean Louis
2020-12-02 16:41 ` Maxim Nikulin [this message]
2020-12-02 17:24 ` Jean Louis
2020-12-09 13:00 ` Jean Louis
2020-12-09 15:03 ` Maxim Nikulin
2020-12-09 16:32 ` Jean Louis
2020-12-09 16:49 ` Maxim Nikulin
2020-12-10 0:04 ` Ihor Radchenko
2020-12-11 6:54 ` Jean Louis
2020-12-11 14:40 ` Maxim Nikulin
2020-12-11 15:22 ` Ihor Radchenko
2020-12-12 3:22 ` Jean Louis
2020-12-13 0:42 ` Ihor Radchenko
2020-12-13 15:00 ` Jean Louis
2020-12-14 12:58 ` Ihor Radchenko
2020-12-14 19:08 ` Jean Louis
2020-12-14 22:27 ` TRS-80
2020-12-14 22:33 ` Jean Louis
2020-12-15 4:42 ` Ihor Radchenko
2020-12-15 5:00 ` Jean Louis
2020-12-16 2:59 ` Ihor Radchenko
2020-12-16 4:05 ` Tom Gillespie
2020-12-18 12:35 ` Jean Louis
2020-12-16 1:48 ` TRS-80
2020-12-16 12:40 ` Maxim Nikulin
2020-12-12 2:49 ` Jean Louis
2020-12-13 0:48 ` Ihor Radchenko
2020-12-13 15:13 ` Jean Louis
2020-12-13 18:02 ` Christopher Dimech
2020-12-13 20:31 ` Jean Louis
2020-12-14 0:34 ` Ihor Radchenko
2020-12-14 0:34 ` Jean Louis
2020-12-14 0:35 ` Ihor Radchenko
[not found] ` <874kl7172r.fsf@localhost>
2020-11-30 10:51 ` Jean Louis
2020-11-22 21:23 ` Berry, Charles via General discussions about Org-mode.
2020-11-23 9:52 ` Diego Zamboni
2020-11-23 21:04 ` Jean Louis
2020-11-24 9:53 ` John Sturdy
2020-11-24 10:04 ` Detlef Steuer
2020-11-24 13:44 ` Jean Louis
2020-11-24 14:38 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='rq8g30$66u$1@ciao.gmane.io' \
--to=manikulin@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).