Compare commits

...

233 Commits

Author SHA1 Message Date
Ryan Rix 9bf6a6b78a Add published posts 2019-12-07 16:07:18 -08:00
Ryan Rix 83e93e87f6 Some refilling of paragraphs, and other cleanup 2019-12-07 15:59:28 -08:00
Ryan Rix 62e3252e7d these don't need to live forever. 2019-12-07 15:59:08 -08:00
Ryan Rix f72d2a1c63 Make sure Nextcloud URLs will be made in images in org html exports 2019-12-07 15:40:28 -08:00
Ryan Rix bfb0064fdc Add function to send webmentions based on URLs in post 2019-12-07 15:40:12 -08:00
Ryan Rix a8ed788688 Clean up arcology.el 2019-12-07 15:39:51 -08:00
Ryan Rix 79bba80514 Add default content to check-ins 2019-10-14 14:12:21 -07:00
Ryan Rix 692fabc431 Add [`arcology-send-web-mentions-for-post`] 2019-10-14 14:11:52 -07:00
Ryan Rix a7f60c9092 Synchronized attachments 2019-10-02 17:14:08 -07:00
Ryan Rix 8445a30522 Add [`arcology-web-mention']
given a source and a target, will send a webmention to the target's webmention handler
2019-10-01 21:07:09 -07:00
Ryan Rix 9f258244cd Set the templates to use nginx proxying for the RSS feed. 2019-10-01 21:06:54 -07:00
Ryan Rix b349fcac81 Synchronized attachments 2019-09-12 21:49:37 -07:00
Ryan Rix 64ff81f0de Synchronized attachments 2019-09-12 21:39:29 -07:00
Ryan Rix 14e271e4aa Synchronized attachments 2019-09-12 21:37:41 -07:00
Ryan a306132c6c Fix bug in re-reading the key file when it's already open
This made debugging the publisher very difficult
2019-08-25 12:02:42 -07:00
Ryan d1b3e10067 Just use a let* instead of a let 2019-08-25 12:02:30 -07:00
Ryan 3ca55a64cd Prevent publishing NOEXPORT entries 2019-08-25 12:02:01 -07:00
Ryan 446a29bca4 Always copy the static files in to the site-root 2019-08-25 12:01:40 -07:00
Ryan 9c051ae41d Attempt to make Arcology re-syndicate for failed attempts wihtout having to delete the prop block 2019-08-25 12:01:15 -07:00
Ryan 1ef268e785 Make webmentions work over HTTPs to prevent cross-site security blocking 2019-08-25 12:00:00 -07:00
Ryan 6dfc4badd3 Update templates and CSS
- Trying to get bridgy-fed working
- Updating my bio elements
- clean up some invalid html
2019-08-25 11:59:28 -07:00
Ryan Rix c68b6db04d Update arcology 2019-02-10 00:55:23 -08:00
Ryan Rix 4ae89bcea9 Unfinished work to get site working with fed.brid.gy 2019-01-14 17:39:01 -08:00
Ryan Rix f6b682f480 Update index 2019-01-14 17:38:42 -08:00
Ryan Rix 77305683d7 Update footer 2019-01-14 17:37:40 -08:00
Ryan Rix 485e401aaf Don't refer to fully qualified paths in the default values used 2019-01-14 17:36:24 -08:00
Ryan 6f375ac293 Synchronized attachments 2018-08-27 03:34:08 +00:00
Ryan 7d6e5fd388 Synchronized attachments 2018-08-27 03:33:51 +00:00
Ryan dff6d132d0 Synchronized attachments 2018-08-27 03:33:42 +00:00
Ryan 7519600e40 Synchronized attachments 2018-08-27 03:33:30 +00:00
Ryan 8b834415a4 Synchronized attachments 2018-08-27 03:33:22 +00:00
Ryan 3df7e5f837 Synchronized attachments 2018-08-27 03:33:01 +00:00
Ryan 23e70462e5 Synchronized attachments 2018-08-27 03:32:52 +00:00
Ryan ff8f564896 Synchronized attachments 2018-08-27 03:32:43 +00:00
Ryan 993c597db0 Synchronized attachments 2018-08-27 03:32:32 +00:00
Ryan 9061b8f5f0 Synchronized attachments 2018-08-27 03:32:17 +00:00
Ryan b306e29951 Synchronized attachments 2018-08-27 03:32:03 +00:00
Ryan 343026623e Synchronized attachments 2018-08-27 03:31:54 +00:00
Ryan a1598e4eaa Synchronized attachments 2018-08-27 03:31:46 +00:00
Ryan 8d445281f2 Synchronized attachments 2018-08-27 03:31:36 +00:00
Ryan 23fa987582 Synchronized attachments 2018-08-27 03:31:19 +00:00
Ryan f6def25c2c Synchronized attachments 2018-08-27 03:31:09 +00:00
Ryan 0337565333 Synchronized attachments 2018-08-27 03:30:49 +00:00
Ryan 9c74c6a520 Synchronized attachments 2018-08-27 03:30:30 +00:00
Ryan d67d7a1cef Synchronized attachments 2018-08-27 03:30:22 +00:00
Ryan bfa8cf64d2 Synchronized attachments 2018-08-27 03:30:15 +00:00
Ryan a38866b369 Synchronized attachments 2018-08-27 03:30:06 +00:00
Ryan a6d241eab4 Synchronized attachments 2018-08-27 03:29:51 +00:00
Ryan 89b47bb3cf Synchronized attachments 2018-08-27 03:29:32 +00:00
Ryan 5c742cdec7 Synchronized attachments 2018-08-27 03:28:20 +00:00
Ryan 002c56acf0 Synchronized attachments 2018-08-27 03:28:13 +00:00
Ryan 34dfd2cf92 Synchronized attachments 2018-08-27 03:27:57 +00:00
Ryan e1cd7a1257 Synchronized attachments 2018-08-27 03:27:47 +00:00
Ryan c18f079409 Synchronized attachments 2018-08-27 03:27:08 +00:00
Ryan c56ba35253 Synchronized attachments 2018-08-27 03:26:46 +00:00
Ryan f43f231973 Synchronized attachments 2018-08-27 03:26:31 +00:00
Ryan 96ef0baac7 Synchronized attachments 2018-08-27 03:25:45 +00:00
Ryan 9b9859bcb4 Synchronized attachments 2018-08-27 03:25:29 +00:00
Ryan b468a7a1ae Synchronized attachments 2018-08-27 03:25:10 +00:00
Ryan 1e903c01b3 Synchronized attachments 2018-08-27 03:24:44 +00:00
Ryan 0a02675076 Synchronized attachments 2018-08-27 03:24:21 +00:00
Ryan e2c7dbea2f Synchronized attachments 2018-08-27 03:23:55 +00:00
Ryan Rix 5605e5ea25 Synchronized attachments 2017-08-08 21:43:11 -07:00
Ryan Rix fe18114158 Synchronized attachments 2017-08-08 21:42:52 -07:00
Ryan Rix ac2f0c556f Synchronized attachments 2017-08-08 21:42:42 -07:00
Ryan Rix 3aa90a1c80 Sort webmentions by datetime rather than API return order 2017-07-14 17:09:55 -07:00
Ryan Rix a4229be855 parinfer-indent compat 2017-07-14 10:53:07 -07:00
Ryan Rix 53388a3c4f Add ability to suppress publishing with entry-at-point
This lets me batch my entries a bit better since there's enough files in Arcology that skipping
unmodified files takes a fair bit of time.
2017-07-14 10:52:28 -07:00
Ryan Rix 241ed943cd Fix URL in posts, so that the webmention URLs work 2017-07-14 10:51:43 -07:00
Ryan Rix 257f5f0e87 Big old blorg 2017-07-14 10:51:31 -07:00
Ryan Rix 928f68dd73 Synchronized attachments 2017-07-14 10:17:46 -07:00
Ryan Rix 3389a49ad1 Synchronized attachments 2017-07-14 10:17:31 -07:00
Ryan Rix 844b6d39db Synchronized attachments 2017-07-14 10:16:36 -07:00
Ryan Rix 1376f37873 Synchronized attachments 2017-07-14 10:15:58 -07:00
Ryan Rix 7d65721306 Synchronized attachments 2017-07-14 10:15:08 -07:00
Ryan Rix b1319ebafb Synchronized attachments 2017-07-10 15:13:47 -05:00
Ryan Rix 934ce8b8f0 Synchronized attachments 2017-07-10 15:13:35 -05:00
Ryan Rix 1eec67700d Synchronized attachments 2017-07-10 15:13:23 -05:00
Ryan Rix 1b5b0f1106 Synchronized attachments 2017-07-10 15:13:14 -05:00
Ryan Rix 2ac6dfdecb Synchronized attachments 2017-07-08 23:08:46 -05:00
Ryan Rix 5317cd2bff Synchronized attachments 2017-07-08 23:08:37 -05:00
Ryan Rix e21f86e456 Synchronized attachments 2017-07-08 23:08:26 -05:00
Ryan Rix 27781ca151 Synchronized attachments 2017-07-08 23:08:02 -05:00
Ryan Rix 9d04127b13 Synchronized attachments 2017-07-08 23:07:38 -05:00
Ryan Rix f51bf5db87 Synchronized attachments 2017-07-08 23:06:28 -05:00
Ryan Rix a61b1924b9 Synchronized attachments 2017-07-08 23:06:13 -05:00
Ryan Rix e63d416e6e Synchronized attachments 2017-07-08 23:05:55 -05:00
Ryan Rix 1f83e5ed63 Synchronized attachments 2017-07-08 23:05:45 -05:00
Ryan Rix ef8c46c7d3 Synchronized attachments 2017-07-08 23:00:25 -05:00
Ryan Rix 665d48ee27 Synchronized attachments 2017-07-07 21:24:37 -05:00
Ryan Rix 51673fc671 Synchronized attachments 2017-07-06 22:51:08 -05:00
Ryan Rix dc1eee25f9 Synchronized attachments 2017-07-06 22:47:09 -05:00
Ryan Rix 22d9bbd4e5 Synchronized attachments 2017-07-06 22:42:55 -05:00
Ryan Rix 2a55dad58d Synchronized attachments 2017-07-06 22:38:55 -05:00
Ryan Rix f75a4bd905 Synchronized attachments 2017-07-06 22:36:35 -05:00
Ryan Rix e8986839ea Synchronized attachments 2017-07-06 22:34:25 -05:00
Ryan Rix cb43f75883 Synchronized attachments 2017-07-06 22:31:08 -05:00
Ryan Rix 636194593b Synchronized attachments 2017-07-06 22:21:53 -05:00
Ryan Rix c09a4f9849 Synchronized attachments 2017-07-06 22:12:55 -05:00
Ryan Rix e6230b0b79 Synchronized attachments 2017-07-06 22:05:34 -05:00
Ryan Rix c5301c126d Splat. 2017-07-02 21:24:44 -05:00
Ryan Rix 975101e141 Synchronized attachments 2016-11-06 19:57:55 -08:00
Ryan Rix b64d1ba7ca Synchronized attachments 2016-11-06 19:57:45 -08:00
Ryan Rix 9d2295972a Synchronized attachments 2016-11-06 19:57:34 -08:00
Ryan Rix d5e35ab517 Synchronized attachments 2016-11-06 19:57:23 -08:00
Ryan Rix fd2bb5cd3b Synchronized attachments 2016-11-06 19:57:06 -08:00
Ryan Rix 01ba1ed387 Synchronized attachments 2016-11-06 19:56:58 -08:00
Ryan Rix aeee923441 Synchronized attachments 2016-11-06 19:56:48 -08:00
Ryan Rix 837eab663e Synchronized attachments 2016-11-06 19:56:43 -08:00
Ryan Rix 23510dca88 Synchronized attachments 2016-11-06 19:56:36 -08:00
Ryan Rix 82561ccd40 Synchronized attachments 2016-11-06 19:56:21 -08:00
Ryan Rix c87125ee6c Synchronized attachments 2016-11-06 19:56:14 -08:00
Ryan Rix 43fbee53f7 Synchronized attachments 2016-11-06 19:56:11 -08:00
Ryan Rix 82c14b76a1 Synchronized attachments 2016-11-06 19:55:59 -08:00
Ryan Rix 99d26654a4 Synchronized attachments 2016-11-06 19:55:46 -08:00
Ryan Rix 67d2437959 Synchronized attachments 2016-11-06 19:54:06 -08:00
Ryan Rix 32febccf0e Synchronized attachments 2016-11-06 19:53:01 -08:00
Ryan Rix 686c11a3db Synchronized attachments 2016-11-06 19:52:06 -08:00
Ryan Rix da079319f7 Synchronized attachments 2016-10-07 22:23:21 -07:00
Ryan Rix 2a2d79209d Synchronized attachments 2016-09-04 16:38:43 -07:00
Ryan Rix aef184506f Synchronized attachments 2016-09-04 15:51:07 -07:00
Ryan Rix 5d4f9d5b4e Synchronized attachments 2016-09-04 15:51:06 -07:00
Ryan Rix 35fd967c88 Synchronized attachments 2016-09-04 15:51:06 -07:00
Ryan Rix 00b1933a5b Synchronized attachments 2016-09-04 15:51:05 -07:00
Ryan Rix 00a9dd6166 Synchronized attachments 2016-09-04 15:51:05 -07:00
Ryan Rix 198593eaa6 Synchronized attachments 2016-09-04 15:51:04 -07:00
Ryan Rix 85d36ec4d4 Synchronized attachments 2016-09-04 15:51:04 -07:00
Ryan Rix 40ecf5f78b Synchronized attachments 2016-09-04 15:51:03 -07:00
Ryan Rix 3a31c320fa Synchronized attachments 2016-09-04 15:51:03 -07:00
Ryan Rix aef8ddf91e Synchronized attachments 2016-09-04 15:51:02 -07:00
Ryan Rix 7e074c11d1 Synchronized attachments 2016-09-04 15:51:01 -07:00
Ryan Rix 93d5ced802 Synchronized attachments 2016-09-04 15:51:01 -07:00
Ryan Rix e87c2b4785 Synchronized attachments 2016-09-04 15:51:00 -07:00
Ryan Rix 519c0aad63 Synchronized attachments 2016-09-04 15:51:00 -07:00
Ryan Rix 7f3c6222a0 Synchronized attachments 2016-09-04 15:50:59 -07:00
Ryan Rix d1c31d4c1c Synchronized attachments 2016-09-04 15:50:58 -07:00
Ryan Rix 421f2fd1cb Synchronized attachments 2016-09-04 15:50:57 -07:00
Ryan Rix 5e41896242 Synchronized attachments 2016-09-04 15:50:57 -07:00
Ryan Rix 4115c8612a Synchronized attachments 2016-09-04 15:50:56 -07:00
Ryan Rix 18ce36ae40 Synchronized attachments 2016-09-04 15:50:49 -07:00
Ryan Rix 9f328519b1 Synchronized attachments 2016-09-02 14:20:13 +00:00
Ryan Rix 8cb48158e8 Synchronized attachments 2016-07-29 19:41:33 -07:00
Ryan Rix a8751fa84a Synchronized attachments 2016-07-29 19:41:05 -07:00
Ryan Rix 334257e269 Nice index, update footer rel=me 2016-07-01 09:17:29 -07:00
Ryan Rix 4aab9070fa WOMP. 2016-07-01 09:17:03 -07:00
Ryan Rix 8d05078d7e Clean up CSS 2016-07-01 09:16:55 -07:00
Ryan Rix 42945938e2 Splat. 2016-06-13 07:00:46 +00:00
Ryan Rix 90c6ed1008 Synchronized attachments 2016-06-08 21:25:17 +00:00
Ryan Rix a4b84eeae6 Synchronized attachments 2016-06-08 21:24:49 +00:00
Ryan Rix 47a10d8272 Synchronized attachments 2016-06-08 21:19:56 +00:00
Ryan Rix bc5fe4abb9 Synchronized attachments 2016-06-08 21:14:08 +00:00
Ryan Rix 070acea34e Synchronized attachments 2016-06-08 21:00:08 +00:00
Ryan Rix 4e20454e5a Synchronized attachments 2016-06-08 18:52:33 +00:00
Ryan Rix ac53bc3301 Synchronized attachments 2016-06-08 16:53:55 +00:00
Ryan Rix 90a3bbee96 Synchronized attachments 2016-06-08 16:32:21 +00:00
Ryan Rix 8681ba2870 Add review link to the indices 2016-05-19 01:37:04 +00:00
Ryan Rix 52b9ad5e75 Autoload 2016-05-19 01:35:03 +00:00
Ryan Rix 60e1920c0a Add review fonticon 2016-05-19 01:34:56 +00:00
Ryan Rix d0e89041eb Update index 2016-05-16 08:13:15 +00:00
Ryan Rix dbadd2da80 Bunch of shit I'm too lazy to separate
- post types
  - step
  - video
  - review
  - rsvp
  - Like/reply
2016-05-16 08:11:44 +00:00
Ryan Rix 5665c1cf5b Synchronized attachments 2016-05-16 07:31:52 +00:00
Ryan Rix 2235d2a957 Synchronized attachments 2016-05-16 07:31:44 +00:00
Ryan Rix 942e461ba4 Synchronized attachments 2016-05-16 07:31:41 +00:00
Ryan Rix 23f1639e30 Synchronized attachments 2016-05-05 05:56:31 +00:00
Ryan Rix 191c0ad0ca Synchronized attachments 2016-05-05 05:56:21 +00:00
Ryan Rix c4274768c9 Synchronized attachments 2016-05-02 22:13:48 +00:00
Ryan Rix b9d87d00c8 Synchronized attachments 2016-04-25 14:18:21 +00:00
Ryan Rix 26527ee0a8 Synchronized attachments 2016-04-25 00:19:16 +00:00
Ryan Rix ed58ea47c9 Synchronized attachments 2016-04-23 01:20:47 +00:00
Ryan Rix f567ac75fa Update org 2016-04-22 08:21:56 +00:00
Ryan Rix 793a75d409 Fix some grossness in webmention rendering 2016-04-22 08:21:56 +00:00
Ryan Rix 4f8a546dd9 Style work 2016-04-22 08:21:56 +00:00
Ryan Rix 8adbd81a45 *shrug* 2016-04-22 08:21:56 +00:00
Ryan Rix 8c5908ba8f Optionally disable certain syndication routes 2016-04-22 08:21:56 +00:00
Ryan Rix 94a482776a *shrug* 2016-04-22 08:21:56 +00:00
Ryan Rix bab7df0cb0 Trying to do a big perf refactor
I'm going to have to redo how modified entries are generated, this is
going to get really slow as the thing grows. I added the ability to
publish a single entry which helps a LOT.
2016-04-22 08:21:56 +00:00
Ryan Rix 12ad1a1717 Add likes 2016-04-22 08:21:56 +00:00
Ryan Rix ef00f735d0 Add custom reply template 2016-04-22 08:15:33 +00:00
Ryan Rix e916e313eb SPLAT 2016-04-22 03:39:00 +00:00
Ryan Rix 72f4484d4b Shrug 2016-04-22 03:36:25 +00:00
Ryan Rix a485b1a776 Feh. 2016-04-22 03:36:14 +00:00
Ryan Rix aa4439ca62 Update index 2016-04-21 01:54:18 +00:00
Ryan Rix 2d2ba67190 Add reply support 2016-04-21 01:54:02 +00:00
Ryan Rix b77bd2a4ee SPLAT. 2016-04-21 01:53:53 +00:00
Ryan Rix 9c594d3b13 Synchronized attachments 2016-04-20 00:19:20 +00:00
Ryan Rix 8e47971ed1 Synchronized attachments 2016-04-20 00:19:18 +00:00
Ryan Rix 50951203e0 Synchronized attachments 2016-04-20 00:19:16 +00:00
Ryan Rix c0b5f88abe Synchronized attachments 2016-04-20 00:19:13 +00:00
Ryan Rix 03c6a0b1c7 Synchronized attachments 2016-04-20 00:19:10 +00:00
Ryan Rix c23585e26a Port mfblog's syndicate to Arcology 2016-04-18 03:30:07 +00:00
Ryan Rix f4028cf54c Add support for Jams 2016-04-18 03:25:43 +00:00
Ryan Rix ef203e62a4 Set property when checkin lookup called interactively 2016-04-18 03:25:03 +00:00
Ryan Rix 25ad16770a Synchronized attachments 2016-04-16 06:30:18 +00:00
Ryan Rix d2e742e906 Synchronized attachments 2016-04-16 00:50:55 +00:00
Ryan Rix 5bb7b3bd1e Synchronized attachments 2016-04-15 21:20:10 +00:00
Ryan Rix 8fafee51eb Synchronized attachments 2016-04-15 21:20:05 +00:00
Ryan Rix 49013beb88 Synchronized attachments 2016-04-15 21:19:58 +00:00
Ryan Rix f3374c9150 Synchronized attachments 2016-04-15 20:58:01 +00:00
Ryan Rix f1dc51c2ce It works??? PUBLISHING AND ALL 2016-04-15 19:33:16 +00:00
Ryan Rix 480babb7d5 Add checkin support, and individual indices 2016-04-15 01:17:23 +00:00
Ryan Rix 2a85fe4cdb Add index 2016-04-14 00:24:21 +00:00
Ryan Rix 6e3b0f1c9a Synchronized attachments 2016-04-13 21:28:04 +00:00
Ryan Rix 21da705292 Add photo support to arcology
I think we're at feature parity, minus RSS et al.
2016-04-12 22:57:15 +00:00
Ryan Rix ad11577aed POSTS 2016-04-12 19:31:41 +00:00
Ryan Rix 85509dd139 We can publish notes! 2016-04-12 19:25:53 +00:00
Ryan Rix 4f7be3c51e Cache the length of an article's text
Use this to switch between article and note
2016-04-11 23:45:21 +00:00
Ryan Rix 4c64528f00 Optional cache-use 2016-04-11 23:44:25 +00:00
Ryan Rix 7d9d19132f Cache entries, and check the cache
need some sort of cache invalidation setup now... woops.
2016-03-27 07:44:42 +00:00
Ryan Rix 194a2da4d7 New blog 2016-03-27 07:27:22 +00:00
Ryan Rix 06608287c0 Beginning work on Arcology
This will function as v2 of my blog generator and will subsume the old
org-page blog by allowing a user to import headings from anywhere and
generate entries from arbitrary headlines, with microformat-annotated
entries for various indieweb post types
2016-03-27 07:26:01 +00:00
Ryan Rix b42946d842 Synchronized attachments 2016-03-27 04:28:10 +00:00
Ryan Rix 4171bb489c SPLAT. 2016-03-26 06:01:07 +00:00
Ryan Rix 39a1c3be99 Synchronized attachments 2016-03-04 05:31:20 +00:00
Ryan Rix 5abcc4b6d3 Synchronized attachments 2016-03-04 05:26:15 +00:00
Ryan Rix dfa5766051 Synchronized attachments 2016-03-04 05:26:05 +00:00
Ryan Rix 6a95ffc57b Synchronized attachments 2016-03-04 05:26:01 +00:00
Ryan Rix a131eb93df Synchronized attachments 2016-03-04 05:24:30 +00:00
Ryan Rix 2799e13d24 Synchronized attachments 2016-03-04 05:24:27 +00:00
Ryan Rix dc65dca5df Synchronized attachments 2016-03-04 05:24:22 +00:00
Ryan Rix c98926ea1d Synchronized attachments 2016-03-04 05:14:08 +00:00
Ryan Rix 70658a43a9 Synchronized attachments 2016-03-04 05:14:04 +00:00
Ryan Rix 002e448350 Synchronized attachments 2016-03-04 05:13:05 +00:00
Ryan Rix a217adb024 Synchronized attachments 2016-03-04 05:13:01 +00:00
Ryan Rix fc1a82a9fe Synchronized attachments 2016-03-04 05:03:22 +00:00
Ryan Rix 71d9066cc9 Synchronized attachments 2016-03-04 05:03:16 +00:00
Ryan Rix 259bd02958 Synchronized attachments 2016-03-04 05:03:11 +00:00
Ryan Rix b5abad2320 Synchronized attachments 2016-03-04 04:52:52 +00:00
Ryan Rix 466eca58e6 Synchronized attachments 2016-02-23 19:32:37 +00:00
Ryan Rix d76cf7b037 Synchronized attachments 2016-01-24 23:12:50 -08:00
Ryan Rix 9eb97f0702 Synchronized attachments 2016-01-04 00:25:51 -08:00
Ryan Rix 90b98e6fdc Synchronized attachments 2016-01-04 03:28:37 +00:00
Ryan Rix 92d86d7448 Synchronized attachments 2016-01-04 03:28:11 +00:00
Ryan Rix 86879b7598 Add license, readme, and the blog itself 2016-01-04 03:06:53 +00:00
45 changed files with 3129 additions and 127 deletions

675
LICENSE Normal file
View File

@ -0,0 +1,675 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

6
README.org Normal file
View File

@ -0,0 +1,6 @@
* mfblog.el: Microformats2-compatible notes site generator
Generate an [[http://indiewebcamp.com][IndieWebCamp]] compatible blog using a single org-mode page. I use this, it might work for
you, but probably not.
I am releasing this as GPLv3+ in case it is useful to someone else.

171
arcology-checkin.el Normal file
View File

@ -0,0 +1,171 @@
;;; arcology-checkin.el --- Checkin support for arcology
;; Copyright (C) 2016 Ryan Rix
;; Author: Ryan Rix <ryan@whatthefuck.computer>
;; Version: 0.1
;; Package-Requires: ((json "0.1") (org "8.0"))
;; Keywords: web
;; URL: http://notes.whatthefuck.computer/
;;; Commentary:
;; This package generates a small blog from org-mode files, leveraging Microformats to provide
;; semantic information about the posts; you can use this information to automate sharing,
;; linkbacks, embedding images in 3rd party silso, and more; see http://indiewebcamp.com and
;; http://microformats.org for more information.
;; This package can be used by configuring the various variables and then calling [`arcology']
;; which will publish the blog index, an RSS feed and URLs for each entry. You can then have Brid.gy
;; automatically syndicate the content to silos by calling [`arcology-syndicate-entry-at-point'].
;; From Wikipedia:
;; Arcology, a portmanteau of "architecture" and "ecology", is a vision of architectural design
;; principles for very densely populated habitats. The concept has been primarily popularized, and
;; the term itself coined, by architect Paolo Soleri. It also appears in science fiction. These
;; structures have been largely hypothetical insofar as no 'arcology' envisioned by Soleri himself
;; has yet been completed, but he posited that a completed arcology would provide space for a
;; variety of residential, commercial, and agricultural facilities while minimizing individual human
;; environmental impact. Arcologies are often portrayed in sci-fi as self-contained or economically
;; self-sufficient.
;; Arcology aims to be a self-sufficient blogging platform, where you can leverage the work that
;; IndieWeb actors have done to build a self-sufficient site with the full support of "social media"
;; type offerings like comments, reposts, checkins, all running under your own domain and backed by
;; plain text that you can control yourself or generate using simple scripts or Memacs
;;; Code:
;;;###autoload
(defgroup arcology-checkin nil
"Checkin support for Arcology."
:group 'arcology)
;;;###autoload
(defcustom arcology-checkin-foursquare-client-id ""
"Foursquare app client ID.
Register an app at https://foursquare.com/developers/apps."
:group 'arcology-checkin)
;;;###autoload
(defcustom arcology-checkin-foursquare-client-secret ""
"Foursquare app client secret.
Register an app at https://foursquare.com/developers/apps."
:group 'arcology-checkin)
;;;###autoload
(defcustom arcology-checkin-cache-location "~/.emacs.d/arcology-venue-data/"
"Directory to put arcology venue cache."
:group 'arcology-checkin)
;;;###autoload
(defcustom arcology-checkin-template-file "/home/rrix/Projects/notes/templates/default.html"
"Template file to use for notes"
:group 'arcology-checkin)
(defun arcology-add-checkin-content (entry)
"Generate checkin venue information, along with checkin note."
(let ((properties (plist-get entry :properties)))
(when (not (arcology-alist-get "CHECKIN-VENUE-ID" properties))
(with-current-buffer (plist-get entry :buffer)
(display-buffer (current-buffer))
(goto-char (plist-get entry :point))
(call-interactively 'arcology-checkin-get-venue-id)))
(let* ((checkin-venue-id (arcology-alist-get "CHECKIN-VENUE-ID" properties))
(venue (arcology-checkin-venue-cached checkin-venue-id))
(image-str (arcology-add-image-content entry)))
(with-temp-buffer
;; Render venue information
(insert image-str)
(insert "<div class=\"p-location h-card arcology-venue\">"
"Posted at "
"<a class=\"u-url p-name\" href=\"https://foursquare.com/v/" (arcology-alist-get 'id venue) "\">"
(arcology-alist-get 'name venue)
"</a> on "
"<span class=\"p-street-address\">"
(or (arcology-alist-get 'address (arcology-alist-get 'location venue)) "")
"</span> in "
"<span class=\"p-locality\">"
(or (arcology-alist-get 'city (arcology-alist-get 'location venue)) "")
"</span>, "
"<span class=\"p-region\">"
(or (arcology-alist-get 'state (arcology-alist-get 'location venue)) "")
"</span> "
"<span class=\"p-country-name\">"
(or (arcology-alist-get 'country (arcology-alist-get 'location venue)) "")
"</span>"
"</div>")
(buffer-string)))))
(defun arcology-checkin-venue-cached (id)
(let ((filename (concat arcology-checkin-cache-location
"/" id ".el")))
(if (file-exists-p filename)
(with-current-buffer (find-file-noselect filename)
(goto-char (point-min))
(let ((v (read (current-buffer))))
(kill-buffer)
v))
(arcology-checkin-cache-venue id))))
;;;###autoload
(defun arcology-checkin-get-venue-id (venue-name location)
"Interactively read checkin information to get venue ID."
(interactive "MWhat is the venue name? \nMWhat city are you in? ")
(let ((req (request "https://api.foursquare.com/v2/venues/search"
:type "GET"
:params `(("client_id" . ,arcology-checkin-foursquare-client-id)
("client_secret" . ,arcology-checkin-foursquare-client-secret)
("query" . ,venue-name)
("near" . ,location)
("v" . "20140806")
("m" . "foursquare"))
:parser 'json-read
:sync t)))
(let* ((venue (elt (arcology-alist-get 'venues (cdar (request-response-data req))) 0))
(venue-id (arcology-alist-get 'id venue)))
(arcology-checkin-write-cache-venue venue-id venue)
(org-set-property "CHECKIN-VENUE-ID"
venue-id)
venue-id)))
(defun arcology-checkin-write-cache-venue (id data)
"Cache a checkin search result"
(unless (file-exists-p arcology-checkin-cache-location)
(make-directory arcology-checkin-cache-location))
(with-current-buffer (find-file-noselect
(concat arcology-checkin-cache-location
"/" id ".el"))
(erase-buffer)
(print data (current-buffer))
(save-buffer)
(kill-buffer)))
(defun arcology-checkin-cache-venue (id)
"Hit the foursquare API for an venue's information.
Used if the ID is already known, but the venue is uncached."
(let ((req (request (format "https://api.foursquare.com/v2/venues/%s" id)
:type "GET"
:params `(("client_id" . ,arcology-checkin-foursquare-client-id)
("client_secret" . ,arcology-checkin-foursquare-client-secret)
("v" . "20140806")
("m" . "foursquare"))
:parser 'json-read
:sync t)))
(let* ((response (arcology-alist-get 'response (request-response-data req)))
(venue (arcology-alist-get 'venue response))
(venue-id (arcology-alist-get 'id venue)))
(arcology-checkin-write-cache-venue id venue)
venue)))
(def-arcology-entry-generator checkin
(lambda (entry) (concat
(arcology-get-default-content entry)
(arcology-add-checkin-content entry))))
(provide 'arcology-checkin)
;; arcology-checkin.el ends here.

117
arcology-util.el Normal file
View File

@ -0,0 +1,117 @@
;;; arcology-util.el --- Interactive utilities for Arcology
;; Copyright (C) 2016 Ryan Rix
;; Author: Ryan Rix <ryan@whatthefuck.computer>
;; Version: 0.1
;; Package-Requires: ((json "0.1") (org "8.0"))
;; Keywords: web
;; URL: http://notes.whatthefuck.computer/
;;; Commentary:
;;; Code:
(defun arcology-show-mentions ()
"Show webmention data for my domain."
(interactive)
(let ((req (request (format
"http://webmention.io/api/mentions?perPage=20&domain=notes.whatthefuck.computer&token=%s"
arcology-webmention.io-api-key)
:type "GET"
:parser 'json-read
:sync t)))
(let ((output (mapconcat
(lambda (mention)
(let ((sentence (arcology-alist-get
'sentence_html
(arcology-alist-get 'activity mention)))
(url (arcology-alist-get
'url
(arcology-alist-get 'data mention)))
(content (or (arcology-alist-get
'content
(arcology-alist-get 'data mention))
"No Content")))
(format "<li><a href=\"%s\">URL</a> &rarr; %s &rarr; %s </li>" url content sentence)))
(arcology-alist-get 'links (request-response-data req))
"<br/>")))
(with-temp-buffer
(let ((filename (expand-file-name "~/tmp/arcology-mentions.html")))
(insert (format "<html><head><title>*Arcology Webmentions*</title</head><body><ul>%s</ul></body></html>" output))
(write-file filename)
(eww (format "file://%s" filename)))))))
(defun arcology-like-link (url)
(interactive "MURL? ")
(let ((org-capture-templates '(("A" "Arcology like of"
entry
(file org-default-notes-file)
"* Ryan likes %c :LIKE:EXPORT:
:PROPERTIES:
:U-LIKE-OF: %c
:END:
%U
"))))
(kill-new url)
(org-capture nil "A")))
(defun arcology-reply-to-link (url)
(interactive "MURL? ")
(let ((org-capture-templates '(("A" "Arcology reply to"
entry
(file org-default-notes-file)
"* %? :REPLY:EXPORT:
:PROPERTIES:
:U-IN-REPLY-TO: %c
:END:
%U
"))))
(kill-new url)
(org-capture nil "A")))
(add-to-list 'org-capture-templates `("_" "Published shortnote" entry (file ,(expand-file-name "~/Code/notes/index.org"))
"* %? :EXPORT:\n%U\n%a\n" :prepend t))
(defun arcology-web-mention (source target)
(interactive "MSource: \nMTarget")
(let* ((url-request-data (format "source=%s&target=%s" source target))
(url-request-method "POST")
(webmention-url (arcology-extract-webmention-endpoint target)))
(when webmention-url
(with-current-buffer (url-retrieve-synchronously webmention-url)
(buffer-string)))))
(defun arcology-extract-webmention-endpoint (url)
(let ((url-request-method "GET"))
(with-current-buffer (url-retrieve-synchronously url)
(goto-char url-http-end-of-headers)
(let ((start (search-forward-regexp "<link rel=\"webmention\" href=\""))
(end (search-forward "\"")))
(buffer-substring start (- end 1))))))
(defun arcology-send-web-mentions-for-post (point)
(interactive "d")
(save-excursion
(let* (urls
(properties (org-entry-properties point))
(base-url (plist-get arcology-publish-config :html-link-home))
(next-heading (save-excursion (outline-next-heading) (point)))
(permalink (alist-get "RSS_PERMALINK" properties nil nil 'equal)))
(org-back-to-heading)
(condition-case error
(while (re-search-forward "\\[\\[\\(http.[^\]]+\\)\\]\\[[^\]]+\\]\\]" next-heading)
(add-to-list 'urls (match-string-no-properties 1)))
(error nil))
(let ((in-reply-to (alist-get "U-IN-REPLY-TO" properties nil nil 'equal)))
(when in-reply-to
(add-to-list 'urls in-reply-to)))
(dolist (url urls)
(arcology-web-mention (concat base-url "/" permalink) url)))))
; Embed nextcloud direct export links as images
(add-to-list 'org-html-inline-image-rules '("https" . "/s/[A-Za-z0-9]+/preview"))
(provide 'arcology-util)
;;; arcology-util.el ends here

692
arcology.el Normal file
View File

@ -0,0 +1,692 @@
;;; arcology.el --- Another org-mode static site generator
;; Copyright (C) 2016 Ryan Rix
;; Author: Ryan Rix <ryan@whatthefuck.computer>
;; Version: 0.1
;; Package-Requires: ((json "0.1") (org "8.0"))
;; Keywords: web
;; URL: http://notes.whatthefuck.computer/
;;; Commentary:
;; This package generates a small blog from org-mode files, leveraging Microformats to provide
;; semantic information about the posts; you can use this information to automate sharing,
;; linkbacks, embedding images in 3rd party silso, and more; see http://indiewebcamp.com and
;; http://microformats.org for more information.
;; This package can be used by configuring the various variables and then calling [`arcology']
;; which will publish the blog index, an RSS feed and URLs for each entry. You can then have Brid.gy
;; automatically syndicate the content to silos by calling [`arcology-syndicate-entry-at-point'].
;; From Wikipedia:
;; Arcology, a portmanteau of "architecture" and "ecology", is a vision of architectural design
;; principles for very densely populated habitats. The concept has been primarily popularized, and
;; the term itself coined, by architect Paolo Soleri. It also appears in science fiction. These
;; structures have been largely hypothetical insofar as no 'arcology' envisioned by Soleri himself
;; has yet been completed, but he posited that a completed arcology would provide space for a
;; variety of residential, commercial, and agricultural facilities while minimizing individual human
;; environmental impact. Arcologies are often portrayed in sci-fi as self-contained or economically
;; self-sufficient.
;; Arcology aims to be a self-sufficient blogging platform, where you can leverage the work that
;; IndieWeb actors have done to build a self-sufficient site with the full support of "social media"
;; type offerings like comments, reposts, checkins, all running under your own domain and backed by
;; plain text that you can control yourself or generate using simple scripts or Memacs
;;; Code:
(require 'cl)
(require 'org-attach)
(require 'ox-html)
(require 'htmlize)
(require 'url-http)
(require 'url)
(require 'json)
(require 'arcology-util)
;;;###autoload
(defgroup arcology nil
"Static org-mode site generator")
;;;###autoload
(defcustom arcology-site-root "~/tmp/arcology"
"The base directory to generate the site in to."
:group 'arcology)
;;;###autoload
(defcustom arcology-site-tag "BLORG-NOEXPORT+EXPORT"
"Org tag that Arcology will look for."
:group 'arcology)
;;;###autoload
(defcustom arcology-publish-config
'(:rss-image-url "http://whatthefuck.computer/~rrix/25ZLKRlf.jpg"
:html-link-home "https://notes.whatthefuck.computer"
:html-link-use-abs-url t
:rss-extension "xml"
:select-tags ("EXPORT")
:exclude-tags ("NOEXPORT")
:publishing-directory "/ssh:fontkeming.fail:/var/www/sites/notes.whatthefuck.computer/_site/"
:table-of-contents nil
:section-numbers nil
:recursive t)
"An `org-publish-project-alist' format plist containing shared state between all of the temporary publish projects."
:group 'arcology)
;;;###autoload
(defcustom arcology-default-template-file (expand-file-name "~/Code/notes/templates/default.html")
"Template file to use for fallback"
:group 'arcology)
;;;###autoload
(defcustom arcology-note-template-file (expand-file-name "~/Code/notes/templates/note.html")
"Template file to use for notes"
:group 'arcology)
;;;###autoload
(defcustom arcology-read-template-file (expand-file-name "~/Code/notes/templates/default.html")
"Template file to use for read-items"
:group 'arcology)
;;;###autoload
(defcustom arcology-article-template-file (expand-file-name "~/Code/notes/templates/default.html")
"Template file to use for full-length articles."
:group 'arcology)
;;;###autoload
(defcustom arcology-photo-template-file (expand-file-name "~/Code/notes/templates/default.html")
"Template file to use for notes."
:group 'arcology)
;;;###autoload
(defcustom arcology-jam-template-file (expand-file-name "~/Code/notes/templates/default.html")
"Template file to use for jam posts."
:group 'arcology)
;;;###autoload
(defcustom arcology-reply-template-file (expand-file-name "~/Code/notes/templates/reply.html")
"Template file to use for replies."
:group 'arcology)
;;;###autoload
(defcustom arcology-index-template-file (expand-file-name "~/Code/notes/templates/index.html")
"Template file to use for the site index."
:group 'arcology)
;;;###autoload
(defcustom arcology-review-template-file (expand-file-name "~/Code/notes/templates/review.html")
"Template file to use for reviews."
:group 'arcology)
;;;###autoload
(defcustom arcology-index-title "Computer :("
"The title of your site"
:group 'arcology)
;;;###autoload
(defcustom arcology-webmention.io-api-key nil
"API Key for webmention.io, used to pull all mentions."
:group 'arcology)
(defvar arcology-entry-cache nil)
(defvar arcology-full-postlist nil)
;;;###autoload
(defun arcology (use-cache &optional preview)
"Generate the Arcology site.
If USE-CACHE is non-nil, use the cache instead of refreshing the
cache. If PREVIEW is non-nil, skip publishing."
(interactive "P")
(let ((config (arcology-make-config)))
(when (not use-cache)
(setq arcology-entry-cache nil)
(setq arcology-full-postlist nil)
(arcology-index-entries config))
(unless (file-exists-p arcology-site-root)
(mkdir arcology-site-root t))
(arcology-generate-modified-entries config)
(arcology-generate-indices config))
(copy-file "~/Code/notes/webmention.js" (concat arcology-site-root "/webmention.js") t)
(copy-file "~/Code/notes/go.png" (concat arcology-site-root "/go.png") t)
(copy-file "~/Code/notes/favicon.gif" (concat arcology-site-root "/favicon.gif") t)
(copy-file "~/Code/notes/rix_green.png" (concat arcology-site-root "/rix_green.png") t)
(copy-directory "~/Code/notes/css" (concat arcology-site-root "/css") t t t)
(copy-directory "~/Code/notes/font" (concat arcology-site-root "/font") t t t)
(unless preview
(arcology-publish)))
(defun arcology-publish ()
"Publish an already-rendered Arcology site"
(interactive)
(let* ((config (arcology-make-config))
(org-publish-project-alist
(list (append '("notes_other")
(arcology-plist-merge '(:base-extension "JPG\\|js\\|html\\|jpg\\|gif\\|png\\|css\\|woff\\|eot\\|ttf\\|svg\\|woff2" :publishing-function (org-publish-attachment))
arcology-publish-config
config)))))
(org-publish "notes_other")))
(defun arcology-generate-indices (config)
(arcology-generate-index config :index (lambda (metadata) nil))
(mapc (lambda (post-type)
(arcology-generate-index config post-type
(lambda (metadata)
(not (eq (elt metadata 0) post-type)))))
(arcology-post-types-from-list arcology-full-postlist)))
(defun arcology-post-types-from-list (postlist)
(reduce (lambda (last current)
(if (member (elt current 0) last)
last
(append last (list (elt current 0)))))
postlist
:initial-value '()))
(defun arcology-make-config (&optional base)
(let (plist (list))
(append (list :base-directory arcology-site-root)
(list :site-tag arcology-site-tag)
(when base
base))))
(defun arcology-index-entries (config)
"Generate an index of entries that Arcology should build in to its site."
(org-map-entries 'arcology-index-entry
(plist-get config :site-tag)
'agenda))
(defun arcology-generate-modified-entries (config)
;; XXX: Have this just iterate over the entry-cache using the logic in at-point....
;; Right now this O(x^N) where x is posts, and N is post types. UGH.
(arcology-plist-mapc #'arcology-generate-modified-entries-for-type
arcology-entry-cache))
(defun arcology-filter (condp lst)
(delq nil
(mapcar (lambda (x) (and (funcall condp x) x)) lst)))
(defun arcology-format-time (time &optional iso)
"Convert a time as float or int since epoch to presentable."
(let ((format (if iso
"%FT%T%z"
"%H:%MZ on %e %B %Y")))
(format-time-string format (seconds-to-time time) t)))
(defun arcology-generate-index (config type filterfun)
(arcology-write-template
(format "%s/%s.html" arcology-site-root
(replace-regexp-in-string ":" "" (prin1-to-string type)))
arcology-index-template-file
:content (mapconcat (lambda (metadata)
(let* ((entry-type (elt metadata 0))
(key (elt metadata 1))
(entry-list (plist-get arcology-entry-cache
entry-type))
(entry (lax-plist-get entry-list
key)))
(format "<div class=\"h-entry\"><div class=\"row\"><i class=\"icon-%s\" aria-hidden=true></i><h2 class=\"p-name\">%s</h2> <a class=\"u-url\" href=\"%s\"><time class=\"dt-published\" datetime=\"%s\">%s</time></a></div><div class=\"row\">%s</div></div>"
(replace-regexp-in-string ":" "" (prin1-to-string entry-type))
(plist-get entry :title-html)
(elt metadata 3)
(arcology-format-time (elt metadata 4) t)
(arcology-format-time (elt metadata 4))
(plist-get entry :index-html))))
(cl-remove-if filterfun (reverse arcology-full-postlist)) "\n")
:title arcology-index-title
:title-html arcology-index-title
:url (plist-get config :base-directory)))
(defun arcology-plist-mapc (fun plist)
(cl-loop for (k v) on plist by 'cddr
collect
(funcall fun k v)))
(defun arcology-generate-modified-entries-for-type (cache-type entries)
(case cache-type
((:note) (arcology-plist-mapc #'arcology-make-note-entry entries))
((:read) (arcology-plist-mapc #'arcology-make-read-entry entries))
((:like) (arcology-plist-mapc #'arcology-make-like-entry entries))
((:step) (arcology-plist-mapc #'arcology-make-step-entry entries))
((:photo) (arcology-plist-mapc #'arcology-make-photo-entry entries))
((:video) (arcology-plist-mapc #'arcology-make-video-entry entries))
((:jam) (arcology-plist-mapc #'arcology-make-jam-entry entries))
((:review) (arcology-plist-mapc #'arcology-make-review-entry entries))
((:reply) (arcology-plist-mapc #'arcology-make-reply-entry entries))
((:rsvp) (arcology-plist-mapc #'arcology-make-rsvp-entry entries))
((:checkin) (progn
(require 'arcology-checkin)
(arcology-plist-mapc #'arcology-make-checkin-entry entries)))
((:article) (arcology-plist-mapc #'arcology-make-article-entry entries))))
(defmacro def-arcology-entry-generator (type content-generator &optional extra-body extra-lets)
(let ((fname (intern (format "arcology-make-%s-entry" type)))
(type-as-symbol (intern (format ":%s" type)))
(template-file-var (intern (format "arcology-%s-template-file" type))))
`(defun ,fname (key entry)
(save-window-excursion
(with-current-buffer (plist-get entry :buffer)
(goto-char (plist-get entry :point))
(unless (file-exists-p arcology-site-root)
(make-directory arcology-site-root))
(let* ((pubdate (plist-get entry :created-at))
(pubdate (org-time-string-to-seconds pubdate))
(filename (format "%s-note.html" pubdate))
(fullpath (format "%s/%s" arcology-site-root filename))
(title (plist-get entry :title))
(title-html (plist-get entry :title-html))
(content (funcall ,content-generator entry))
(base-url (plist-get arcology-publish-config :html-link-home))
(full-url (concat base-url "/" filename))
(syn-twitter-url (arcology-alist-get "SYN-TWITTER" (plist-get entry :properties)))
(syn-facebook-url (arcology-alist-get "SYN-FACEBOOK" (plist-get entry :properties)))
(syn-twitter-href (if (> (length syn-twitter-url) 0)
(format "<a rel=\"syndication\" href=\"%s\">On Twitter</a>" syn-twitter-url)
""))
(syn-facebook-href (if (> (length syn-facebook-url) 0)
(format "<a rel=\"syndication\" href=\"%s\">On Facebook</a>" syn-facebook-url)
""))
,@(when extra-lets
extra-lets))
(org-entry-put (point) "RSS_PERMALINK" filename)
,@(when extra-body
extra-body)
(arcology-write-template fullpath ,(if (boundp template-file-var)
template-file-var
arcology-default-template-file)
:content content
:title title
:title-html title-html
:url full-url
:dt-published (format "<time class=\"dt-published\" datetime=\"%s\">%s</time>"
(arcology-format-time (truncate pubdate) t)
(arcology-format-time (truncate pubdate)))
:twitter syn-twitter-href
:facebook syn-facebook-href)
(let ((cache-entry (list ,type-as-symbol key fullpath full-url (truncate pubdate))))
(unless (member cache-entry arcology-full-postlist)
(add-to-ordered-list 'arcology-full-postlist
cache-entry
pubdate)))))))))
(defun arcology-write-template (fullpath template-file &rest template-args)
(with-current-buffer (find-file-noselect fullpath)
(erase-buffer)
(if (file-exists-p template-file)
(insert-file template-file)
(insert-file arcology-default-template-file))
(goto-char (point-min))
(replace-regexp "{{content}}" (or (plist-get template-args :content)
""))
(goto-char (point-min))
(replace-regexp "{{title}}" (or (plist-get template-args :title)
""))
(goto-char (point-min))
(replace-regexp "{{title-html}}" (or (plist-get template-args :title-html)
""))
(goto-char (point-min))
(replace-regexp "{{url}}" (or (plist-get template-args :url)
""))
(goto-char (point-min))
(replace-regexp "{{dt-published}}" (or (plist-get template-args :dt-published)
""))
(goto-char (point-min))
(replace-regexp "<a class=\"u-syndication\" href=\"{{twitter}}\">On Twitter</a>" (or (plist-get template-args :twitter)
""))
(goto-char (point-min))
(replace-regexp "<a class=\"u-syndication\" href=\"{{facebook}}\">On Facebook</a>" (or (plist-get template-args :facebook)
""))
(write-file fullpath)
(kill-buffer (current-buffer))))
(defun arcology-index-entry (&optional not-scanning)
"Index the entry at point.
This function basically just routes to other functions based on
inferring the post type of a given entry."
(interactive)
(let* ((org-trust-scanner-tags nil)
(proptable (org-entry-properties))
(ctime (arcology-get-ctime proptable))
(key (or (org-id-get)
ctime)))
(let* ((title (elt (org-heading-components) 4))
(buffer (current-buffer))
(point (point))
(tags (org-get-tags-at))
(entry-text (arcology-clean-entry-text (org-get-entry)))
(sub-cache-type (arcology-entry-type-at-point))
(sub-cache (or (plist-get arcology-entry-cache sub-cache-type)
(list)))
(index-html (arcology-index-snippet-for-entry-at-point)))
(if (not (member "NOEXPORT" tags))
(let ((res (list :title (replace-regexp-in-string "<.*> " "" title)
:title-html (replace-regexp-in-string "&lt;.*&gt;" "" (arcology-heading-to-html))
:length (length entry-text)
:buffer buffer
:point point
:properties proptable
:index-html index-html
:created-at ctime)))
(setq arcology-entry-cache
(plist-put arcology-entry-cache sub-cache-type
(plist-put sub-cache key
res)))
(list sub-cache-type res))))))
(defun arcology-entry-type-at-point ()
(cond ((member "READ" tags) :read)
((member "CHECKIN" tags) :checkin)
((arcology-alist-get "P-RSVP" proptable) :rsvp)
((arcology-alist-get "YOUTUBE-URL" proptable) :video)
((member "REPLY" tags) :reply)
((member "LIKE" tags) :like)
((member "STEPS" tags) :step)
;; ((member "EVENT" tags) :event)
;; ((member "BOOKMARK" tags) :bookmark)
;; ((member "REPOST" tags) :repost)
((member "JAM" tags) :jam)
((member "REVIEW" tags) :review)
;; ((member "RSVP" tags) :rsvp)
((and (member "ATTACH" tags)
(string-match-p "\\.[\(jpg\)\|\(png\)\|\(gif\)]+$"
(arcology-alist-get "ATTACHMENTS" proptable)))
:photo)
((and (member "ATTACH" tags)
(string-match-p "\\.[\(ogv\)\|\(mp4\)\|\(mkv\)]+$"
(arcology-alist-get "ATTACHMENTS" proptable)))
:video)
((not (> (length entry-text) 0)) :note)
(t :article)))
(defun arcology-index-snippet-for-entry-at-point ()
(cond ((> (length (if (org-attach-dir) (org-attach-file-list (org-attach-dir)) '())) 0)
(arcology-add-image-content-at-point 10))
(t "")))
(defun arcology-publish-entry-at-point (point &optional suppress-publish)
(interactive "d")
(goto-char point)
;; index the entry
(let* ((entry (arcology-index-entry t))
(proptable (org-entry-properties))
(ctime (arcology-get-ctime proptable))
(key (or (org-id-get)
ctime)))
(case (car entry)
;; render it
((:note) (arcology-make-note-entry key (cadr entry)))
((:read) (arcology-make-read-entry key (cadr entry)))
((:like) (arcology-make-like-entry key (cadr entry)))
((:step) (arcology-make-step-entry key (cadr entry)))
((:photo) (arcology-make-photo-entry key (cadr entry)))
((:video) (arcology-make-video-entry key (cadr entry)))
((:jam) (arcology-make-jam-entry key (cadr entry)))
((:review) (arcology-make-review-entry key (cadr entry)))
((:reply) (arcology-make-reply-entry key (cadr entry)))
((:checkin) (progn
(require 'arcology-checkin)
(arcology-make-checkin-entry key (cadr entry))))
((:article) (arcology-make-article-entry key (cadr entry))))
;; render indices
(arcology-generate-indices (arcology-make-config))
;; publish
(unless suppress-publish
(arcology-publish))))
(defun arcology-clean-entry-text (entry)
(replace-regexp-in-string
"[[0-9]+-.*]\n?" ""
(replace-regexp-in-string
"CLOSED:.*\n?" ""
(replace-regexp-in-string
"^\s*:[A-Za-z0-9-_]+:.*\n?" ""
(org-get-entry)))))
(defun arcology-alist-get (key obj)
"Easy JSON accessor, get KEY's value from OBJ."
(cdr (assoc key obj)))
(defun arcology-heading-to-html ()
"HTMLize the heading at point, cleaning up crap and generating in-reply-to URLs."
(let ((heading (org-get-heading)))
(with-current-buffer (get-buffer-create "*arcology-tmp*")
(org-mode)
(insert heading)
(goto-char (point-min))
(replace-regexp ":[:a-zA-Z0-9-_]+:$" "")
(let* ((str (htmlize-region-for-paste (point-min) (point-max))))
(kill-buffer)
(with-temp-buffer
(insert str)
(goto-char (point-min))
(replace-regexp "<pre>" "")
(goto-char (point-min))
(replace-regexp "</pre>" "")
(goto-char (point-min))
(replace-regexp "<a href=\"https://twitter" "<a class=\"u-in-reply-to\" href=\"https://twitter")
(buffer-string))))))
(defun arcology-get-default-content (entry)
(with-current-buffer (plist-get entry :buffer)
(goto-char (plist-get entry :point))
(with-current-buffer (org-html-export-as-html nil t nil t)
(buffer-string))))
(defun arcology-add-image-content-at-point (&optional width)
(let* ((id (org-id-get-create))
(attach-dir (org-attach-dir))
(file-list (if attach-dir
(org-attach-file-list attach-dir)
'()))
(real-width (cond (width width)
((= (length file-list) 1)
100)
((= (length file-list) 2)
49)
(t 32))))
(concat
"<br/>"
(mapconcat (lambda (file)
(let ((file- (concat attach-dir "/" file))
(newfile (concat arcology-site-root "/" id "-" file)))
(message "%s" id)
(unless (file-exists-p newfile)
(copy-file file- newfile)
(set-file-modes newfile 420))
(format "%s%s%s"
(concat "<a style=\"width: "
(number-to-string real-width) "%\" href=\"" id "-" file "\">")
(concat "<img src=\"" id "-" file "\" class=\"u-photo\"/>")
"</a>")))
file-list
"\n"))))
(defun arcology-add-image-content (entry &optional width)
(with-current-buffer (plist-get entry :buffer)
(goto-char (plist-get entry :point))
(arcology-add-image-content-at-point width)))
(defun arcology-plist-merge (&rest plists)
"Merge a bunch of PLISTS together."
(if plists
(let ((result (copy-sequence (car plists))))
(while (setq plists (cdr plists))
(let ((plist (car plists)))
(while plist
(setq result (plist-put result (car plist) (car (cdr plist)))
plist (cdr (cdr plist))))))
result)
nil))
(defun arcology-get-ctime (proptable)
"Infer a created time from PROPTABLE"
(or (arcology-alist-get "CLOSED" proptable)
(arcology-alist-get "TIMESTAMP_IA" proptable)
(arcology-alist-get "TIMESTAMP" proptable)))
(defun arcology-entry-to-html (entry)
(with-current-buffer (plist-get entry :buffer)
(goto-char (plist-get entry :point))
(with-current-buffer (org-html-export-as-html nil t nil t)
(buffer-string))))
(defun arcology-syndicate-entry-at-point (&optional no-twitter no-facebook)
"Syndicate the org-mode entry at point, by calling out to Bridgy and storing the result."
(interactive)
(let* ((date (arcology-get-ctime (org-entry-properties)))
(date (org-time-string-to-seconds date))
(base-url (plist-get arcology-publish-config :html-link-home))
(url (format "%s/%s-note.html" base-url date))
(syn-twitter (org-entry-get (point) "SYN-TWITTER"))
(syn-facebook (org-entry-get (point) "SYN-FACEBOOK"))
(syn-reply (org-entry-get (point) "SYN-IN-REPLY-TO"))
(syn-like (org-entry-get (point) "SYN-LIKE-OF"))
(realpoint (point)))
(unless (and (not no-twitter) (> (length syn-twitter) 0))
(let* ((url-request-data (format "source=%s&target=http://brid.gy/publish/twitter" url))
(url-request-method "POST")
(buf (url-retrieve-synchronously "https://brid.gy/publish/webmention")))
(org-entry-put realpoint "SYN-TWITTER"
(with-current-buffer buf
(goto-char url-http-end-of-headers)
(let* ((body (json-read))
(url (assoc 'url body)))
(when url
(cdr url)))))))
(unless (and (not no-facebook) (> (length syn-facebook) 0))
(let* ((url-request-data (format "source=%s&target=http://brid.gy/publish/facebook" url))
(url-request-method "POST")
(buf (url-retrieve-synchronously "https://brid.gy/publish/webmention")))
(org-entry-put realpoint "SYN-FACEBOOK"
(with-current-buffer buf
(goto-char url-http-end-of-headers)
(let* ((body (json-read))
(url (assoc 'url body)))
(when url
(cdr url)))))))))
(def-arcology-entry-generator note (lambda (entry) ""))
(def-arcology-entry-generator read
#'arcology-get-default-content)
(def-arcology-entry-generator article
#'arcology-get-default-content)
(def-arcology-entry-generator photo
(lambda (entry)
(concat
(arcology-add-image-content entry)
(arcology-entry-to-html entry))))
(def-arcology-entry-generator jam
(lambda (entry)
(let ((query (replace-regexp-in-string "<.*> " "" (plist-get entry :title)))
(str (if (> (length (arcology-clean-entry-text (org-get-entry))) 0)
(arcology-entry-to-html entry)
"")))
(format "<a href=\"https://youtube.com/results?search_query=%s\">%s</a> on YouTube <p>%s</p>" query query str))))
(def-arcology-entry-generator
like (lambda (entry) "")
nil ((title-html (replace-regexp-in-string))))
(def-arcology-entry-generator reply
(lambda (entry)
(let ((properties (plist-get entry :properties))
(str (if (> (length (arcology-clean-entry-text (org-get-entry))) 0)
(arcology-entry-to-html entry)
"")))
(format "<a class=\"u-in-reply-to\" href=\"%s\">In reply to %s</a>... <p>%s</p>"
(arcology-alist-get "U-IN-REPLY-TO" properties)
(arcology-alist-get "U-IN-REPLY-TO" properties)
str))))
(def-arcology-entry-generator like
(lambda (entry)
(let ((properties (plist-get entry :properties))
(str (if (> (length (arcology-clean-entry-text (org-get-entry))) 0)
(arcology-entry-to-html entry)
"")))
(format "<a class=\"u-like-of\" href=\"%s\">Ryan likes %s</a>... <p>%s</p>"
(arcology-alist-get "U-LIKE-OF" properties)
(arcology-alist-get "U-LIKE-OF" properties)
str))))
(def-arcology-entry-generator rsvp
(lambda (entry)
(let* ((properties (plist-get entry :properties))
(rsvp (arcology-alist-get "P-RSVP" properties))
(str (if (> (length (arcology-clean-entry-text (org-get-entry))) 0)
(arcology-entry-to-html entry)
"")))
(format "<a class=\"u-in-reply-to\" href=\"%s\"><data class=\"p-rsvp\" value=\"%s\">Ryan %s %s</data></a>... <p>%s</p>"
(arcology-alist-get "U-IN-REPLY-TO" properties)
rsvp
(cond ((equal rsvp "yes")
"is going to")
((equal rsvp "interested")
"is interested in")
((equal rsvp "no")
"is not going to")
((equal rsvp "maybe")
"might go to"))
(arcology-alist-get "U-IN-REPLY-TO" properties)
str))))
(def-arcology-entry-generator step
(lambda (entry)
(let* ((properties (plist-get entry :properties))
(str (if (> (length (arcology-clean-entry-text (org-get-entry))) 0)
(arcology-entry-to-html entry)
"")))
(format "Ryan burnt <data class=\"p-calories\" value=\"%s\">%s calories</data> and walked <data class=\"p-distance\" value=\"%s\">%s</data> miles in <data class=\"p-steps\" value=\"%s\">%s steps</data> <p>%s</p>"
(arcology-alist-get "CALORIES" properties)
(arcology-alist-get "CALORIES" properties)
(arcology-alist-get "DISTANCE" properties)
(arcology-alist-get "DISTANCE" properties)
(arcology-alist-get "STEPS" properties)
(arcology-alist-get "STEPS" properties)
str))))
(def-arcology-entry-generator video
(lambda (entry)
(let* ((properties (plist-get entry :properties))
(id (org-id-get-create))
(attach-dir (org-attach-dir))
(file-list (if attach-dir
(org-attach-file-list attach-dir)
'())))
(format "%s%s%s"
(if (arcology-alist-get "YOUTUBE-URL" properties)
(format "<iframe %s %s src=\"http://www.youtube.com/embed/%s\"></iframe>"
"type=\"text/html\" frameborder=\"0\""
"width=\"750px\" height=\"562px\""
(car (last (split-string (arcology-alist-get "YOUTUBE-URL" properties)
"="))))
"")
(mapconcat (lambda (file)
(let ((file- (concat attach-dir "/" file))
(newfile (concat arcology-site-root "/" id "-" file)))
(unless (file-exists-p newfile)
(copy-file file- newfile)
(set-file-modes newfile 420))
(concat "<video controls style=\"width: 100%\" src=\"" id "-" file "\" class=\"u-video\"/><br/>")))
file-list "\n")
(if (> (length (arcology-clean-entry-text (org-get-entry))) 0)
(arcology-entry-to-html entry)
"")))))
(def-arcology-entry-generator review
(lambda (entry)
(let* ((properties (plist-get entry :properties))
(rating (arcology-alist-get "P-RATING" properties))
(item (arcology-alist-get "P-ITEM" properties))
(id (org-id-get-create))
(attach-dir (org-attach-dir))
(file-list (if attach-dir
(org-attach-file-list attach-dir)
'())))
(format "%s%s%s%s"
item
(arcology-add-image-content entry)
(arcology-entry-to-html entry)
(format "I give this item a <data class=\"p-rating\" value=\"%s\">%s star</data> review out of 5 stars." rating rating)))))
(provide 'arcology)
;;; arcology.el ends here

BIN
blorg-images/25ZLKRlf.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
blorg-images/IMG_0559.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

BIN
blorg-images/cjs1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
blorg-images/cjs2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

85
css/animation.css Normal file
View File

@ -0,0 +1,85 @@
/*
Animation example, for spinners
*/
.animate-spin {
-moz-animation: spin 2s infinite linear;
-o-animation: spin 2s infinite linear;
-webkit-animation: spin 2s infinite linear;
animation: spin 2s infinite linear;
display: inline-block;
}
@-moz-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-webkit-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-o-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-ms-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}

View File

@ -0,0 +1,16 @@
.icon-photo:before { content: '\e800'; } /* '' */
.icon-read:before { content: '\e801'; } /* '' */
.icon-checkin:before { content: '\e802'; } /* '' */
.icon-reply:before { content: '\e803'; } /* '' */
.icon-like:before { content: '\e804'; } /* '' */
.icon-event:before { content: '\e805'; } /* '' */
.icon-repost:before { content: '\e806'; } /* '' */
.icon-jam:before { content: '\e807'; } /* '' */
.icon-rsvp:before { content: '\e808'; } /* '' */
.icon-video:before { content: '\e809'; } /* '' */
.icon-note:before { content: '\e80a'; } /* '' */
.icon-article:before { content: '\e80b'; } /* '' */
.icon-step:before { content: '\e80c'; } /* '' */
.icon-sleep:before { content: '\e80d'; } /* '' */
.icon-review:before { content: '\e80e'; } /* '' */

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,16 @@
.icon-photo { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe800;&nbsp;'); }
.icon-read { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe801;&nbsp;'); }
.icon-checkin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe802;&nbsp;'); }
.icon-reply { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe803;&nbsp;'); }
.icon-like { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe804;&nbsp;'); }
.icon-event { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe805;&nbsp;'); }
.icon-repost { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe806;&nbsp;'); }
.icon-jam { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.icon-rsvp { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe808;&nbsp;'); }
.icon-video { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.icon-note { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80a;&nbsp;'); }
.icon-article { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80b;&nbsp;'); }
.icon-step { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80c;&nbsp;'); }
.icon-sleep { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80d;&nbsp;'); }
.icon-review { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80e;&nbsp;'); }

View File

@ -0,0 +1,27 @@
[class^="icon-"], [class*=" icon-"] {
font-family: 'arcology-icons';
font-style: normal;
font-weight: normal;
/* fix buttons height */
line-height: 1em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
}
.icon-photo { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe800;&nbsp;'); }
.icon-read { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe801;&nbsp;'); }
.icon-checkin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe802;&nbsp;'); }
.icon-reply { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe803;&nbsp;'); }
.icon-like { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe804;&nbsp;'); }
.icon-event { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe805;&nbsp;'); }
.icon-repost { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe806;&nbsp;'); }
.icon-jam { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.icon-rsvp { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe808;&nbsp;'); }
.icon-video { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.icon-note { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80a;&nbsp;'); }
.icon-article { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80b;&nbsp;'); }
.icon-step { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80c;&nbsp;'); }
.icon-sleep { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80d;&nbsp;'); }
.icon-review { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80e;&nbsp;'); }

72
css/arcology-icons.css Normal file
View File

@ -0,0 +1,72 @@
@font-face {
font-family: 'arcology-icons';
src: url('../font/arcology-icons.eot?95695515');
src: url('../font/arcology-icons.eot?95695515#iefix') format('embedded-opentype'),
url('../font/arcology-icons.woff2?95695515') format('woff2'),
url('../font/arcology-icons.woff?95695515') format('woff'),
url('../font/arcology-icons.ttf?95695515') format('truetype'),
url('../font/arcology-icons.svg?95695515#arcology-icons') format('svg');
font-weight: normal;
font-style: normal;
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'arcology-icons';
src: url('../font/arcology-icons.svg?95695515#arcology-icons') format('svg');
}
}
*/
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "arcology-icons";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* fix buttons height, for twitter bootstrap */
line-height: 1em;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Font smoothing. That was taken from TWBS */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.icon-photo:before { content: '\e800'; } /* '' */
.icon-read:before { content: '\e801'; } /* '' */
.icon-checkin:before { content: '\e802'; } /* '' */
.icon-reply:before { content: '\e803'; } /* '' */
.icon-like:before { content: '\e804'; } /* '' */
.icon-event:before { content: '\e805'; } /* '' */
.icon-repost:before { content: '\e806'; } /* '' */
.icon-jam:before { content: '\e807'; } /* '' */
.icon-rsvp:before { content: '\e808'; } /* '' */
.icon-video:before { content: '\e809'; } /* '' */
.icon-note:before { content: '\e80a'; } /* '' */
.icon-article:before { content: '\e80b'; } /* '' */
.icon-step:before { content: '\e80c'; } /* '' */
.icon-sleep:before { content: '\e80d'; } /* '' */
.icon-review:before { content: '\e80e'; } /* '' */

112
css/default.css Normal file
View File

@ -0,0 +1,112 @@
ul.webmentions li { display: flex; align-items: center; }
ul.webmentions li img { border-radius: 50%; }
ul.webmentions li div { flex: auto; }
ul.webmentions li > a { width: 350px;
height: 75px;
width: 75px;
background: url("/go.png");
background-size: 100%;
text-indent: -9999px;}
.tag { display: none; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
pre.src-sh:before { content: 'sh'; }
pre.src-bash:before { content: 'sh'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-R:before { content: 'R'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-java:before { content: 'Java'; }
pre.src-sql:before { content: 'SQL'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
pre {
display: block;
margin: 0 0 14px;
padding: 15px;
border-radius: 3px 3px 3px 3px;
font-size: 14px;
line-height: 28px;
background-color: #f5f5f5;
white-space: pre;
white-space: pre-wrap;
word-break: break-all;
word-wrap: break-word;
}
img {
display: block;
margin: 0;
border-radius: 5px;
}
#table-of-contents {
display: none;
}
body{
margin:40px auto;
max-width: 750px;
line-height:1.6;
font-size:18px;
color: #444444;
background-color: #eeeeee;
padding:0 10px
}
h1,h2,h3{
line-height:1.2
}

33
css/main.css Normal file
View File

@ -0,0 +1,33 @@
pre {
display: block;
margin: 0 0 14px;
padding: 15px;
border-radius: 3px 3px 3px 3px;
font-size: 14px;
line-height: 28px;
background-color: #f5f5f5;
white-space: pre;
white-space: pre-wrap;
word-break: break-all;
word-wrap: break-word;
}
img {
display: block;
margin: 0;
border-radius: 5px;
}
#table-of-contents {
display: none;
}
body{
margin:40px auto;
max-width: 750px;
line-height:1.6;
font-size:18px;
color: #444444;
background-color: #eeeeee;
padding:0 10px
}
h1,h2,h3{
line-height:1.2
}

221
css/notes.css Normal file
View File

@ -0,0 +1,221 @@
.tag { display: none; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
pre.src-sh:before { content: 'sh'; }
pre.src-bash:before { content: 'sh'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-R:before { content: 'R'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-java:before { content: 'Java'; }
pre.src-sql:before { content: 'SQL'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
pre {
overflow: auto;
word-wrap: normal;
white-space: pre;
display: block;
margin: 0 0 14px;
padding: 15px;
border-radius: 3px 3px 3px 3px;
font-size: 14px;
line-height: 28px;
background-color: #f5f5f5;
white-space: pre;
white-space: pre-wrap;
word-break: break-all;
word-wrap: break-word;
}
img {
display: block;
margin: 0;
border-radius: 5px;
}
#table-of-contents {
display: none;
}
body {
font-family: "Alef";
background: url("http://notes.whatthefuck.computer/c6745a85-db1c-4fcb-b284-0fcfd741dc86-12968024_10154175739683856_2042569012646513106_o.jpg");
background-size: cover;
}
.wrap {
margin:40px auto;
border-radius: 10px;
max-width: 750px;
line-height:1.6;
font-size:18px;
color: #444444;
background-color: rgba(200, 200, 200, 0.8);
padding:0 10px
}
h1,h2,h3{
font-family: "Rajdhani";
padding-top: 0.2em;
line-height: 1.2;
}
.h-feed .h-entry .dt-published {
font-size: 0.6em !important;
}
.h-feed .h-entry {
margin-bottom: 1em;
border: solid 1px #888;
border-radius: 5px;
background-color: rgba(220,220,220,1);
padding: 0.2em;
}
.h-feed .h-entry .row {
align-items: center;
display: flex;
}
.h-feed .h-entry .row > i,h2,.u-url {
flex: 0 0 auto;
}
.h-feed .h-entry .row > h2 {
display: inline;
font-size: 1em;
font-weight: 100;
flex: 3 3 auto
}
.h-feed .h-entry .row > a {
flex: 0 0 auto;
width: 18%;
}
.h-feed .h-entry .row > a > img {
width: 100%;
}
ul.webmentions li {
display: flex;
align-items: center;
}
ul.webmentions li > img {
border-radius: 50%;
flex: 1 0 15%;
}
ul.webmentions li div {
flex: 3 1 75%;
}
ul.webmentions li > a {
width: 350px;
height: 75px;
width: 75px;
background: url("/go.png");
background-size: 100%;
text-indent: -9999px;
flex: 3 1 10%;
}
ul.webmentions li div img {
width: 100%;
}
.e-description > img {
width: 49.5%;
display: inline-block;
}
img.u-photo {
display: inline;
width: 100%
}
.figure img {
display: inline;
width: 100%
}
@font-face {
font-family: 'Alef';
src: url('../font/Alef-Bold.ttf');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'Alef';
src: url('../font/Alef-Regular.ttf');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Rajdhani';
src: url('../font/Rajdhani-Medium.ttf');
font-weight: Medium;
font-style: normal;
}
a {
color: darkred;
}
a:visited {
color: #121212;
}

BIN
favicon.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
font/Alef-Bold.ttf Normal file

Binary file not shown.

BIN
font/Alef-Regular.ttf Normal file

Binary file not shown.

BIN
font/Rajdhani-Bold.ttf Normal file

Binary file not shown.

BIN
font/Rajdhani-Light.ttf Normal file

Binary file not shown.

BIN
font/Rajdhani-Medium.ttf Normal file

Binary file not shown.

BIN
font/Rajdhani-Regular.ttf Normal file

Binary file not shown.

BIN
font/Rajdhani-SemiBold.ttf Normal file

Binary file not shown.

BIN
font/arcology-icons.eot Normal file

Binary file not shown.

40
font/arcology-icons.svg Normal file
View File

@ -0,0 +1,40 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
<defs>
<font id="arcology-icons" horiz-adv-x="1000" >
<font-face font-family="arcology-icons" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="photo" unicode="&#xe800;" d="M518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z" horiz-adv-x="1000" />
<glyph glyph-name="read" unicode="&#xe801;" d="M915 583q22-32 10-72l-154-505q-10-36-42-60t-69-25h-515q-43 0-83 30t-55 74q-14 37-1 71 0 2 1 15t3 20q0 5-2 12t-2 11q1 6 5 12t9 13 9 13q13 21 25 51t17 51q2 6 0 17t0 16q2 6 9 15t10 13q12 20 23 51t14 51q1 5-1 17t0 16q2 7 12 17t13 13q10 14 23 47t16 54q0 4-2 14t-1 15q1 4 5 10t10 13 10 11q4 7 9 17t8 20 9 20 11 18 15 13 20 6 26-3l0-1q21 5 28 5h425q41 0 63-32t10-72l-152-506q-20-66-40-85t-72-20h-485q-15 0-21-8-6-9-1-24 14-39 81-39h515q16 0 31 9t19 23l168 550q4 13 3 32 21-8 33-24z m-594-1q-2-7 1-12t11-6h339q8 0 15 6t9 12l12 36q2 7-2 12t-11 6h-339q-7 0-14-6t-9-12z m-46-143q-3-7 1-12t11-6h339q7 0 14 6t10 12l11 36q3 7-1 13t-11 5h-339q-8 0-14-5t-10-13z" horiz-adv-x="928.6" />
<glyph glyph-name="checkin" unicode="&#xe802;" d="M429 493q0 59-42 101t-101 42-101-42-42-101 42-101 101-42 101 42 42 101z m142 0q0-61-18-100l-203-432q-9-18-27-29t-37-11-38 11-26 29l-204 432q-18 39-18 100 0 118 84 202t202 84 202-84 83-202z" horiz-adv-x="571.4" />
<glyph glyph-name="reply" unicode="&#xe803;" d="M1000 350q0-97-67-179t-182-130-251-48q-39 0-81 4-110-97-257-135-27-8-63-12-10-1-17 5t-10 16v1q-2 2 0 6t1 6 2 5l4 5t4 5 4 5q4 5 17 19t20 22 17 22 18 28 15 33 15 42q-88 50-138 123t-51 157q0 73 40 139t106 114 160 76 194 28q136 0 251-48t182-130 67-179z" horiz-adv-x="1000" />
<glyph glyph-name="like" unicode="&#xe804;" d="M143 100q0 15-11 25t-25 11q-15 0-25-11t-11-25q0-15 11-25t25-11q15 0 25 11t11 25z m89 286v-357q0-15-10-25t-26-11h-160q-15 0-25 11t-11 25v357q0 14 11 25t25 10h160q15 0 26-10t10-25z m661 0q0-48-31-83 9-25 9-43 1-42-24-76 9-32 0-66-9-31-31-52 5-63-27-101-36-43-110-44h-72q-37 0-80 9t-68 16-67 22q-69 24-88 25-15 0-26 11t-10 25v357q0 14 10 25t24 11q13 1 42 33t57 67q38 49 56 67 10 10 17 27t10 27 8 34q4 22 7 34t11 29 18 28q11 11 26 11 25 0 46-6t33-15 22-22 14-26 7-27 2-26 1-21q0-21-6-43t-10-33-16-31q-1-4-5-10t-6-13-5-13h155q43 0 75-32t32-75z" horiz-adv-x="928.6" />
<glyph glyph-name="event" unicode="&#xe805;" d="M71-79h161v161h-161v-161z m197 0h178v161h-178v-161z m-197 197h161v178h-161v-178z m197 0h178v178h-178v-178z m-197 214h161v161h-161v-161z m411-411h179v161h-179v-161z m-214 411h178v161h-178v-161z m428-411h161v161h-161v-161z m-214 197h179v178h-179v-178z m-196 482v161q0 7-6 12t-12 6h-36q-7 0-12-6t-6-12v-161q0-7 6-13t12-5h36q7 0 12 5t6 13z m410-482h161v178h-161v-178z m-214 214h179v161h-179v-161z m214 0h161v161h-161v-161z m18 268v161q0 7-5 12t-13 6h-35q-8 0-13-6t-5-12v-161q0-7 5-13t13-5h35q8 0 13 5t5 13z m215 36v-715q0-29-22-50t-50-21h-786q-29 0-50 21t-21 50v715q0 29 21 50t50 21h72v54q0 37 26 63t63 26h36q37 0 63-26t26-63v-54h214v54q0 37 27 63t63 26h35q37 0 63-26t27-63v-54h71q29 0 50-21t22-50z" horiz-adv-x="928.6" />
<glyph glyph-name="repost" unicode="&#xe806;" d="M714 11q0-8-5-13t-13-5h-535q-5 0-8 1t-5 4-3 4-2 7 0 6v335h-107q-15 0-25 11t-11 25q0 13 8 23l179 214q11 12 27 12t28-12l178-214q9-10 9-23 0-15-11-25t-25-11h-107v-214h321q9 0 14-6l89-108q4-6 4-11z m357 232q0-14-8-23l-179-214q-11-13-27-13t-27 13l-179 214q-8 9-8 23 0 14 10 25t26 11h107v214h-322q-9 0-14 7l-89 107q-4 5-4 11 0 7 5 12t13 6h536q4 0 7-1t5-4 3-5 2-6 1-7v-334h107q14 0 25-11t10-25z" horiz-adv-x="1071.4" />
<glyph glyph-name="jam" unicode="&#xe807;" d="M857 725v-625q0-28-19-50t-48-33-58-18-53-6-54 6-58 18-48 33-19 50 19 50 48 33 58 18 54 6q58 0 107-22v300l-429-132v-396q0-28-19-50t-48-33-58-18-53-6-54 6-58 18-48 33-19 50 19 50 48 34 58 17 54 6q58 0 107-21v539q0 17 10 32t28 19l464 143q7 3 16 3 22 0 38-16t15-38z" horiz-adv-x="857.1" />
<glyph glyph-name="rsvp" unicode="&#xe808;" d="M268 243q0 37-26 63t-63 26-63-26-27-63 27-63 63-26 63 26 26 63z m20 178h567l-50 200q-1 4-8 9t-11 6h-429q-5 0-12-6t-7-9z m766-178q0 37-27 63t-63 26-63-26-26-63 26-63 63-26 63 26 27 63z m89 53v-214q0-8-5-13t-13-5h-54v-71q0-45-31-76t-76-31-76 31-31 76v71h-571v-71q0-45-32-76t-75-31-76 31-32 76v71h-53q-8 0-13 5t-5 13v214q0 52 37 89t88 36h16l58 234q13 53 58 88t100 36h429q54 0 100-36t58-88l58-234h16q52 0 88-36t37-89z" horiz-adv-x="1142.9" />
<glyph glyph-name="video" unicode="&#xe809;" d="M714 350q0 21-16 30l-286 179q-17 11-36 1-19-10-19-31v-358q0-21 19-31 9-4 17-4 11 0 19 5l286 179q16 9 16 30z m286 0q0-54-1-84t-4-76-13-82q-9-41-38-69t-70-32q-123-14-374-14t-374 14q-40 4-70 32t-39 69q-7 36-12 82t-4 76-1 84 1 84 4 76 13 82q9 41 38 69t70 32q123 14 374 14t374-14q40-4 70-32t39-69q8-36 12-82t4-76 1-84z" horiz-adv-x="1000" />
<glyph glyph-name="note" unicode="&#xe80a;" d="M904 622q-37-54-90-93 0-8 0-23 0-73-21-145t-64-139-103-117-144-82-181-30q-151 0-276 81 19-2 43-2 126 0 224 77-59 1-105 36t-64 89q19-3 34-3 24 0 48 6-63 13-104 62t-41 115v2q38-21 82-23-37 25-59 64t-22 86q0 49 25 91 68-83 164-133t208-55q-5 21-5 41 0 75 53 127t127 53q79 0 132-57 61 12 114 44-20-64-79-100 52 6 104 28z" horiz-adv-x="928.6" />
<glyph glyph-name="article" unicode="&#xe80b;" d="M819 584q8-7 16-20h-264v264q13-8 21-16z m-265-91h303v-589q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h446v-304q0-22 16-38t38-15z m89-411v36q0 8-5 13t-13 5h-393q-8 0-13-5t-5-13v-36q0-8 5-13t13-5h393q8 0 13 5t5 13z m0 143v36q0 8-5 13t-13 5h-393q-8 0-13-5t-5-13v-36q0-8 5-13t13-5h393q8 0 13 5t5 13z m0 143v36q0 7-5 12t-13 5h-393q-8 0-13-5t-5-12v-36q0-8 5-13t13-5h393q8 0 13 5t5 13z" horiz-adv-x="857.1" />
<glyph glyph-name="step" unicode="&#xe80c;" d="M300 825c-55 0-100-45-100-100s45-100 100-100c55 0 100 45 100 100s-45 100-100 100z m-287-200l25-100c12-50 42-50 79-50l83 0c30-50 16-124 25-200l-45 0c-50 0-130-50-80-150l75-150c50-100 125-25 100 25l-75 150c-12 25 13 25 25 25l123 0s60-131 129-221c26-34 55-79 90-79 25 0 68 39 23 93-86 102-140 207-140 257 0 58-10 181-25 250l75 0c24-49 63-125 63-125 27-48 87-44 87 0 0 6 0 19-7 34l-80 166c-6 11-13 25-50 25l-388 0-37 125c-15 50-88 50-88 0 0-25 9-55 13-75z" horiz-adv-x="650" />
<glyph glyph-name="sleep" unicode="&#xe80d;" d="M143 279h964q15 0 25-11t11-25v-250h-143v143h-857v-143h-143v678q0 15 11 26t25 10h71q15 0 25-10t11-26v-392z m321 178q0 59-42 101t-101 42-101-42-41-101 41-101 101-42 101 42 42 101z m679-143v36q0 89-63 152t-151 62h-393q-15 0-25-10t-11-25v-215h643z" horiz-adv-x="1142.9" />
<glyph glyph-name="review" unicode="&#xe80e;" d="M3 436q-12 31 16 50t91 18h242l73 222 1 1q14 45 33 68t40 23v-168l-80-240h-251l203-145-21-65-57-173 206 147v-115l-192-137-3-2q-52-39-88-39-32 0-40 32t11 92l1 3 73 221-189 135-3 3-3 1q-51 37-63 68z" horiz-adv-x="498.5" />
</font>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
font/arcology-icons.ttf Normal file

Binary file not shown.

BIN
font/arcology-icons.woff Normal file

Binary file not shown.

BIN
font/arcology-icons.woff2 Normal file

Binary file not shown.

BIN
go.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

3
htaccess Normal file
View File

@ -0,0 +1,3 @@
RewriteEngine on
RewriteBase /
RewriteRule ^.well-known/(host-meta|webfinger).* https://fed.brid.gy/$0 [redirect=302,last]

View File

@ -54,8 +54,8 @@ href=\"http://notes.whatthefuck.computer/index.xml\">RSS</a>.</p>"
:group 'mfblog)
(defcustom mfblog:publish-config '(
:rss-image-url "https://pbs.twimg.com/profile_images/658557342846353410/pqUcaLqV_400x400.jpg"
:html-link-home "http://notes.whatthefuck.computer/"
:rss-image-url "http://notes.whatthefuck.computer/~rrix/25ZLKRlf.jpg"
:html-link-home "http://notes.whatthefuck.computer"
:html-link-use-abs-url t
:rss-extension "xml"
:select-tags ("EXPORT")
@ -71,15 +71,20 @@ href=\"http://notes.whatthefuck.computer/index.xml\">RSS</a>.</p>"
(setq mfblog:postlist nil)
(message "Generating notes files")
(with-current-buffer (find-file-noselect "~/Projects/notes/index.org")
(goto-char (point-min))
(org-sort-entries nil ?T)
;; (org-map-entries 'mfblog:index-posts "EXPORT" 'file)
(org-map-entries 'mfblog:entry-to-page "EXPORT" 'file))
(let ((org-publish-project-alist
(list (append '("notes_rss")
(mfblog:plist-merge '(:base-directory "~/Projects/notes" :base-extension "org" :publishing-function (org-rss-publish-to-rss) :exclude ".*" :include ("index.org"))
mfblog:publish-config))
(append '("notes_other")
(mfblog:plist-merge '(:base-directory "/var/tmp/mfblog" :base-extension "js\\|html\\|jpg\\|gif\\|png" :publishing-function (org-publish-attachment))
(mfblog:plist-merge '(:base-directory "/var/tmp/mfblog" :base-extension "JPG\\|js\\|html\\|jpg\\|gif\\|png" :publishing-function (org-publish-attachment))
mfblog:publish-config)))))
(copy-file "~/Projects/notes/webmention.js" "/var/tmp/mfblog/webmention.js" t)
(copy-file "~/Projects/notes/go.png" "/var/tmp/mfblog/go.png" t)
(copy-file "~/Projects/notes/favicon.gif" "/var/tmp/mfblog/favicon.gif" t)
(org-publish "notes_rss")
(mfblog:make-index)
(org-publish "notes_other")))
@ -90,31 +95,32 @@ href=\"http://notes.whatthefuck.computer/index.xml\">RSS</a>.</p>"
(let* ((date (org-entry-get (point) "CLOSED"))
(date (org-time-string-to-seconds date))
(base-url (plist-get mfblog:publish-config :html-link-home))
(url (format "%s%s-note.html" base-url date))
(url (format "%s/%s-note.html" base-url date))
(syn-twitter (org-entry-get (point) "SYN-TWITTER"))
(syn-facebook (org-entry-get (point) "SYN-FACEBOOK")))
(syn-facebook (org-entry-get (point) "SYN-FACEBOOK"))
(realpoint (point)))
(unless syn-twitter
(let* ((url-request-data (format "source=%s&target=http://brid.gy/publish/twitter" url))
(url-request-method "POST")
(buf (url-retrieve-synchronously "https://brid.gy/publish/webmention")))
(with-current-buffer buf
(goto-char url-http-end-of-headers)
(let* ((body (json-read))
(url (assoc 'url body)))
(when url
(message "Published to %s" (cdr url))
(org-entry-put "SYN-TWITTER" (point) (cdr url)))))))
(org-entry-put realpoint "SYN-TWITTER"
(with-current-buffer buf
(goto-char url-http-end-of-headers)
(let* ((body (json-read))
(url (assoc 'url body)))
(when url
(cdr url)))))))
(unless syn-facebook
(let* ((url-request-data (format "source=%s&target=http://brid.gy/publish/facebook" url))
(url-request-method "POST")
(buf (url-retrieve-synchronously "https://brid.gy/publish/webmention")))
(with-current-buffer buf
(goto-char url-http-end-of-headers)
(let* ((body (json-read))
(url (assoc 'url body)))
(when url
(message "Published to %s" (cdr url))
(org-entry-put "SYN-FACEBOOK" (point) (cdr url)))))))))
(org-entry-put realpoint "SYN-FACEBOOK"
(with-current-buffer buf
(goto-char url-http-end-of-headers)
(let* ((body (json-read))
(url (assoc 'url body)))
(when url
(cdr url)))))))))
(defun mfblog:heading-to-html (heading)
"HTMLize the given HEADING, cleaning up crap and generating in-reply-to URLs."
@ -131,10 +137,10 @@ href=\"http://notes.whatthefuck.computer/index.xml\">RSS</a>.</p>"
(replace-regexp "<a href=\"https://twitter" "<a class=\"u-in-reply-to\" href=\"https://twitter")
(buffer-string)))))
;;; XXX: Get id from the entry???
(defun mfblog:to-html (id)
(defun mfblog:to-html ()
"Convert the heading at point to HTML, sprinkling in ID where necessary."
(let* ((location (first (org-property-values "LOCATION")))
(let* ((id (org-id-get-create))
(location (first (org-property-values "LOCATION")))
(attach-dir (org-attach-dir))
(file-list (if attach-dir
(org-attach-file-list attach-dir)
@ -163,7 +169,7 @@ href=\"http://notes.whatthefuck.computer/index.xml\">RSS</a>.</p>"
(filename (format "%s-note.html" pubdate))
(fullpath (format "/var/tmp/mfblog/%s" filename))
(title (mfblog:heading-to-html (org-get-heading)))
(content (mfblog:to-html id))
(content (mfblog:to-html))
(base-url (plist-get mfblog:publish-config :html-link-home))
(full-url (concat base-url "/" filename))
(syn-twitter-url (or (org-entry-get (point) "SYN-TWITTER") ""))
@ -174,6 +180,7 @@ href=\"http://notes.whatthefuck.computer/index.xml\">RSS</a>.</p>"
(syn-facebook-href (if (> (length syn-facebook-url) 0)
(format "<a rel=\"syndication\" href=\"%s\">On Facebook</a>" syn-facebook-url)
"")))
(org-entry-put (point) "RSS_PERMALINK" filename)
(with-current-buffer (find-file-noselect fullpath)
(erase-buffer)
(insert-file mfblog:template-file)
@ -195,6 +202,23 @@ href=\"http://notes.whatthefuck.computer/index.xml\">RSS</a>.</p>"
(list pubdate fullpath title content filename)
pubdate)))))
(defun mfblog:index-posts ()
"Create an index of all the posts to speed up generation of index.html"
(save-window-excursion
(let* ((pubdate (org-entry-get (point) "CLOSED"))
(pubdate (org-time-string-to-seconds pubdate))
(id (org-id-get-create))
(filename (format "%s-note.html" pubdate))
(fullpath (format "/var/tmp/mfblog/%s" filename)))
(unless (alist-get pubdate 'mfblog:postlist)
(let* ((title-html (mfblog:heading-to-html (org-get-heading)))
(title-txt (mfblog:heading-to-txt (org-get-heading)))
(base-url (plist-get mfblog:publish-config :html-link-home))
(full-url (concat base-url "/" filename)))
(add-to-ordered-list 'mfblog:postlist
(list fullpath title-html title-text filename full-url)
pubdate))))))
(defun mfblog:plist-merge (&rest plists)
"Merge a bunch of PLISTS together."
(if plists
@ -227,11 +251,14 @@ href=\"http://notes.whatthefuck.computer/index.xml\">RSS</a>.</p>"
(goto-char (point-min))
(replace-regexp "{{content}}" all-content)
(goto-char (point-min))
(replace-regexp "{{url}}" (concat (plist-get mfblog:publish-config :html-link-home) "/"))
(goto-char (point-min))
(replace-regexp "{{twitter}}" "https://twitter.com/rrrrrrrix")
(goto-char (point-min))
(replace-regexp "{{facebook}}" "https://facebook.com/rjrix")
(goto-char (point-min))
(replace-regexp "{{title}}" "Ryan's Shortnotes")
(write-file "/var/tmp/mfblog/index.html"))))
(add-to-list 'org-capture-templates '("_" "Published shortnote" entry (file "/home/rrix/Projects/notes/index.org")
"* %? :EXPORT:\n%U\n%a\n") t)
(provide 'mfblog)
;;; mfblog.el ends here

BIN
rix_green.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -8,90 +8,102 @@
<title>{{title}}</title>
<meta name="generator" content="Org-mode" />
<meta name="author" content="Ryan Rix" />
<link rel="alternate" type="application/atom+xml"
href="https://granary.io/url?url=http://notes.whatthefuck.computer/&input=html&output=atom&hub=https://bridgy-fed.superfeedr.com" />
<link rel="hub" href="https://bridgy-fed.superfeedr.com/"/>
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
pre.src-sh:before { content: 'sh'; }
pre.src-bash:before { content: 'sh'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-R:before { content: 'R'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-java:before { content: 'Java'; }
pre.src-sql:before { content: 'SQL'; }
<!--/*--><![CDATA[/*><!--*/
ul.webmentions li { display: flex; align-items: center; }
ul.webmentions li img { border-radius: 50%; }
ul.webmentions li div { flex: auto; }
ul.webmentions li > a { width: 350px;
height: 75px;
width: 75px;
background: url("/go.png");
background-size: 100%;
text-indent: -9999px;}
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
pre.src-sh:before { content: 'sh'; }
pre.src-bash:before { content: 'sh'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-R:before { content: 'R'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-java:before { content: 'Java'; }
pre.src-sql:before { content: 'SQL'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
/*]]>*/-->
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
/*]]>*/-->
</style>
<link rel="stylesheet" href="http://whatthefuck.computer/media/css/main.css" />
<link rel="feed" href="http://notes.whatthefuck.computer/index.xml" />
@ -157,27 +169,22 @@
<li><a href="{{facebook}}">On Facebook</a></li>
</ul>
</p>
<ul class="webmentions links" id="http://{{url}}">
<ul class="webmentions links" id="{{url}}">
<li>No webmentions were found.</li>
</ul>
<div id="postamble" class="status">
<div class="h-card p-author">
<div style="display: inline-block; width: 20%">
<img style="width: 100%;" class="u-photo" src="https://pbs.twimg.com/profile_images/658557342846353410/pqUcaLqV_400x400.jpg"/>
<img style="width: 100%;" class="u-photo" src="/rix_green.png"/>
</div>
<div style="display: inline-block; width: 75%" class="p-note">
<span class="p-name">Ryan Rix</span> is a computer infrastructure fanboy who
dabbles in decentralized systems. Reach him
on <a href="http://twitter.com/rrrrrrrix" rel="me" class="u-url">twitter as
@rrrrrrrix</a>, via email to <a href="mailto:ryan@whatthefuck.computer"
class="u-email" rel="me">ryan@whatthefuck.computer</a> or
on <a rel="me" href="https://facebook.com/rjrix">Facebook</a> or on Matrix
as <span rel="me" class="u-uid">@rrix:whatthefuck.computer</span>.
<span class="p-name">Ryan Rix</span> is a privacy rights advocate and net-art wannabe. Reach them on <a href="https://cybre.space/@rrix" class="u-url">the Fediverse as @rrix@cybre.space</a>, <a href="http://twitter.com/rrrrrrrix" rel="me" class="u-url">twitter as @rrrrrrrix</a>, via email to <a href="mailto:ryan@whatthefuck.computer" class="u-email" rel="me">ryan@whatthefuck.computer</a> or on <a rel="me" class="u-url" href="https://facebook.com/rjrix">Facebook</a> or on Matrix as <span rel="me" class="u-uid">@rrix:whatthefuck.computer</span>.
</div>
</div>
</div>
<a href="https://brid.gy/publish/facebook"></a>
<a href="https://brid.gy/publish/twitter"></a>
<a href="https://fed.brid.gy"></a>
<script src="/webmention.js"></script>
</body>
</html>

116
templates/default.html Normal file
View File

@ -0,0 +1,116 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2015-12-30 Wed 02:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{title}}</title>
<meta name="generator" content="Org-mode" />
<meta name="author" content="Ryan Rix" />
<link rel="stylesheet" href="/css/notes.css" />
<link rel="stylesheet" href="/css/arcology-icons.css" />
<link rel="pingback" href="https://webmention.io/notes.whatthefuck.computer/xmlrpc" />
<link rel="webmention" href="https://webmention.io/notes.whatthefuck.computer/webmention" />
<link rel="alternate" type="application/atom+xml" href="/rss.xml"/>
<link rel="hub" href="https://bridgy-fed.superfeedr.com"/>
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2013 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License (GNU GPL) as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any later
version. The code is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GPL for
more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
</head>
<body>
<a href="/">&#127968; Go home.</a>
<div class="wrap h-entry">
<h1 class="p-name title">{{title-html}}</h1>
<p>Published on {{dt-published}}</p>
<div class="e-content">
{{content}}
</div>
<p>
Respond to this note:
<ul>
<li><a class="u-syndication" href="{{twitter}}">On Twitter</a></li>
<li><a class="u-syndication" href="{{facebook}}">On Facebook</a></li>
</ul>
</p>
<ul class="webmentions links" id="{{url}}">
<li>No webmentions were found.</li>
</ul>
<div id="postamble" class="status">
<div class="h-card p-author">
<div style="display: inline-block; width: 20%">
<img style="width: 100%;" class="u-photo" src="/rix_green.png"/>
</div>
<div style="display: inline-block; width: 75%" class="p-note">
<span class="p-name">Ryan Rix</span> is a privacy rights advocate and net-art wannabe. Reach them on <a href="https://cybre.space/@rrix" class="u-url">the Fediverse as @rrix@cybre.space</a>, <a href="http://twitter.com/rrrrrrrix" rel="me" class="u-url">twitter as @rrrrrrrix</a>, via email to <a href="mailto:ryan@whatthefuck.computer" class="u-email" rel="me">ryan@whatthefuck.computer</a> or on <a rel="me" class="u-url" href="https://facebook.com/rjrix">Facebook</a> or on Matrix as <span rel="me" class="u-uid">@rrix:whatthefuck.computer</span>.
</div>
<div style="display: inline-block; width: 100%;">
<a href="/article.html"><i class="icon-article"></i></a>&nbsp;
<a href="/note.html"><i class="icon-note"></i></a>&nbsp;
<a href="/photo.html"><i class="icon-photo"></i></a>&nbsp;
<a href="/video.html"><i class="icon-video"></i></a>&nbsp;
<a href="/checkin.html"><i class="icon-checkin"></i></a>&nbsp;
<a href="/read.html"><i class="icon-read"></i></a>&nbsp;
<a href="/repost.html"><i class="icon-repost"></i></a>&nbsp;
<a href="/like.html"><i class="icon-like"></i></a>&nbsp;
<a href="/reply.html"><i class="icon-reply"></i></a>&nbsp;
<a href="/step.html"><i class="icon-step"></i></a>&nbsp;
<a href="/sleep.html"><i class="icon-sleep"></i></a>&nbsp;
<a href="/jam.html"><i class="icon-jam"></i></a>&nbsp;
<a href="/event.html"><i class="icon-event"></i></a>&nbsp;
<a href="/rsvp.html"><i class="icon-rsvp"></i></a>&nbsp;
<a href="/review.html"><i class="icon-review"></i></a>&nbsp;
</div>
</div>
</div>
<a href="https://brid.gy/publish/facebook"></a>
<a href="https://brid.gy/publish/twitter"></a>
<a href="https://fed.brid.gy"></a>
<script src="/webmention.js"></script>
</div>
</body>
</html>

131
templates/index.html Normal file
View File

@ -0,0 +1,131 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{title}}</title>
<meta name="generator" content="Org-mode" />
<meta name="author" content="Ryan Rix" />
<link rel="stylesheet" href="/css/notes.css" />
<link rel="stylesheet" href="/css/arcology-icons.css" />
<link rel="pingback" href="https://webmention.io/notes.whatthefuck.computer/xmlrpc" />
<link rel="webmention" href="https://webmention.io/notes.whatthefuck.computer/webmention" />
<link rel="alternate" type="application/atom+xml" href="/rss.xml"/>
<link rel="hub" href="https://bridgy-fed.superfeedr.com/"/>
<script type="text/javascript">
/* @licstart The following is the entire license notice for the JavaScript code in this
tag.
Copyright (C) 2012-2013 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License (GNU GPL) as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any later
version. The code is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GPL for
more details.
As additional permission under GNU GPL version 3 section 7, you may distribute
non-source (e.g., minimized or compacted) forms of that code without the copy of the GNU
GPL normally required by section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice for the JavaScript code in this tag. */
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
</head>
<body>
<div class="wrap h-feed">
<h1 class="p-name title">{{title}}</h1>
<p>
I'm Ryan Rix and I am: an intolerable Emacs nerd; a privacy activist; computer
infrastructure wonk; public infrastructure wonk-wannabe; learning elixir; a blue smoke
summoner; optimistic; empathetic; on sabbatical; living in Seattle.
</p>
<p>
After a little over five <span title="ridiculous, silly, rewarding, terrifying">
crazy</span> years as an engineer at Uber, I'm <a href="/1564341240.0-note.html">on
a sabbatical</a>, traveling and dusting off side-projects and habits that I've neglected.
</p>
<p>
I build decentralized infrastructure in my free time. I build stupid Emacs libraries
and applications. I take public transit. I <a href="http://computeranonymous.org/">computer :(</a>.
Some may say that I <a href="http://fedoraproject.org/wiki/User:Rrix">open source</a>,
too. I buy stupid domains and use them for bad jokes. My dirty secret is that all of my
other jokes are based on old <a href="http://youtu.be/pbKVLhhflEI">Liam Lynch videos</a>.
</p>
<p>
In past lives, I've been <a href="http://doc.rix.si/work/uber.html">an SRE and Privacy
Engineer</a>, <a href="http://doc.rix.si/work/storehouse.html">storer of
stories</a>, <a href="http://doc.rix.si/projects/heatsynclabs">hackerspace board
member</a>, javascript nerd and <a href="http://doc.rix.si/work/madesolid.html">3D
printer botmaster</a>. I am still some of these things.
</p>
<p>
I post various post types: <a href="/article.html">long-form articles</a>,
<a href="/photo.html">photos</a>, <a href="/checkin.html">Check-ins</a>,
<a href="/jam.html">music I like</a>, <a href="/read.html">things I've
read</a>, <a href="/note.html">Twitter-style
notes</a>, <a href="/reply.html">replies to posts and
tweets</a>, <a href="/like.html">things I like</a>,
and <a href="/repost.html">things I've reposted or retweeted</a>. I'm going to be
adding more and more post types as I integrate them in
to <a href="http://doc.rix.si/projects/arcology.html">Arcology</a>, my
self-sufficient media platform.
</p>
{{content}}
<div id="postamble" class="status">
<div class="h-card p-author">
<div style="display: inline-block; width: 20%">
<img style="width: 100%;" class="u-photo" src="/rix_green.png"/>
</div>
<div style="display: inline-block; width: 75%" class="p-note">
<span class="p-name">Ryan Rix</span> is a privacy rights advocate and net-art wannabe. Reach them on <a href="https://cybre.space/@rrix" class="u-url">the Fediverse as @rrix@cybre.space</a>, <a href="http://twitter.com/rrrrrrrix" rel="me" class="u-url">twitter as @rrrrrrrix</a>, via email to <a href="mailto:ryan@whatthefuck.computer" class="u-email" rel="me">ryan@whatthefuck.computer</a> or on <a rel="me" class="u-url" href="https://facebook.com/rjrix">Facebook</a> or on Matrix as <span rel="me" class="u-uid">@rrix:whatthefuck.computer</span>.
</div>
<div style="display: inline-block; width: 100%;">
<a href="/article.html"><i class="icon-article"></i></a>&nbsp;
<a href="/note.html"><i class="icon-note"></i></a>&nbsp;
<a href="/photo.html"><i class="icon-photo"></i></a>&nbsp;
<a href="/video.html"><i class="icon-video"></i></a>&nbsp;
<a href="/checkin.html"><i class="icon-checkin"></i></a>&nbsp;
<a href="/read.html"><i class="icon-read"></i></a>&nbsp;
<a href="/repost.html"><i class="icon-repost"></i></a>&nbsp;
<a href="/like.html"><i class="icon-like"></i></a>&nbsp;
<a href="/reply.html"><i class="icon-reply"></i></a>&nbsp;
<a href="/step.html"><i class="icon-step"></i></a>&nbsp;
<a href="/sleep.html"><i class="icon-sleep"></i></a>&nbsp;
<a href="/jam.html"><i class="icon-jam"></i></a>&nbsp;
<a href="/event.html"><i class="icon-event"></i></a>&nbsp;
<a href="/rsvp.html"><i class="icon-rsvp"></i></a>&nbsp;
<a href="/review.html"><i class="icon-review"></i></a>&nbsp;
</div>
</div>
</div>
</div>
<a href="https://brid.gy/publish/facebook"></a>
<a href="https://brid.gy/publish/twitter"></a>
<a href="https://fed.brid.gy"></a>
<script src="/webmention.js"></script>
</body>
</html>

115
templates/note.html Normal file
View File

@ -0,0 +1,115 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2015-12-30 Wed 02:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{title}}</title>
<meta name="generator" content="Org-mode" />
<meta name="author" content="Ryan Rix" />
<link rel="stylesheet" href="/css/notes.css" />
<link rel="stylesheet" href="/css/arcology-icons.css" />
<link rel="pingback" href="https://webmention.io/notes.whatthefuck.computer/xmlrpc" />
<link rel="webmention" href="https://webmention.io/notes.whatthefuck.computer/webmention" />
<link rel="alternate" type="application/atom+xml" href="/rss.xml"/>
<link rel="hub" href="https://bridgy-fed.superfeedr.com/"/>
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2013 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the 100 6167 100 6167 0 0 25996 0 --:--:-- --:--:-- --:--:-- 26131
GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
</head>
<body>
<a href="/">&#127968; Go home.</a>
<div class="wrap h-entry">
<h1 class="p-name title">{{title-html}}</h1>
<p>Published on {{dt-published}}</p>
{{content}}
<p>
Respond to this note:
<ul>
<li><a class="u-syndication" href="{{twitter}}">On Twitter</a></li>
<li><a class="u-syndication" href="{{facebook}}">On Facebook</a></li>
</ul>
</p>
<ul class="webmentions links" id="{{url}}">
<li>No webmentions were found.</li>
</ul>
<div id="postamble" class="status">
<div class="h-card p-author">
<div style="display: inline-block; width: 20%">
<img style="width: 100%;" class="u-photo" src="/rix_green.png"/>
</div>
<div style="display: inline-block; width: 75%" class="p-note">
<span class="p-name">Ryan Rix</span> is a privacy rights advocate and net-art wannabe. Reach them on <a href="https://cybre.space/@rrix" class="u-url">the Fediverse as @rrix@cybre.space</a>, <a href="http://twitter.com/rrrrrrrix" rel="me" class="u-url">twitter as @rrrrrrrix</a>, via email to <a href="mailto:ryan@whatthefuck.computer" class="u-email" rel="me">ryan@whatthefuck.computer</a> or on <a rel="me" class="u-url" href="https://facebook.com/rjrix">Facebook</a> or on Matrix as <span rel="me" class="u-uid">@rrix:whatthefuck.computer</span>.
</div>
<div style="display: inline-block; width: 100%;">
<a href="/article.html"><i class="icon-article"></i></a>&nbsp;
<a href="/note.html"><i class="icon-note"></i></a>&nbsp;
<a href="/photo.html"><i class="icon-photo"></i></a>&nbsp;
<a href="/video.html"><i class="icon-video"></i></a>&nbsp;
<a href="/checkin.html"><i class="icon-checkin"></i></a>&nbsp;
<a href="/read.html"><i class="icon-read"></i></a>&nbsp;
<a href="/repost.html"><i class="icon-repost"></i></a>&nbsp;
<a href="/like.html"><i class="icon-like"></i></a>&nbsp;
<a href="/reply.html"><i class="icon-reply"></i></a>&nbsp;
<a href="/step.html"><i class="icon-step"></i></a>&nbsp;
<a href="/sleep.html"><i class="icon-sleep"></i></a>&nbsp;
<a href="/jam.html"><i class="icon-jam"></i></a>&nbsp;
<a href="/event.html"><i class="icon-event"></i></a>&nbsp;
<a href="/rsvp.html"><i class="icon-rsvp"></i></a>&nbsp;
<a href="/review.html"><i class="icon-review"></i></a>&nbsp;
</div>
</div>
</div>
<a href="https://brid.gy/publish/facebook"></a>
<a href="https://brid.gy/publish/twitter"></a>
<a href="https://fed.brid.gy"></a>
<script src="/webmention.js"></script>
</div>
</body>
</html>

115
templates/reply.html Normal file
View File

@ -0,0 +1,115 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2015-12-30 Wed 02:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{title}}</title>
<meta name="generator" content="Org-mode" />
<meta name="author" content="Ryan Rix" />
<link rel="stylesheet" href="/css/notes.css" />
<link rel="stylesheet" href="/css/arcology-icons.css" />
<link rel="pingback" href="https://webmention.io/notes.whatthefuck.computer/xmlrpc" />
<link rel="webmention" href="https://webmention.io/notes.whatthefuck.computer/webmention" />
<link rel="alternate" type="application/atom+xml" href="/rss.xml"/>
<link rel="hub" href="https://switchboard.p3k.io/"/>
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2013 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the 100 6167 100 6167 0 0 25996 0 --:--:-- --:--:-- --:--:-- 26131
GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
</head>
<body>
<a href="/">&#127968; Go home.</a>
<div class="wrap h-entry">
<h1 class="p-name title">{{title-html}}</h1>
<p>Published on {{dt-published}}</p>
{{content}}
<p>
Respond to this note:
<ul>
<li><a class="u-syndication" href="{{twitter}}">On Twitter</a></li>
<li><a class="u-syndication" href="{{facebook}}">On Facebook</a></li>
</ul>
</p>
<ul class="webmentions links" id="{{url}}">
<li>No webmentions were found.</li>
</ul>
<div id="postamble" class="status">
<div class="h-card p-author">
<div style="display: inline-block; width: 20%">
<img style="width: 100%;" class="u-photo" src="/rix_green.png"/>
</div>
<div style="display: inline-block; width: 75%" class="p-note">
<span class="p-name">Ryan Rix</span> is a privacy rights advocate and net-art wannabe. Reach them on <a href="https://cybre.space/@rrix" class="u-url">the Fediverse as @rrix@cybre.space</a>, <a href="http://twitter.com/rrrrrrrix" rel="me" class="u-url">twitter as @rrrrrrrix</a>, via email to <a href="mailto:ryan@whatthefuck.computer" class="u-email" rel="me">ryan@whatthefuck.computer</a> or on <a rel="me" class="u-url" href="https://facebook.com/rjrix">Facebook</a> or on Matrix as <span rel="me" class="u-uid">@rrix:whatthefuck.computer</span>.
</div>
<div style="display: inline-block; width: 100%;">
<a href="/article.html"><i class="icon-article"></i></a>&nbsp;
<a href="/note.html"><i class="icon-note"></i></a>&nbsp;
<a href="/photo.html"><i class="icon-photo"></i></a>&nbsp;
<a href="/video.html"><i class="icon-video"></i></a>&nbsp;
<a href="/checkin.html"><i class="icon-checkin"></i></a>&nbsp;
<a href="/read.html"><i class="icon-read"></i></a>&nbsp;
<a href="/repost.html"><i class="icon-repost"></i></a>&nbsp;
<a href="/like.html"><i class="icon-like"></i></a>&nbsp;
<a href="/reply.html"><i class="icon-reply"></i></a>&nbsp;
<a href="/step.html"><i class="icon-step"></i></a>&nbsp;
<a href="/sleep.html"><i class="icon-sleep"></i></a>&nbsp;
<a href="/jam.html"><i class="icon-jam"></i></a>&nbsp;
<a href="/event.html"><i class="icon-event"></i></a>&nbsp;
<a href="/rsvp.html"><i class="icon-rsvp"></i></a>&nbsp;
<a href="/review.html"><i class="icon-review"></i></a>&nbsp;
</div>
</div>
</div>
<a href="https://brid.gy/publish/facebook"></a>
<a href="https://brid.gy/publish/twitter"></a>
<a href="https://fed.brid.gy"></a>
<script src="/webmention.js"></script>
</div>
</body>
</html>

116
templates/review.html Normal file
View File

@ -0,0 +1,116 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2015-12-30 Wed 02:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{title}}</title>
<meta name="generator" content="Org-mode" />
<meta name="author" content="Ryan Rix" />
<link rel="stylesheet" href="/css/notes.css" />
<link rel="stylesheet" href="/css/arcology-icons.css" />
<link rel="pingback" href="https://webmention.io/notes.whatthefuck.computer/xmlrpc" />
<link rel="webmention" href="https://webmention.io/notes.whatthefuck.computer/webmention" />
<link rel="alternate" type="application/atom+xml" href="/rss.xml"/>
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2013 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
</head>
<body>
<a href="/">&#127968; Go home.</a>
<div class="wrap h-review">
<h1 class="p-name title">{{title-html}}</h1>
<p>Published on {{dt-published}}</p>
<div class="e-description">
{{content}}
</div>
<p>
Respond to this note:
<ul>
<li><a class="u-syndication" href="{{twitter}}">On Twitter</a></li>
<li><a class="u-syndication" href="{{facebook}}">On Facebook</a></li>
</ul>
</p>
<ul class="webmentions links" id="{{url}}">
<li>No webmentions were found.</li>
</ul>
<div id="postamble" class="status">
<div class="h-card p-reviewer">
<div style="display: inline-block; width: 20%">
<img style="width: 100%;" class="u-photo" src="/rix_green.png"/>
</div>
<div style="display: inline-block; width: 75%" class="p-note">
<span class="p-name">Ryan Rix</span> is a privacy rights advocate and net-art wannabe. Reach them on <a href="https://cybre.space/@rrix" class="u-url">the Fediverse as @rrix@cybre.space</a>, <a href="http://twitter.com/rrrrrrrix" rel="me" class="u-url">twitter as @rrrrrrrix</a>, via email to <a href="mailto:ryan@whatthefuck.computer" class="u-email" rel="me">ryan@whatthefuck.computer</a> or on <a rel="me" class="u-url" href="https://facebook.com/rjrix">Facebook</a> or on Matrix as <span rel="me" class="u-uid">@rrix:whatthefuck.computer</span>.
</div>
<div style="display: inline-block; width: 100%;">
<a href="/article.html"><i class="icon-article"></i></a>&nbsp;
<a href="/note.html"><i class="icon-note"></i></a>&nbsp;
<a href="/photo.html"><i class="icon-photo"></i></a>&nbsp;
<a href="/video.html"><i class="icon-video"></i></a>&nbsp;
<a href="/checkin.html"><i class="icon-checkin"></i></a>&nbsp;
<a href="/read.html"><i class="icon-read"></i></a>&nbsp;
<a href="/repost.html"><i class="icon-repost"></i></a>&nbsp;
<a href="/like.html"><i class="icon-like"></i></a>&nbsp;
<a href="/reply.html"><i class="icon-reply"></i></a>&nbsp;
<a href="/step.html"><i class="icon-step"></i></a>&nbsp;
<a href="/sleep.html"><i class="icon-sleep"></i></a>&nbsp;
<a href="/jam.html"><i class="icon-jam"></i></a>&nbsp;
<a href="/event.html"><i class="icon-event"></i></a>&nbsp;
<a href="/rsvp.html"><i class="icon-rsvp"></i></a>&nbsp;
<a href="/review.html"><i class="icon-review"></i></a>&nbsp;
</div>
</div>
</div>
<a href="https://brid.gy/publish/facebook"></a>
<a href="https://brid.gy/publish/twitter"></a>
<a href="https://fed.brid.gy"></a>
<script src="/webmention.js"></script>
</div>
</body>
</html>

View File

@ -17,7 +17,7 @@ webMention.preProcess = function () {
webMention.insertScript = function (i) {
var jsonpName = 'webMention.elements[' + i + '].postProcess'
var apiUrl = 'http://webmention.io/api/links?target=' + webMention.elements[i].slug + '&jsonp=' + jsonpName
var apiUrl = 'https://webmention.io/api/links?target=' + webMention.elements[i].slug + '&jsonp=' + jsonpName
var container = document.createElement('SCRIPT')
container.src = apiUrl
document.head.appendChild(container)
@ -41,8 +41,13 @@ webMention.generateItem = function (index, apiData, callback) {
var listItem = document.createElement('LI') // Create the list item
// Create the text of the post
var source = apiData.links[index].source || null
var content = apiData.links[index].data.content || null
var activity = apiData.links[index].activity || null
var sentence = activity && activity.sentence_html || null
var content = apiData.links[index].data.content || ""
var name = apiData.links[index].data.name || content || source
var name = apiData.links[index].data.name || content || source
sentence = sentence.replace("a post", "this post")
sentence = sentence.replace("a tweet", "this tweet")
if (apiData.links[index].data.author) {
var avatar = apiData.links[index].data.author.photo || null
@ -58,7 +63,15 @@ webMention.generateItem = function (index, apiData, callback) {
var authorLink = document.createElement('A')
authorLink.innerText = authorName
authorLink.href = authorUrl
var linkText = document.createTextNode(' ' + name)
var linkText = null;
if (content.length > 0) {
linkText = document.createElement('div')
linkText.innerHTML = content;
} else {
linkText = document.createElement('div')
linkText.innerHTML = sentence;
}
var linkContainer = document.createElement('DIV')
@ -80,11 +93,18 @@ webMention.generateItem = function (index, apiData, callback) {
}
webMention.listLinks = function (parentElement, apiData) {
for (var j = 0; j < apiData.links.length; j++) {
webMention.generateItem(j, apiData, function (listItem) {
parentElement.appendChild(listItem)
})
}
var links = apiData.links.sort(function(a, b) {
if(!a.data.published_ts) {return 1;}
if(!b.data.published_ts) {return -1;}
if (a.data.published_ts < b.data.published_ts) { return 1 };
if (a.data.published_ts == b.data.published_ts) { return 0 };
if (a.data.published_ts > b.data.published_ts) { return -1 };
});
for (var j = 0; j < links.length; j++) {
webMention.generateItem(j, apiData, function (listItem) {
parentElement.insertBefore(listItem, parentElement.firstChild);
})
}
}
webMention.showCount = function (parentElement, apiData) {
@ -107,8 +127,8 @@ webMention.hasClass = function (element, selector) {
var rclass = /[\t\r\n\f]/g
return element.nodeType === 1 && (' ' + element.className + ' ')
.replace(rclass, ' ')
.indexOf(className) >= 0
.replace(rclass, ' ')
.indexOf(className) >= 0
}
webMention.get()