Giter Club home page Giter Club logo

at's Introduction

title tags date
AddToday
doc tool
2024-02-18 10:50:31 -0800

icon

Abstract

A CLI tool help you with templates(often daily templates that are supposed to be appended to diary-like recording markdown file frequently). The name At comes from Add Today, Add Templates, Arrange Templates or anything else.

It's aimed to:

  • add templates for specified markdown files like diary
  • manage those templates

Its advantages:

  • Other than static template, templates can be generated by the script you write. At the example/example_tplt, it contains local date and time.

  • It can freely interact with your editor(default: vim), just:

    export EDITOR=YOUREDITOR

Quick Start

  1. install the requirements:

    pip install --requirement requirements.txt

  2. Add notes

    python ./at.py addnote [your note's brief name] [/your/note/path]

  3. Add template

    python ./at.py addtplt [your addded name] [template name]

  4. Edit template(here is an example, all you need to do is to generate a importable string variable tplt )

   #!/bin/python3
   #-*-coding:UTF-8-*-
   #Author: LeafLight
   #Date: 2024-02-18 16:03:40
   #---
   from datetime import datetime

   now = datetime.now()
   # Reference:
   # [format codes of datetime](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes)
   
   ################################
   # this variable below is vital #
   ################################
   tplt = """
   ## %s
   - Day: %s, %s 
   - Week: %s
   - Fullfilling:
   - Keywords: 
   - Next Week Plan:
     """ % (
           now.date(), 
           now.strftime("%a"),
           now.strftime("%p"),
           now.strftime("%W")
           )
  1. Edit the note with the template having been appended to it

    python ./at.py n [note] [template]

Extra

  • The {note: path/to/note} json file is named note.json, edit it if you have changed the location of the notes, or just addnote again with new location using the same name.

  • command list

# Print note.json in module rich
python ./at.py list
# Print the templates of specified note name
python ./at.py list --name=YourNoteNameHere

at's People

Contributors

leaflight avatar

Watchers

 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.