Giter VIP home page Giter VIP logo

lmd's Introduction

lmd

A text-to-markdown list generator in go!

What is it?

lmd is a tool written by me to:

  1. Practice the go programming language with a small project
  2. Solve a problem in that I need an easy way to manage my task lists and have some way to archive them for future reflections

It just takes any plain text files and saves it into a markdown list. See the Input Format section in this document for details how that is represented.

Build

As of now, there is a prebuilt binary for macOS in the bin folder. If you want to build a custom version, you can follow this section.

You will need:

  • Most recent version of the go compiler.
  • A bin folder within the project root. It is recommended that the binary is placed here.
  • Computer in UNIX environment to run scripts. This means, macOS, Linux or Windows with WSL.

To build, just navigate to the project root and execute the following command:

go build -o bin/lmdsh

Now, lmd will be the binary that lives in the bin folder.

Preparing for Usage

โš ๏ธ The script on the project root makes assumptions that the binary is already in the bin folder.

The lmdsh script is very opinionated. You'll have to edit it yourself to make it work the way you want.

lmdsh looks like this:

DATE=$(date '+%Y-%m-%d')
./bin/lmd $1 > output/$DATE.md
cp output/$DATE.md ~/code/work-log
cd ~/code/work-log
git add . && git commit -m "$DATE log" && git push
  1. lmd is executed and is assumed to be in the bin folder.
  2. A file with the filename format $DATE.md is output.
  3. Once an output markdown file is generated, the output markdown file is copied to a git repository within ~/code/work-log.
  4. Go to the git repository and commit things.

Notice that you can modify any step in the script. Most likely you'll want to modify the part where the output file is copied to a git repo. Feel free to hack around.

Usage

Execute the lmdsh script with a path to the input text file as an argument:

./lmdsh /path/to/input.txt

Input Format

Input files are just regular text files with the assumption that the first line is the title of the list. Every line following the first line is a list item.

So something like this:

my list
wake up
brush teeth
read
breakfast

Turns into this:

# my list
* [ ] wake up
* [ ] brush teeth
* [ ] read
* [ ] breakfast

Contact

Reach out to me if you have issues. This was written as a personal project and I just wanted to share so that others may use it or get some inspiration on their own. ๐Ÿ˜„

Website: https://roger.lol

Email: [email protected]

lmd's People

Contributors

urbanspr1nter avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.