cli tools for list all pages in logseq repo, marked with public or private

logseq-pages

A cli tool for list all pages in logseq repo, marked with public or private.

When I using logseq to build my knowledge base and publish publicly, I found that " Make it public for publishing" and "Make it private" could only be accessed on the application. So I have to manually walk though all the pages and make sure that all I wanted to be published pages have been marked as public.

That is terrible experience.

So I would write the cli tools to:

  • list all the pages
  • [WIP] mark pages as public or private with interactive terminal ui

Installation

You could use go install github.com/strrl/logseq-pages/cmd/logseq-pages@latest to install the tool.

Or clone this repo, and run make then you could find the binary bin/logseq-pages.

Overview

$ logseq-pages list --work-directory ~/playground/github/whatiknown        
+-------+-----------------------------------+--------+-----------------------+-----------------------------------------+
|     # | NAME                              | PUBLIC | ALIAS                 | PATH                                    |
+-------+-----------------------------------+--------+-----------------------+-----------------------------------------+
|     0 | 2022_01_04.md                     |        |                       | journals/2022_01_04.md                  |
|     1 | 2022_01_10.md                     |        |                       | journals/2022_01_10.md                  |
|     2 | 2022_01_20.md                     |        |                       | journals/2022_01_20.md                  |
|     3 | 2022_01_21.md                     |        |                       | journals/2022_01_21.md                  |
|     4 | About Me.md                       | *      | strrl, STRRL          | pages/About Me.md                       |
|     5 | Alfred.md                         | *      |                       | pages/Alfred.md                         |
|     6 | Arch Linux.md                     | *      |                       | pages/Arch Linux.md                     |
|     7 | Chaos Engineering.md              | *      |                       | pages/Chaos Engineering.md              |
|     8 | Chaos Mesh.md                     | *      | chaos-mesh, ChaosMesh | pages/Chaos Mesh.md                     |
|     9 | Cloud Native.md                   | *      |                       | pages/Cloud Native.md                   |
|    10 | Committer.md                      | *      |                       | pages/Committer.md                      |
|    11 | Container Orchestration.md        | *      |                       | pages/Container Orchestration.md        |
|    12 | Espanso.md                        | *      |                       | pages/Espanso.md                        |
|    13 | Fedora.md                         | *      |                       | pages/Fedora.md                         |
|    14 | Git Repository.md                 | *      | Git 仓库              | pages/Git Repository.md                 |
|    15 | I want to create my first page.md | *      |                       | pages/I want to create my first page.md |
|    16 | Kiu.md                            | *      |                       | pages/Kiu.md                            |
|    17 | Kubernetes.md                     | *      |                       | pages/Kubernetes.md                     |
|    18 | Linux Container.md                | *      |                       | pages/Linux Container.md                |
|    19 | Linux.md                          | *      |                       | pages/Linux.md                          |
|    20 | MacOS.md                          | *      |                       | pages/MacOS.md                          |
|    21 | Nonlinear System.md               | *      |                       | pages/Nonlinear System.md               |
|    22 | SemVer 2.0.md                     | *      |                       | pages/SemVer 2.0.md                     |
|    23 | Ubuntu Server.md                  | *      |                       | pages/Ubuntu Server.md                  |
|    24 | XinHua Dictionary.md              | *      |                       | pages/XinHua Dictionary.md              |
|    25 | chaos-mesh.dev.md                 | *      |                       | pages/chaos-mesh.dev.md                 |
|    26 | chaos-mesh.md                     | *      |                       | pages/chaos-mesh.md                     |
|    27 | contents.md                       | *      |                       | pages/contents.md                       |
|    28 | de facto standard.md              | *      |                       | pages/de facto standard.md              |
|    29 | favorites.md                      | *      |                       | pages/favorites.md                      |
|    30 | homelab.md                        | *      |                       | pages/homelab.md                        |
|    31 | logseq.md                         | *      |                       | pages/logseq.md                         |
|    32 | pkg.go.dev.md                     | *      |                       | pages/pkg.go.dev.md                     |
|    33 | text expander.md                  | *      |                       | pages/text expander.md                  |
|    34 | 非线性系统.md                     | *      |                       | pages/非线性系统.md                     |
+-------+-----------------------------------+--------+-----------------------+-----------------------------------------+
| TOTAL | 35                                |        |                       |                                         |
+-------+-----------------------------------+--------+-----------------------+-----------------------------------------+

With filter private and output json, beatified by jq:

