A cross-platform Node app that publishes a LogSeq journal as a blog via Drummer

Overview

myLogseqBlog

A cross-platform Node app that publishes a LogSeq journal as a blog via Drummer

How to install

  1. Download the app from the repo. It's a .zip file. When you uncompress you should see a folder named myLogseqBlog-main.

  2. Open the folder in the Terminal app. On a Mac you can do this by dragging the folder onto the Terminal app icon.

  3. Install Node.js if it is not installed on your machine.

  4. Type npm install at the command prompt. A bunch of messages will scroll by.

  5. Edit config.json following the instructions below.

Setting up config.json

There are a bunch of values you have to set up in config.json to configure your blog. I've provided an example config.json file with those values specified, you just have to change them.

  1. twScreenName -- your Twitter screen name.

  2. logSeqJournalFolder -- the path to your LogSeq journals folder that we will build your blog from.

  3. opmlJournalFile -- optional, a path to the OPML file that myLogseqBlog generates. You don't need this file to publish your blog.

  4. blogTitle -- the title of your blog, this is displayed at the top of every page and in your RSS feed.

  5. blogDescription -- describes your blog, could be a slogan, whatever you like, it's displayed in smaller type under the title, and in your feed.

  6. blogWhenCreated -- the date and time when your blog started. It should probably be the date and time when you installed this software.

  7. blogTimeZoneOffset -- your blog will appear to be in this timezone. It's the offset from GMT of that timezone. If you're in New York, it would be -5. In England it would be 0. In Beijing it would be +8.

  8. blogCopyright -- a copyright notice. You can leave this empty if you don't have one.

  9. blogUrlHeaderImage -- the URL of a wide rectangular image to be displayed at the top of every page. There is a default image if you don't provide one.

  10. oauth_token, oauth_token_secret -- myLogseqBlog uses these values and the next one to identify you to the Drummer system, so it knows which account to store your outline under. It is not saved in the OPML file it generates. The next section explains how to get these values.

Debugging config.json

When you're done setting up config.json, you might want to check the JSON syntax using a web service like jsonlint.

Copy and paste the text of your config.json file into its edit box and click the button at the bottom to validate. If there's an error, it will tell you where it is.

Repeat until it reports that your JSON is valid, then make the corrections in your config.json file.

Drummer setup

Drummer uses Twitter for identity, so you will need a Twitter account to associate with your blog.

If your Twitter username is lisasimpson, your blog will be at this URL:

http://oldschool.scripting.com/lisasimpson/

To establish this connection, go to the Drummer website and log in with your Twitter account. Twitter will warn you that Drummer can do a lot of things that it won't do unless you ask it to do them.

When Drummer opens, if this is your first time using it, a file named Notes will open automatically.

You can use this outline to get the values that are needed in config.json. If you've used Drummer before you can use any file for this purpose.

In the top headline enter: localStorage and press Cmd-/ (on Mac, Control-/ on Windows and Linux).

Double-click on the headline that appears to reveal a bunch of values. The ones you want are:

  1. twOauthToken

  2. twOauthTokenSecret

Copy these values into oauth_token and oauth_token_secret in your config.json file, as described above.

How to use

First a caveat -- I am a LogSeq newbie, so my instructions will be rudimentary and possibly incomplete. But this worked for me, and hopefully will work for you. 😄

First, the journals folder you specify in config.json will be public. Be sure not to add any private information to those files -- they will become public when you publish your blog. I understand it's possible to have more than one journals folder, if so you might want to set up a new one just for your blog.

Write whatever you want into your journal and when you're ready to publish, go to the myLogseqBlog folder and run the app by typing this into your Terminal app.

node mylogseqblog.js

You should see a bunch of messages scroll by, hopefully no errors. It should take no more than a couple of seconds. When it's done, try opening your blog in a browser.

http://oldschool.scripting.com/yourtwitterscreenname/

Add something new to the journal, run the app again.

Updates

v0.4.2, 1/14/22 by DW

