Aim: run Quill locally, to write draft posts offline (and later maybe see if I can store drafts locally).

(I run MAMP PRO on my Mac, I also run a WordPress install locally, with all IndieWeb plugins enabled and a Sempress theme)

Quill: https://github.com/aaronpk/Quill

I downloaded, installed in http://localhost:8888/quill
The installation instructions mention using Composer to install a range of dependencies. I did not know what that was, so had to Google around to find out it is a tool to install php dependencies. I followed the instructions at https://getcomposer.org/download/ to install Composer on my Mac.
Then I could call the URL http://localhost:8888/quill/public/index.php ok.

However it doesn’t load images correctly and links don’t work as they are relative to http://localhost:8888/ and not http://localhost:8888/quill/public

Aaron, who created Quill, told me Quill expects to run as a root domain.
So: I added a host quill.test on port 80 in my MAMP set-up, with the /public as root folder. Now Quill loads fine and URLs work.

To get it to work right with mysql on my laptop I added a database called quill. I first had created new user, but that didn’t work. So I used an existing root user for that. I had to also run this sql query to create a table in the database that Quill uses.

After that it worked fine. Next up, thinking about how I’d like to change Quill, as an offline tool for me to prepare postings. Also want to experiment with using it to post to different blogs.

An attempt to a) map my info strategies better and b) map them to indieweb protocols, so I can c) map them to tooling / processes

Blogpostings I wrote over the years.

Why

Webmentions were shown as “Peter mentioned this on ruk.ca”, but that does not provide context for a reader to decide if they want to click to go there. So I want to display a part of the linked item, as a teaser. Years ago pingbacks were presented like that on my site.

What

Find out how webmentions are stored, and how they are presented. Change the presentation by displaying an excerpt.

How

