CLI tool to fix linked references for dates.

Related tags

CLI Tools logseq
Overview

Fix Logseq dates

This is a CLI tool to fix the date references following a change in date format since the current version (0.4.4) of Logseq does not support this yet.

I built this because I had a similar issue as reported on the Logseq forum and Discord.

πŸ“¦ Dependencies

It requires Python 3.6+ to run.

πŸ’Ύ Installation

Install using pipx if you have it already. Otherwise you can use pip.

Via pipx (Recommended)

 pipx install git+https://github.com/idadzie/fix-logseq-dates

Via pip

 pip install git+https://github.com/idadzie/fix-logseq-dates

πŸš€ How to use

usage: fix-logseq-dates [-h] [-f FORMAT] [-j JOURNALS_DIRECTORY]
                        [-p PAGES_DIRECTORY] [-d GRAPH_DIRECTORY] [--any-date]

CLI tool to fix linked references for Logseq dates.

optional arguments:
  -h, --help             show this help message and exit
  -f FORMAT              date format. (default: MMMM DD, YYYY)
  -j JOURNALS_DIRECTORY  journals folder name. (default: journals)
  -p PAGES_DIRECTORY     pages folder name. (default: pages)
  -d GRAPH_DIRECTORY     absolute path to your local Logseq graph. (default: None)
  --any-date             match any date found not only referenced ones. (default: False)
  1. Backup your Logseq graph (directory/folder that contains your markdown files). A simple copy to another directory is enough. πŸ˜„

  2. Run the fix-logseq-dates command against your Logseq graph. See here for supported date format tokens.

    # Example
    fix-logseq-dates -f 'MMMM DD, YYYY' -d ~/path/to/knowledge-graph
    
    # If you've modified the Journals and/or Pages directories.
    fix-logseq-dates -f 'MMMM DD, YYYY' -d ~/path/to/knowledge-graph -j alt_journals -p alt_pages
    
    # Match any date strings in the files.
    # Use with caution. It might modifiy unintended dates.
    fix-logseq-dates -f 'MMMM DD, YYYY' -d ~/path/to/knowledge-graph -j alt_journals -p alt_pages --any-date
  3. Open Logseq and re-index your graph.

πŸ’‘ Tip

If you are familiar with git and have some time to spare, you could initialize your Logseq graph as a git repository before running the fix. Then, after the fix, you could use a visual diff tool like meld to verify your data was modified correctly.

πŸ’– Like this project ?

Leave a ⭐ If you think this project is cool.

You might also like...
Simple CLI tool to track your cryptocurrency portfolio in real time.
Simple CLI tool to track your cryptocurrency portfolio in real time.

Simple tool to track your crypto portfolio in realtime. It can be used to track any coin on the BNB network, even obscure coins that are not listed or trackable by major portfolio tracking applications.

GitFun - A Simplified Automated CLI tool for GITπŸ˜ƒ

GitFun A Simplified Automated CLI tool for GIT, It's for Lazy Developers and Newbies 😜 Table of contents GitFun Installation Usage Development Contri

Hurry is a CLI tool to speed setting up MoniGoMani HyperStrategy & co. #freqtrade #hyperopting #trading #strategy

Hurry is a CLI tool to speed setting up MoniGoMani HyperStrategy & co. #freqtrade #hyperopting #trading #strategy

CPOST is a CLI tool to assist with the proper sizing of Clara Deploy pipelines
CPOST is a CLI tool to assist with the proper sizing of Clara Deploy pipelines

CPOST (Clara Pipeline Operator Sizing Tool) Tool to measure resource usage of Clara Platform pipeline operators Cpost is a tool that will help you run

CLI tool to develop StarkNet projects written in Cairo

β›΅ Nile Navigate your StarkNet projects written in Cairo. Installation pip install cairo-nile Usage Install Cairo Use nile to install a given version o

A simple cli tool to commit Conventional Commits

convmoji A simple cli tool to commit Conventional Commits. Requirements Install pip install convmoji convmoji --help Examples A conventianal commit co

Unofficial Open Corporates CLI: OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unofficial open corporates python command line tool.
Unofficial Open Corporates CLI: OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unofficial open corporates python command line tool.

Unofficial Open Corporates CLI OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unoff

A CLI tool to disable and enable security standards controls in AWS Security Hub

Security Hub Controls CLI A CLI tool to disable and enable security standards controls in AWS Security Hub. It is designed to work together with AWS S

CLI tool to develop StarkNet projects written in Cairo

OpenZeppelin Nile β›΅ Navigate your StarkNet projects written in Cairo. Getting started Create a folder for your project and cd into it: mkdir myproject

Owner
Isaac Dadzie
Isaac Dadzie
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

Shreyash Chavan 2 Apr 4, 2022
Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 29, 2022
[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

null 166 Dec 30, 2022
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

null 14 Sep 11, 2022
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Rafael Torres 2 Dec 10, 2021
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Ayush Soni 1 Nov 5, 2021
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

null 1 Feb 5, 2022
Dead simple CLI tool to try Python packages - It's never been easier! :package:

try - It's never been easier to try Python packages try is an easy-to-use cli tool to try out Python packages. Features Install specific package versi

Timo Furrer 659 Dec 28, 2022