If there's an error in config.json the app does not try to update the blog. There's no chance it would work or provide any meaningful results.

If the user leaves a trailing slash off the folder path, that should not be the end of things, we just add a trailing slash and proceed.

Added section about debugging config.json and a link to the page where you can install Node.js.

v0.4.1, 1/13/22 by DW

When myLogseqBlog uploads the file, it takes care of making it public, so the manual step specified in the docs is no longer needed.

The nodes we create are of type markdown, so that the blog processor knows to render the text through a Markdown processor.

Questions, comments?

Post an issue here.

You might also like...

📗 How to write cross-platform Node.js code

📗 How to write cross-platform Node.js code

How to write cross-platform Node.js code. Why you should care: according to the 2018 Node.js user survey, 24% of Node.js developers use Windows locall

Jan 3, 2023

Gatsby-blog-cosmicjs - 🚀⚡️ Blazing fast blog built with Gatsby and the Cosmic Headless CMS 🔥

Gatsby-blog-cosmicjs - 🚀⚡️ Blazing fast blog built with Gatsby and the Cosmic Headless CMS 🔥

Gatsby + Cosmic This repo contains an example blog website that is built with Gatsby, and Cosmic. See live demo hosted on Netlify Uses the Cosmic Gats

Jan 29, 2022

This is a blog built with sveltekit, tailwind and daisyUI, made to be used as my personal blog.

This is a blog built with sveltekit, tailwind and daisyUI, made to be used as my personal blog.

svelte-blogger This is a blog built with sveltekit, tailwind and daisyUI, made to be used as my personal blog. This app also use graphql and use markd

Jun 23, 2022

Hacker Tools cross-platform desktop App, support windows/MacOS/LInux ....

Hacker Tools cross-platform desktop App, support windows/MacOS/LInux ....

Jan 8, 2023

Cross platform terminal app from Visual Studio Code.

Cross platform terminal app from Visual Studio Code.

CodeTerminal Standalone terminal from Visual Studio Code. Installation macOS Highly recommanded to install with homebrew. brew tap xcodebuild/custom b

Dec 21, 2022

A fully cross-platform messenger app with End to End Encryption (E2EE).

A fully cross-platform messenger app with End to End Encryption (E2EE).

Smartsapp A fully cross-platform messenger app with End to End Encryption (E2EE). Demo NOTE: The features shown in the demo is not exhaustive. Only th

Aug 25, 2022

A cross-platform desktop app with a nice interface to Stable Diffusion and others

A cross-platform desktop app with a nice interface to Stable Diffusion and others

GenerationQ GenerationQ (for "image generation queue") is a cross-platform desktop application (screens below) designed to provide a general purpose G

Dec 28, 2022

A cross-platform AutoHotKey-like thing with TypeScript as its scripting language

suchibot A cross-platform AutoHotKey-like thing with JavaScript/TypeScript as its scripting language. Built on top of uiohook-napi and nut.js. Install

Sep 21, 2022

LucaMail - an Open Source,Cross Platform Email Client

LucaMail -  an Open Source,Cross Platform Email Client

LucaMail v0.0.1-beta An Awesome Cross Platform Email Client! Note : This Project Is Still in Beta Version Website . Report Bug . Request Feature . Dis

