Reading List

Reading List

37826 bookmarks
Custom sorting
Displaying Bookmarks Publicly
Displaying Bookmarks Publicly

Displaying Bookmarks Publicly

https://ift.tt/F92wZoH

            Mtt

                December 12, 2022,  5:56pm

          1

Is there a way to display bookmarks publicly like there is with bookshelves?

For example, I can use the following to display Books I’m reading:

{{ range .Site.Data.bookshelves.currentlyreading }} <p class="bookshelf_book"> <a href="https://micro.blog/books/{{ .isbn }}"> <img src="{{ .cover_url }}"> <span class="bookshelf_title">{{ .title }}</span> <br> <span class="bookshelf_author">by {{ .author }}</span> </a> </p> {{ end }}

Is there a way to do something similar with bookmarks I’ve saved?

I’ve considered using something like FeedRoll to display the provided Bookmarks JSON feed, but it automatically duplicates every single entry.

            sod

                December 12, 2022,  7:14pm

          2

Yes, you can do something like this:

{{ $bookmarks := getJSON "https://ift.tt/lVeuvBk" }} {{ range $bookmarks.items }} <div class="h-entry"> <a class="u-bookmark-of h-cite" href="{{ .url }}"> <p>{{ .content_html | plainify | truncate 140 }}</p> </a> </div> {{ end }}

The example above prints a short summary for every bookmark and links to it. But there’s more data in the feed you can choose to expose if you want to.

            Mtt

                December 12, 2022,  7:29pm

          3

Ah, I should’ve known you would have the answer! Thank you! Having not tested it yet, does it deal with the duplicate item issue or does it list every bookmark twice?

            sod

                December 12, 2022,  7:34pm

          4

It lists whatever you have in your JSON feed. I don’t have duplicate entries in my feed, but maybe something is up with yours?

            Mtt

                December 12, 2022,  7:38pm

          5

For a little clarity, this is what I’m referencing. Maybe I’m missing something or in your brilliance you fixed yours somehow.

UPDATE: In that conversation, I’m saying RSS but I mean JSON.

            sod

                December 12, 2022,  7:50pm

          6

Okay, I’m not a premium subscriber, so I don’t get archived copies of my bookmarks. As long as there’s a way to distinguish the original from the archived version, we could eliminate the duplicates.

We can hopefully figure something out if you’re willing to share an example. Do not share the URL to the feed; that’s private. Instead, copy and paste one original/archive pair of bookmarks.

            Mtt

                December 12, 2022,  8:09pm

          7

If I understand your meaning, the only differences in the feed items seems to be that the archived version has a title set whereas the standard one doesn’t…and the id has a link prefix.

{
  "id": "link470113",
  "title": "Title of Page",
  "content_html": "<p>Content here</p>",
  "url": "amazonarchivedurlgoeshere.net",
  "date_published": "2022-12-03T20:15:10+00:00",
  "author": {
    "name": "John Smith",
    "url": "https://url.net",
    "avatar": "avatar.jpg",
    "_microblog": {
      "username": "name"
    }
  }
},
{
  "id": "14630634",
  "content_html": "<p>Content here</p>",
  "url": "https://url.net/",
  "date_published": "2022-12-02T21:48:59+00:00",
  "author": {
    "name": "John Smith",
    "url": "https://url.net",
    "avatar": "avatar.jpg",
    "_microblog": {
      "username": "name"
    }
  }
}

Just to make it simpler, I obviously replaced the info with filler.

            sod

                December 12, 2022,  8:32pm

          8

That may not be it. For example, I see title in my feed for bookmarks with a title. And I see the link prefix as well. But could we tell them apart by the URL? Is there a common prefix or other patterns for the archived versions?

Update: I might have confused myself. This may be the solution after all. Can you try the following snippet, @Mtt?

{{ $bookmarks := getJSON "https://ift.tt/lVeuvBk" }} {{ range $bookmarks.items }} {{ if not .title }} <div class="h-entry"> <a class="u-bookmark-of h-cite" href="{{ .url }}"> <p>{{ .content_html | plainify | truncate 140 }}</p> </a> </div> {{ end }} {{ end }}

            JohnPhilpin

                December 13, 2022,  2:03am

          9

Interesting thread here - this might allow me to repurpose my bookmarks for something else I have been thinking about … BUT … I am clearly doing it wrong - how do you add any of this code to the site? It isn’t on the page itself I assume?

            sod

                December 13, 2022,  8:19am

          10

You’re right; these snippets can’t go into a page or post. They have to be included in a custom template. Or one could construct a shortcode for easy inclusion anywhere.

