CLI tool to fix linked references for dates.

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.

Owner
Isaac Dadzie
Isaac Dadzie
A simple command line tool written in python to manage a to-do list

A simple command line tool written in python to manage a to-do list Dependencies: python Commands: todolist (-a | --add) [(-p | --priority)] [(-l | --

edwloef 0 Nov 02, 2021
Bryce Geiser 4 Aug 04, 2022
🌈 Beautify your command line interfaces.

Basics Install: pip install iridi Usage: import iridi # Create gradient text # iridi.print(message, colors, options) # Ask for input with gradient

Conrad Crawford 39 Oct 20, 2022
Jupyter notebook client in neovim

🪐 Jupyter-Nvim Read jupyter notebooks in neovim Note: The plugin is still in alpha stage 👾 Usage Just open any *.ipynb file and voila! ✨ Contributin

Ahmed Khalf 85 Dec 29, 2022
Another (unofficial) Qt CLI Installer on multi-platforms

Another Qt installer(aqt) Release: Documentation: Test status: and Coverage: This is a utility alternative to the official graphical Qt installer, for

Hiroshi Miura 528 Jan 02, 2023
⚙ A lightweight command line interface library for creating commands.

⚙ A lightweight command line interface library for creating cli commands. About | Installation | Usage | Features | Contributors | License About Next:

Serum 16 Sep 25, 2022
Set of scripts & tools for converting between numbers and major system encoded words.

major-system-converter Set of scripts & tools for converting between numbers and major system encoded words. Uses phonetics instead of letters to conv

4 Aug 09, 2022
CLI tool to view your VIT timetable from terminal anytime!

VITime CLI tool to view your timetable from terminal anytime! Table of contents Preview Installation PyPI Source code Updates Setting up Add timetable

16 Oct 04, 2022
CLI tool to fix linked references for dates.

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

Isaac Dadzie 5 May 18, 2022
Python3 parser for Apple's crash reports

pyCrashReport in intended for analyzing crash reports from Apple devices into a clearer view, without all the thread listing and loaded images, just the actual data you really need to debug the probl

7 Aug 19, 2022
📦 A command line utility to put text in a box.

boxie A command line utility to put text in a box. Installation pip install boxie If you are on Linux you may need to use sudo to access this globally

Eliaz Bobadilla 10 Jun 30, 2022
A project designed to make taking notes easier than ever - by doing it all on command line

A project designed to make taking notes easier than ever - by doing it all on command line! Yes, all of your files are easily accessible through one command interface, and can be written to at any ti

1 Dec 10, 2021
Cli tool to browse and play anime

browse and watch anime (scrape from gogoanime) (wip) basically ani-cli but in python cuz python good demo dependencies mpv installation from pypi pip

sheep padowo 2 Apr 20, 2022
CLI Web-CAT interface for people who use VIM.

CLI Web-CAT CLI Web-CAT interface. Installation git clone https://github.com/phuang1024/cliwebcat cd cliwebcat python setup.py bdist_wheel sdist cd di

Patrick 4 Apr 11, 2022
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

Richard Mwewa 30 Sep 08, 2022
Easy-to-use terminal program that can compile your code.

Description Easy-to-use terminal program that can compile your code. Installition 1. Cloning repository $ git clone https://github.com/DarkJoij/Compil

DarkJoij 1 Oct 21, 2021
A basic molecule viewer written in Python, using curses; Thus, meant for linux terminals

asciiMOL A basic molecule viewer written in Python, using curses; Thus, meant for linux terminals. This is an alpha version, featuring: Opening defaul

Dominik Behrens 328 Dec 11, 2022
Command-line program for organizing and managing ebook collections

Command-line program for organizing and managing ebook collections. It is a Python port from the original shell scripts ebook-tools

Raul 14 Nov 12, 2022
A command line tool to hide and reveal information inside images (works for both PNGs and JPGs)

Imgrerite A command line tool to hide and reveal information inside images (works for both PNGs and JPGs) Dependencies Python 3 Git Most of the Linux

Jigyasu 10 Jul 27, 2022
Get Air Quality Index for your city/country 😷

Air Quality Index CLI Get Air Quality index for your City. Installation $ pip install air-quality-cli Contents Air Quality Index CLI Installation Cont

Yankee 40 Oct 21, 2022