Dec 28, 2022
Comments
  • Markdown links and images aren't rendered

    Markdown links and images aren't rendered

    I had expected that I could use Markdown links, but neither text links nor images render: http://oldschool.scripting.com/rroudt/2022/01/12/000003.html?title=writingABlogInAnOutline

    CleanShot 2022-01-14 at 00 22 30@2x
    opened by logseqramses 7
  • blog.opml is private

    blog.opml is private

    Followed the instructions in README.md and when I ran node mylogseqblog.js I got the following response (sanitizing tokens):

    config == {
        "twScreenName": "andrewshell",
        "logSeqJournalFolder": "/Users/andrew.shell/code/myLogseqBlog-main/graph/journals/",
        "opmlJournalFile": "/Users/andrew.shell/code/myLogseqBlog-main/graph/journal.opml",
        "blogTitle": "Andrew's LogSeq Blog",
        "blogDescription": "Connecting LogSeq for writing with Drummer for publishing.",
        "blogWhenCreated": "Wed, 13 Jan 2022 17:36:18 GMT",
        "blogTimeZoneOffset": -6,
        "blogCopyright": "Copyright 2022, Andrew Shell.",
        "blogUrlHeaderImage": "http://scripting.com/images/2021/07/07/hopperGasStation.png",
        "blogUseCache": false,
        "urlTwitterServer": "http://drummer.scripting.com/",
        "oauth_token": "xxx",
        "oauth_token_secret": "xxx"
    }
    addJournalFileToOutline: fname == 2022_01_13.md, mdtext.length == 201
    logseqpublish: opmltext.length == 1535
    drummerCms: err.message == Can't read the file because there was an error. Code == 500.
    
    • The local file journal.opml was generated correctly
    • The file blog.opml is present in drummer
    • Going to http://drummercms.scripting.com/build?blog=andrewshell in a browser returns the following error:
    {
        "message": "Can't build the blog for \"andrewshell\" because blog.opml doesn't exist in Drummer, or is private."
    }
    
    • Looks like blog.opml is private
    opened by andrewshell 5
Owner
Dave Winer
Started two Silicon Valley companies. Wrote for Wired. Fellow at Harvard, NYU. Founder of podcasting, blogging, RSS.
Dave Winer
Logseq-craft-theme - Craft Theme for Logseq

Craft for Logseq Almost all creativity requires purposeful play. A Craft insprir

Alexander Rink 33 Oct 26, 2022
simple-remix-blog is a blog template built using Remix and TailwindCSS. Create your own blog in just a few minutes!

simple-remix-blog is a blog template built using remix.run and TailwindCSS. It supports markdown and MDX for the blog posts. You can clone it and star

José Miguel Álvarez Vañó 8 Dec 8, 2022
Full stack app to journal and keep track of your overall mood each day of the year, inspired by GitHub's contribution graph.

Mood Tracker Mood tracker to journal and keep track of your overall mood each day of the year. How It's Made: Tech used: EJS, CSS, JavaScript, Node.js

Bianca Togonon 44 Dec 14, 2022
This tool fetches my BrewFather inventory and publishes it at the link below.

?? BrewFather Inventory ?? How to get your own BrewFather public inventory list Fork this repo Setup GitHub Pages Navigate to Settings > Pages Select

Joost Slijkoort 4 Feb 24, 2022
A multi-application bot that publishes the latest technology-related news

Dev Informado A multi-application bot that publishes the latest technology-related news Compatible Apps | Technologies | How To Use | License ?? Compa

Fernando Groders 4 Jul 24, 2022
GetOsLocalesCrossPlatform - A cross platform alternative to get locales used on the platform. Works on Node, Electron, NW.js and Browsers

getOsLocalesCrossPlatform A cross platform alternative to get locales used on the platform. Works on Node, Electron, NW.js and Browsers This script is

null 1 Jan 2, 2022
A personal semantic search engine capable of surfacing relevant bookmarks, journal entries, notes, blogs, contacts, and more, built on an efficient document embedding algorithm and Monocle's personal search index.

Revery ?? Revery is a semantic search engine that operates on my Monocle search index. While Revery lets me search through the same database of tens o

Linus Lee 215 Dec 30, 2022
MERN stack application which serves as an online map journal where users can mark and rate the places they've been to.

PlaceRate PlaceRate is a MERN stack application which serves as an online map journal where users can mark and rate the places they've been to. You ca

Yuvraj Virdi 0 May 17, 2022
A CLI to write journal for you and save it to a Notion database!

Journal CLI NPM Link A CLI to write journal for you and save it to a Notion database! Demo Installation Run npm i -g journal-notion-cli to install the

Amit Wani 5 Oct 7, 2022