diff options
author | Dante Catalfamo | 2021-01-14 01:33:59 -0500 |
---|---|---|
committer | Dante Catalfamo | 2021-01-14 01:33:59 -0500 |
commit | 544b2e00e24c8475a156dce1a1089fd5a3b58314 (patch) | |
tree | 7fdd2ab166cec57acaf9e9af30bfe406d15328a9 /content/posts/WIP-org-agenda-html | |
parent | f7948d4a22f4ef40274e07cdb2c8f8cfecbc92c8 (diff) | |
download | blog-544b2e00e24c8475a156dce1a1089fd5a3b58314.tar.gz blog-544b2e00e24c8475a156dce1a1089fd5a3b58314.tar.bz2 blog-544b2e00e24c8475a156dce1a1089fd5a3b58314.zip |
agenda-html: new url
Diffstat (limited to 'content/posts/WIP-org-agenda-html')
-rw-r--r-- | content/posts/WIP-org-agenda-html/cover.png | bin | 45555 -> 0 bytes | |||
-rw-r--r-- | content/posts/WIP-org-agenda-html/index.org | 89 |
2 files changed, 0 insertions, 89 deletions
diff --git a/content/posts/WIP-org-agenda-html/cover.png b/content/posts/WIP-org-agenda-html/cover.png Binary files differdeleted file mode 100644 index a72e034..0000000 --- a/content/posts/WIP-org-agenda-html/cover.png +++ /dev/null diff --git a/content/posts/WIP-org-agenda-html/index.org b/content/posts/WIP-org-agenda-html/index.org deleted file mode 100644 index 0da4472..0000000 --- a/content/posts/WIP-org-agenda-html/index.org +++ /dev/null @@ -1,89 +0,0 @@ -#+TITLE: Org Agenda As My New Tab Page -#+DATE: 2021-01-14T01:25:33-05:00 -#+DRAFT: false -#+DESCRIPTION: How to I keep an updated version of my org agenda as my new tab page -#+TAGS[]: emacs org-mode agenda -#+KEYWORDS[]: emacs org-mode agenda -#+SLUG: -#+SUMMARY: - -#+ATTR_HTML: :title An example output from agenda-html -#+ATTR_HTML: :alt An example output from agenda-html -[[file:cover.png]] - -I absolutely love [[https://orgmode.org/][org mode]]. I use it extensively almost every day to -keep track of tasks and due dates, both for my personal life and at -work. A lot of this workflow centres around the [[https://orgmode.org/features.html#agendas][org agenda]], which -compiles all the current and upcoming tasks and due dates from several -files into a single view. - -The only gripe I had with it was that I had to be within Emacs to use -it. This wasn't a deal breaker, but there were often times when I -wanted to check my agenda, but I wasn't already in Emacs. In those -cases I had to open Emacs and pull up the agenda. This felt a little -clunky for something I may check a dozen times every day. - -The solution I came up with was a way to automatically generate and -export an HTML version of my agenda every 15 minutes on my server. -That way I can serve it over HTTP and access it on all my devices. -They're also password protected so that strangers on the internet -can't access my data. - -The heart of this system is a small set of scripts I wrote called -[[https://github.com/dantecatalfamo/agenda-html][agenda-html]], which let you export a fully fontified view of the org -agenda to HTML without having to open Emacs in a terminal. This means -it can be easily scripted. - -My org mode files are synchronized between my machines using a -self-hosted [[https://nextcloud.com/][Nextcloud]] instance. This means that I have access to all -my up to date org documents on a remote machine, which will come in -handy very soon. - -To start setting things up, I first cloned [[https://github.com/dantecatalfamo/agenda-html][agenda-html]] onto the server -which hosts my Nextcloud. - -I edited =config.el= and set the location of the org files I wanted -included in the agenda. These files are located inside of the -Nextcloud storage directory. This would typically be somewhere like -=/var/www/nextcloud/data/<user>/files/Org=. I then set the output for -HTML to be =/var/www/html/agenda/agenda.html=, so that it is served by -=nginx=. - -To protect the =/agenda= path, I then put it behind basic auth. - -To do this I downloaded =apache2-utils= for the =htpasswd= tool and -used it to generate an =htpasswd= file at =/etc/nginx/htpasswd=. - -#+begin_src sh -htpasswd -c /etc/nginx/htpasswd <user> -#+end_src - -I then opened the site's nginx config file in my text editor and -added these lines. - -#+begin_src js -location /agenda { - auth_basic "Agenda Files"; - auth_basic_user_file /etc/nginx/htpasswd; -} -#+end_src - -Then I reloaded =nginx=. - -#+begin_src shell -nginx -s reload -#+end_src - - -Finally I edited root's crontab to run =agenda-html.sh= every 15 -minutes, using this line. - -#+begin_src -*/15 * * * * /root/agenda-html/agenda-html.sh -#+end_src - -Now every 15 minutes the latest version of my org files are pulled -from my Nextcloud storage and exported as an HTML file, which I can -view from any device. I'm also able to set as the new tab page in my -browser. I'm even able to check it from my phone, or any other device -that doesn't have Emacs installed. |