$ logseq-pages list --output json --work-directory ~/playground/github/whatiknown --filter private | jq
[
  {
    "Name": "2022_01_04.md",
    "Alias": [],
    "Path": "journals/2022_01_04.md",
    "Public": false
  },
  {
    "Name": "2022_01_10.md",
    "Alias": [],
    "Path": "journals/2022_01_10.md",
    "Public": false
  },
  {
    "Name": "2022_01_20.md",
    "Alias": [],
    "Path": "journals/2022_01_20.md",
    "Public": false
  },
  {
    "Name": "2022_01_21.md",
    "Alias": [],
    "Path": "journals/2022_01_21.md",
    "Public": false
  }
]
Owner
Chaos Engineering | Cloud Native | Full Stack
null
Similar Resources

Downloader written in golang to download the public data files from RUC Paraguay.

rucpy-downloader Downloader written in golang to download the public data files(RUC Paraguay) from set.gov.py. The downloader will download the public

Dec 6, 2021

🚀 Platform providing a powerful and fast public script parsing API dedicated to the Skript community.

SkriptMC-Parser is currently a prototype in the early stages of development of a system that allows the Skript community to test their scripts via a public API for potential errors or warnings. This is a quick and easy way to check your scripts without having to set up a Spigot server on your environment.

Mar 3, 2022

A tool to manage all your boilerplate from cli and generate files for you !

A tool to manage all your boilerplate from cli and generate files for you !

Jul 20, 2022

CLI tool to update ~/.aws/config with all accounts and permission sets defined in AWS SSO

aws-sso-profiles Generate or update ~/.aws/config with a profile for each SSO account you have access to, by using an existing AWS SSO session. Bootst

Nov 3, 2022

A CLI tool to display all dependencies or dependents of an object in a Kubernetes cluster.

kube-lineage A CLI tool to display all dependencies or dependents of an object in a Kubernetes cluster. Usage $ kube-lineage clusterrole system:metric

Jan 5, 2023

A cli program unlocks all cheats in The Sims 1

A cli program unlocks all cheats in The Sims 1

Sims 1 Cheat Unlocker This is a cli program unlocks all cheats in The Sims 1. It was tested against the base Sims 1 and the Complete Collection, so it

Jul 7, 2022

Code and slides from the talk "A golang CLI to rule them all" at JavaZone 2021

A Golang CLI to rule them all This is a repo for the slides and the code that were showed at the presentation with the same title at the JavaZone conf

Sep 28, 2022

The Emojinator CLI: for all your emojipasta needs 🦾😎

🦾 😎 The Emojinator ALL YOUR emojipasta 🍝 ARE BELONG TO US. This command line tool has one main purpose: turn your files into emojipasta by specifyi

Jan 6, 2022

Azure-nuke - The CLI tool to delete all resources in an Azure Account

azure-nuke This repository would contain the CLI tool to delete all resources in

Jun 8, 2022
A simple shopping list that keeps track of a users shopping list using charm.sh tools

Terminal Shopping List This repo is a practise project for learning practical Go. I have chosen to use a toolset called Charm as it provides a rich se

Jan 13, 2022
A repo for making my first public golang moduel.

demoMod My first public Golang moduel Packages Two very simple packages. First is converter that converts the NOK - USD or BP. Using the current excha

Jan 11, 2022
A CLI tool that you can use create regular backups of your Notion.so Pages.

notion-offliner A CLI tool that you can use create regular backups of your Notion.so Pages. Perfect for disaster scenarios and offline usage. MacOS an

Jan 3, 2023
Secure, private and feature-rich CLI password manager
Secure, private and feature-rich CLI password manager

Kure Kure is a free and open-source password manager for the command-line. This project aims to offer the most secure and private way of operating wit

Nov 17, 2022
Simple to do list API with Gin and Gorm (with Postgres)Simple to do list API with Gin and Gorm (with Postgres)

go-todo Simple to do list API with Gin and Gorm (with Postgres) Docker Clone this repository and run: docker-compose up You can then hit the followin

Aug 29, 2022
This utility verifies all commands used by a shell script against an allow list

Find external commands required by shell scripts When writing shell scripts that need to run portably across multiple hosts and platforms, it's useful

Aug 15, 2022
A small utility command line application that can recursively download Notion pages

notionbackup A small utility command line application that can recursively download Notion pages. I needed something scriptable that could periodicall

Dec 5, 2022
Yikes is a cli-application to simplify the process to maintaining a list of tasks to complete.

yikes Yikes is a cli-application to simplify the process to maintaining a list of tasks to complete. It also has commands to help store random notes a

Oct 7, 2021
List of serverless functions for AWS S3. Easy deploy with Vercel CLI

List of serverless functions for AWS S3. Easy deploy with Vercel CLI

Jan 22, 2022
Upterm is an open-source solution for sharing terminal sessions instantly over the public internet via secure tunnels.
Upterm is an open-source solution for sharing terminal sessions instantly over the public internet via secure tunnels.

Upterm is an open-source solution for sharing terminal sessions instantly over the public internet via secure tunnels.

Jan 8, 2023