It turned out that webmentions are actually stored in full (so the text of the linked item is available in my wordpress database). It was just that the template for how it got presented needed tweaking. There is also a character count limit, below which a mention is indeed shown as I like it. All this however isn’t done in the theme, but in a plugin, called Semantic Linkbacks and in a specific file: class-linkbacks-handler.php. Once I localised that, I could change what I needed.
So I

  1. changed the character count limit to 500
    // Mentions with content less than this length will be rendered inline.
    define( 'MAX_INLINE_MENTION_LENGTH', 500 );
  2. changed the template for a webmention in public static function get_comment_type_excerpts()
    It was 'mention'=> __( '%1$s mentioned %2$s on href="%3$s">%4$s., 'semantic-linkbacks' )
    I changed it to
    'mention'=> __( '%1$s mentioned %2$s on href="%3$s">%4$s: %5$s', 'semantic-linkbacks' )
    This adds a 5th parameter at the end. This will hold the excerpt.
  3. Then filled that template in, in function public static function comment_text_excerpt
    • After it sets the length of the webmention, stored in $text in $text_len I evaluated that to see if it is longer then the limit. If so it sets a delimiter $text_delim to that maximum, or else sets it to the actual length.
    • Then I create a text snippet from the start of the text to that delimiter $text_snip = substr($text, 0, $text_delim) and add a few dots to the end $text_snip .=" ...."
    • That snippet is then added as 5th parameter to a call of the template mentioned above $text = sprintf( $comment_type_excerpts[ $semantic_linkbacks_type ], get_comment_author_link( $comment->comment_ID ), $post_type, $url, $host, $text_snip);

ToDo

  • This tweak is to a plugin, so the next update will overwrite my changes. Need to figure out how to post it back to the plugin source so it might get incorporated as an option
  • Still need to change how the excerpt is selected. Now it is some 500 characters from the start of a posting. I want it to be 500 characters around the actual link.
  • It seems I need to change webmentions for various types, as a reply to a comment I made is shown as ‘x mentioned y’ (I changed it to the text of the actual comment by hand in this case.)
  • A summary overview of changes I made to this site, to make it more fully a indieweb hub / my core online presence. The set-up of my WordPress installation also has been described.

    Theme related tweaks

    • Created child theme of Sempress, to be able to change appearance and functions
    • Renamed comments to reactions (as they contain likes, reposts, mentions etc.)
      in the entry-footer template and the comments template
    • Removed h-card microformats, and put in a generic link to my about page for the author in the Sempress function sempress_posted_on. Without a link to the author mentions show up as anonymous elsewhere.
    • Removed the sharing buttons I used (although they were GDPR compliant using the Sharriff plugin, but they got in the way a lot I felt.
    • Added a few menu options for various aspects of my postings (books, check-ins, languages)
    • Introduced several categories to deal with different content streams: Dutch, German for non-English postings, Day to Day for things not on the home page, Plazes for check-ins, Books for ehh books, RSS-Only for unlisted postings, and Micromessage for tweets I send from the blog. This allows me to vary how I display these different types of things (or not)

    Functionality related tweaks

    Other tweaks

    • Set up 2 additional WordPress instances for testing purposes (Proto and Meso)

    Smart Home in a broad sense. As many things that make a home smarter are social not technological in nature, or are dumb technologies. And some ‘smart’ technologies make a home dumber.

    We will look at the role of a house from multiple angles.

    • Home as a shelter
    • Home as a family space
    • Home as a productive unit (food, water, energy, products)
    • Home as a meeting space
    • Home as a working and learning space
    • Home as a node or connector in the neighbourhood, as active part of a city
    • Home as a platform for sensors whose data is used at home and across the community it is located in
    • Home as an actuator platform that actively responds to its own sensor data, and data signals from other sources
    • And above all the role of smart residents, in creating such a home.

    This is an AppleScript I wrote to automatically post weekly overviews of bookmarks I made in Evernote, as a Suggested Reading post on my WordPress blog.

    set singletaglist to {}
    set multitaglist to {}
    set alltaglist to {}
    set allbulletlist to {}

    --get the notes from Evernote
    tell application "Evernote"
    set query_string to "notebook:\"linklog\" created:day-7" --get notes since last week
    set notities to find notes query_string --gives you list of relevant notes
    set notenum to count of notities
    repeat with notitie in notities
    --for every note fetch title, tags and source
    set titel to title of notitie
    set bron to source URL of notitie
    set taglist to tags of notitie
    set numtags to number of items in taglist
    --the taglist needs to be processed
    repeat with counter from 1 to numtags
    set tagtest to name of item counter of taglist
    --if tag already encountered it goes to multitaglist
    if (number of items in alltaglist is 0) then
    copy tagtest to end of alltaglist
    else
    if (alltaglist contains tagtest) then
    copy tagtest to end of multitaglist
    --if not encountered it goes to all tags
    else
    copy tagtest to end of alltaglist
    end if
    end if
    end repeat
    --fetch content and cut down to first line
    set inhoud to ENML content of notitie --gets you en xml, we want text between and


    set AppleScript's text item delimiters to "" --text to the right of
    set tinhoud to text item 2 of sinhoud
    set AppleScript's text item delimiters to ""
    set inhoud to ""
    set sinhoud to ""
    set thisbullet to {titel, bron, tinhoud} --list of this particual ever note
    set end of allbulletlist to thisbullet
    end repeat
    end tell
    -- we got what we need from Evernote
    -- we now have a list of all items, but need to look at tags to create the title of post
    -- I want a title like Suggested reading: tag1, tag2, tag3 and more
    -- where two tags are used more than once and one just once
    -- alltaglist contains all tags used, multitaglist contains all tags occurring multiple times
    -- now create a list of tags that are used once (basically alltags minus multitags)
    set allnum to number of items in alltaglist
    set doubles to number of items in multitaglist
    repeat with counter from 1 to allnum
    if (multitaglist does not contain item counter of alltaglist) then copy item counter of alltaglist to end of singletaglist
    end repeat
    set singles to number of items in singletaglist
    --I need 3 tags for the title, two used more than once, and one single. Unless there's not enough.
    set posttitle to "Suggested Reading: "
    if (allnum < 4) then -- too few tags, use them all repeat with counter from 1 to allnum - 1 set posttitle to posttitle & item counter of alltaglist & ", " end repeat set posttitle to posttitle & item allnum of alltaglist & " and more" else -- at least four tags available set takedouble to 2 --default value if (doubles < 2) then --take from doubles what possible set takedouble to doubles --0 or 1 end if if (singles = 0) then -- take all from doubles set takedouble to 3 end if --in all other cases default value works -- with value of takedouble now build posttitle if (takedouble = 3) then -- take first & last, and in the middle from doubles set middlelist to round doubles / 2 rounding up set posttitle to posttitle & item 1 of multitaglist & ", " & item middlelist of multitaglist & ", " & item doubles of multitaglist & " and more" end if if (takedouble = 2) then -- take first & last from doubles, first from singles set posttitle to posttitle & item 1 of multitaglist & ", " & item 1 of singletaglist & ", " & item doubles of multitaglist & " and more" end if if (takedouble = 1) then -- take first from doubles, first and last from singles set posttitle to posttitle & item 1 of multitaglist & ", " & item 1 of singletaglist & ", " & item singles of singletaglist & " and more" end if if (takedouble = 0) then -- take first middle & last,from singles set middlelist to round singles / 2 rounding up set posttitle to posttitle & item 1 of singletaglist & ", " & item middlelist of singletaglist & ", " & item singles of singletaglist & " and more" end if end if -- we now can start building the blog posting -- title is available posttitle -- now let's build the html for the posting --first opening line and start of UL set blogpostext to "

    Some links I thought worth reading the past few days

      "
      --for each bullet in bulletlist a new LI
      --with the blurb, and the title as href to the link
      repeat with listitem in allbulletlist
      set thislisitem to "

    • " & item 3 of listitem & ": " & item 1 of listitem & "
    • "
      set blogpostext to blogpostext & thislisitem
      end repeat
      --end the ul started at the top
      set blogpostext to blogpostext & "

    " --we got it all now
    --mail it to wordpress cat linklog, tags all tags, title and body.
    --the content of the mail is determined by the Postie plugin settings
    --the plugin used in my WordPress
    -- cat and title in subject, rest in body: delay to post must come first, then body, then tags after one empty line
    set mailsubject to "standard//[Linklog] " & posttitle
    set tagtext to ""
    repeat with counter from 1 to allnum - 1
    set tagtext to tagtext & item counter of alltaglist & ", "
    end repeat
    set tagtext to tagtext & item allnum of alltaglist
    set mailbody to "delay: 1d
    "
    set mailbody to mailbody & ":start " & blogpostext & "

    tags: " & tagtext --don't use :end delimiter

    --now send it as email
    tell application "Mail"
    set myMessage to make new outgoing message with properties {sender:"your@mail.com", subject:mailsubject, content:mailbody}
    tell myMessage
    make new to recipient with properties {address:"yoursecret@blogmail.com"}
    end tell
    send myMessage
    delay 5 --wait for the mail to be processed
    quit --quit Mail as I don't use it for anything else
    end tell