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
bsp_tool provides a Command Line Interface for analysing .bsp files

bsp_tool Python library for analysing .bsp files bsp_tool provides a Command Line Interface for analysing .bsp files Current development is focused on

Jared Ketterer 64 Dec 28, 2022
RSS reader client for CLI (Command Line Interface),

rReader is RSS reader client for CLI(Command Line Interface)

Lee JunHaeng 10 Dec 24, 2022
commandpack - A package of modules for working with commands, command packages, files with command packages.

commandpack Help the project financially: Donate: https://smartlegion.github.io/donate/ Yandex Money: https://yoomoney.ru/to/4100115206129186 PayPal:

4 Sep 04, 2021
Basic python tools to generate shellcode runner in vba

vba_bin_runner Basic python tools to generate shellcode runner in vba. The stub use ZwAllocateVirtualMemory to allocate memory, RtlMoveMemory to write

4 Aug 24, 2021
Todo - You could use terminal to set your todo

Python Tutorial You can learn how to build a terminal application(CLI applicatio

29 Jun 29, 2022
img-proof (IPA) provides a command line utility to test images in the Public Cloud

overview img-proof (IPA) provides a command line utility to test images in the Public Cloud (AWS, Azure, GCE, etc.). With img-proof you can now test c

13 Jan 07, 2022
CLI translator based on Google translate API

Translate-CLI CLI переводчик основанный на Google translate API как пользоваться ? запустить в консоли скомпилированный скрипт (exe - windows, bin - l

7 Aug 13, 2022
Modern line-oriented terminal emulator without support for TUIs.

Modern line-oriented terminal emulator without support for TUIs.

10 Jun 12, 2022
Chat with Rem in Terminal!

Chat with Rem in Terminal!

bariscodefx 1 Dec 19, 2021
🗃️ Fileio-cli wrapper for fileioapi.py with fire.py, inspiration DOS

🗃️ File.io File.io simply upload a file, share the link, and after it is downloaded, the file is completely deleted. An API wrapper for the file.io w

nkot56297 2 May 12, 2022
Alacritty terminal used with Bash, Tmux, Vim, Mutt, Lynx, etc. and the many different additions added to each configuration file

Alacritty terminal used with Bash, Tmux, Vim, Mutt, Lynx, etc. and the many different additions added to each configuration file

Carter 19 Aug 24, 2022
A simple python application for running a CI pipeline locally

A simple python application for running a CI pipeline locally This app currently supports GitLab CI scripts

Tom Stowe 0 Jan 11, 2022
sync-my-tasks is a CLI tool that copies tasks between apps.

sync-my-tasks Copy tasks between apps Report a Bug · Request a Feature . Ask a Question Table of Contents Table of Contents Getting Started Developmen

William Hutson 2 Dec 14, 2021
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

Astaqc 8 Feb 22, 2022
TUIFIManager - A cross-platform terminal-based file manager

TUIFI Manager A cross-platform terminal-based file manager (and component), mean

142 Dec 26, 2022
A Neat Application To Manage Your To-Do Lists.

WTD - What To Do? A Neat Application To Manage Your To-Do Lists. One folder can only have one to-do file. Running wth without any subcommands executes

Adam Vajda 1 Oct 24, 2021
NudeNet wrapper made to provide a simple cli interface to the library

Nudenet Wrapper. Small warpper script for NudeNet Made to provide a small and easy to use cli interface with the library. You can indicate a single im

1 Oct 20, 2021
Example of a CLI with python - know the extension of your files.

extensionCLI Example of a CLI with python - know the extension of your files. Usage: Install the CLI: pip3 install -e . Run the command with "ext" + t

ItanuRomero 5 Dec 29, 2022
Command line client for Audience Insights

Dynamics 365 Audience Insights CLI The AuI CLI is a command line tool for Dynamics 365 Audience Insights. It is based on the customerinsights Python l

Microsoft 8 Jan 09, 2023