I might get around to releasing this as a plug-in in the future, if no one beats me to it.

            pratik

                December 13, 2022,  1:25pm

          11

I thought the same too. Check out the thread linked in @jsonbecker’s response.

          1 Like

            Mtt

                December 13, 2022,  8:37pm

          12

This does work and might be as close as possible to achieving what I’m going for; however, the content.html part automatically includes added “footer” text. The only solution I can come up with is to limit the truncation further so that gets chopped off. But by doing that, defeats the goal of what I want to do.

I also tried automatically importing the JSON feed through the Micro.blog import tool (then I could run a filter to categorize it), but it won’t allow importing from M.b sources.

So I feel like every solution gets me 90% of the way there. Might be something to put on the back burner and see if things change on any part of it.

            sod

                December 13, 2022,  9:23pm

          13

What do you mean by footer text? Can you provide an example?

content_html is the actual content from the page you’ve bookmarked. So it will vary greatly depending on which websites you’re bookmarking. It’s probably hard to come up with a general solution, unfortunately.

            Mtt

                December 13, 2022,  9:40pm

          14

Sorry, I could’ve worded that better. Within the content, the text “Read: link.com” is appended at the end for every link.

            sod

                December 13, 2022, 10:21pm

          15

Okay, it could probably be solved as long as it’s consistent. Can you provide an unaltered bookmark from your JSON feed? Something like this:

{ "id": "14915304", "content_html": "Bookmark improvements in Micro.blog <a href="https://www.manton.org/2022/03/23/bookmark-improvements-in.html\">manton.org</a>", "url": "https://ift.tt/PkXc0uR", "date_published": "2022-03-23T14:54:40+00:00", "author": { "name": "Manton.org", "url": "http://Manton.org/", "avatar": "https://ift.tt/LfGTyN9", "_microblog": { "username": "manton.org" } } }

            sod

                December 13, 2022, 10:25pm

          16

The Bookmarks Shortcode plug-in (BETA) is a thing now, @JohnPhilpin. Install, add your bookmarks JSON feed in the settings, and paste this snippet on any page: {{< bookmarks />}}. More detailed instructions can be found on the plug-in page.

          2 Likes

            Mtt

                December 13, 2022, 10:50pm

          17

Here ya go:

{
  "id": "14630634",
  "content_html": "<p>For today's <a href=\"https://ift.tt/Q0saTEu>, I made my RSS feed prettier. Before, the browser served a bunch of messy XML, but now you're greeted by <a href=\"https://dahlstrand.net/notes/feed.xml\">a friendly preview and instructions</a>. 🥳</p>\n\n<p>Based on <a href=\"https://github.com/genmon/aboutfeeds/blob/main/tools/pretty-feed-v3.xsl\">pretty-feed.xsl</a> by Matt Webb. You should add <a href=\"https://interconnected.org/home/\">Matt's blog</a> to your feed reader! 👀</p>\n\n<p><img src=\"https://cdn.micro.blog/photos/1000x/https%3A%2F%2Fdahlstrand.net%2Fimages%2Fpretty-rss.png\" alt=\"A split view of the same web feed: before and after. The before shows a plain text XML representation of content. Boring! The after shows a pretty-looking preview of the same.\" width=\"1224\" height=\"1224\" loading=\"lazy\"></p><p class=\"post_archived_links\">Read: <a href=\"https://micro.blog/bookmarks/470113\">dahlstrand.net</a> </p>",
  "url": "https://ift.tt/sHhJ0cq",
  "date_published": "2022-12-02T21:48:59+00:00",
  "author": {
    "name": "Sven Dahlstrand",
    "url": "https://dahlstrand.net",
    "avatar": "https://ift.tt/LwFSsKm",
    "_microblog": {
      "username": "sod"
    }
  }
}

            sod

                December 13, 2022, 11:25pm

          18

What a nice bookmark you got there. You could remove the offending HTML with Hugo’s replaceRE: replaceRE "<p class="post_archived_links">.+</p>" "". Merged with the previous example:

{{ $bookmarks := getJSON "https://ift.tt/lVeuvBk" }} {{ range $bookmarks.items }} {{ if not .title }} <div class="h-entry"> <a class="u-bookmark-of h-cite" href="{{ .url }}"> <p>{{ .content_html | replaceRE "<p class="post_archived_links">.+</p>" "" | plainify | truncate 140 }}</p> </a> </div> {{ end }} {{ end }}

            JohnPhilpin

                December 14, 2022,  9:37pm

          19

well - look at that - of course you have … and of course I tried it … and of course it isn’t working for me

I am pretty sure that I am using the wrong JSON

This is clearly not right

https://micro.blog/feeds/johnphilpin/bookmarks/decc3dfad46628dc2cac.json

Displaying Bookmarks Publicly
Uncanny Valley | Anna Wiener
Uncanny Valley | Anna Wiener
The meeting begins without fanfare. They thought I was an amazing worker at first, working late every night, last out of the office, but now they wonder if the work was just too hard for me to begin with. They need to know: Am I down for the cause? Because if I’m not down for the cause, it’s time. They will do this amicably. Of course I’m down, I say, trying not to swivel in my ergonomic chair. I care deeply about the company. I am here for it.
Uncanny Valley | Anna Wiener
DJ Rashad Is Still All Around Us
DJ Rashad Is Still All Around Us
To commemorate ten years since the footwork pioneer's death, collaborators, protégés and family reflect on his life and extraordinary legacy.
DJ Rashad Is Still All Around Us
Where Next for the Hard Movement? · Feature ⟋ RA
Where Next for the Hard Movement? · Feature ⟋ RA
Hard techno, hard rave, hardstyle—whatever you call it, arena slammers have dominated the 2020s. But brand monopolies, spectacle hype and a declining grassroots scene have us wondering: when the euphoric bubble bursts, what will be left?
Where Next for the Hard Movement? · Feature ⟋ RA
Visualizing all books of the world in ISBN-Space - phiresky's blog
Visualizing all books of the world in ISBN-Space - phiresky's blog
Libraries have been trying to collect humanity’s knowledge almost since the invention of writing. In the digital age, it might actually be possible to create a comprehensive collection of all human writing that meets certain criteria. That’s what shadow libraries do - collect and share as many
Visualizing all books of the world in ISBN-Space - phiresky's blog
Matthew Ball on Channels with Peter Kafka
Matthew Ball on Channels with Peter Kafka
Media and tech aren’t just intersecting — they’re fully intertwined. And to understand how those worlds work, and what they mean for you, veteran journalist Peter Kafka talks to industry leaders, upstarts and observers - and gets them to spell it out in plain, BS-free English. Part of the Vox Media Podcast Network.
Matthew Ball on Channels with Peter Kafka
Volume 34 Issue 1 | Journal of Electronic Imaging
Volume 34 Issue 1 | Journal of Electronic Imaging
The Journal of Electronic Imaging publishes papers that are normally considered in the design, engineering, and applications of electronic imaging technologies.
Volume 34 Issue 1 | Journal of Electronic Imaging
G-Wagon Durability Test #2
G-Wagon Durability Test #2
Save 30% on the Cannadips Fuel Pack and Sleep like a king or jumpstart your adventure https://cannadips.com/whistlin Today we see how Mercedes’ New 1,000hp Super SUV does against a 1967 Farmall 1206 Tractor + more stunts. It’s already handled 100ft jumps, excessive suspension stress, powertrain abuse, being dropped through a house. Thanks to Dawson County Sheriffs Office for pit maneuvering us, Atlanta Motorsports Park for letting us use their track, and Justin From Atlanta Custom Wraps for being our tour guide. #G63 Music: @moneyman2203 - Know Ya Type @moneyman2203 - Roar
G-Wagon Durability Test #2
Aly & AJ | Call Her Daddy
Aly & AJ | Call Her Daddy
The most-listened to podcast by women. Alex Cooper’s Call Her Daddy has been creating conversation since 2018. Cooper cuts through the BS with topics and guests - asking the burning questions you want the answers to. There will be laughter, there will be tears. There will be everything in between. New episodes drop on Wednesday and Sunday. Want more? Join the Daddy Gang @callherdaddy
Aly & AJ | Call Her Daddy
NotePlan vs Agenda: An Overview
NotePlan vs Agenda: An Overview
Discover how NotePlan and Agenda compare for taking Markdown notes, managing tasks, creating a PKM with backlinks, using an open format, and much more.
NotePlan vs Agenda: An Overview
Looking for a Craft alternative that does more than docs?
Looking for a Craft alternative that does more than docs?
NotePlan is more than just notes - it offers a structured approach to managing projects and tackling tasks. With daily notes and folders, you can supercharge your workflow and stay on top of your work effortlessly.
Looking for a Craft alternative that does more than docs?
How to import notes from Craft
How to import notes from Craft
NotePlan supports Markdown and your notes are saved locally on your devices. However, other apps like Craft export the notes in slightly different formats, whic
How to import notes from Craft