A command line simple note taking app

Related tags

Deep Learning note
Overview

Why yet another note taking program?

note was designed with a very specific target in mind: me, and my 2354 scraps of paper. It runs from the command line for simple note taking. See "Technical information" on how the notes are handled (TL;DR: in simple separate text files).

Installation

MS Windows

The simple way

You can use the executable available in "Releases". This is an executable, and you should never ever execute an executable from a stranger. Except from me because I am a good guy.

You need to copy note.exe to a place that is in your Path, and you can then do magical things such as

<Win Key>note q my first /oh a title/ note #france<Enter>

The more complicated way

OK, you do not trust me. Fine. ಠ╭╮ಠ

After having painstakingly analyzed the Python code for malicious content (and thanked the developer for the extended comments that helped enormously), you can rebuild the executable from scratch

cd /the/directory/with/note.py
pip3 install -r requirements.txt
pip3 install pyinstaller
pyinstaller --onefile note.py

After several cryptic lines you will find your executable in a newly created directory dist.

The alias way

I actually never used aliases in Windows, but apparently there is doskey for cmd and Set-Alias for PowerShell. I will someday update this README with relevant information but if someone could make a PR I would appreciate.

Linux

In bash you can add alias note='python3 /path/to/note.py' to your .bashrc.

Instructions for other shells will come here someday.

Usage

Important note At that stage, note is for well-behaved users that will not try to push it to its limits. Everything works per the documentation, but you may find some corner cases that were not caught yet. Please open an Issue so that I can rush to fix it.

Environment variables

NOTE_EDITOR - editor to use for notes. Defaults to notepad.exe (Windows) or vi (Linux).

NOTE_LOCATION - place where the notes are saved. Defaults to Note in the home directory.

NOTE_LOGLEVEL - default is INFO, possible values are DEBUG, INFO, WARNING, ERROR, CRITICAL

Managing notes

Notes have the following attributes:

  • a content (in files, you do not need to worry about that)
  • a serial number, which you access via $<serial number>
  • a title, that you provide as
    • /my title/ within the command line of a quick note
    • directly on the command line when creating a new note, or editing one (if you do not provide anything you will be asked for a title)

Creating notes (n)

You may want to create a note and start to edit it right away in an external editor

note n /a title if you want/

You can provide the title directly on the command line (between separators /), or you will be asked for one.

The other option ("quick notes") is to type the content of the note directly in the command line. You can add a title if you want (if you do not, you will be asked for one)

 note q some content /oh a title!/ can be anywhere" more content #atag

Edit notes (e)

In order to edit notes, you will be presented with a list of existing ones, you can choose the one you want to edit (or see) via its serial number (e.g. $3) or its title. The editor is then opened with the content of the note.

note e

Delete Notes (d)

note d

You will get a list of notes and delete the one you want to, again via its serial number (e.g. $3) or its title.

Notes are not actually deleted, they are just renamed to <filename>.bak. At some point I will have a garbage collector to remove them after some time.

Search notes (s)

You can search for keywords in titles and tags, and get a list of matching notes. You are then offered the opportunity to edit one right away.

note s cat dog

The keywords are matched with an OR (so in the example above notes with dog or cat in either the title or tags will be returned)

TODO

Below are some ideas for the short and longer term. New ideas welcome! Select "Feature request" at https://github.com/wsw70/note/issues/new/choose

short term

  • Autohotkey script
  • "dump mode" to retrieve all the notes in either one large file, or a zip
  • consider adding a configuration file instead of environment variables
  • add colors to teh table of notes, to differentiate quick ones, volatile notes (see below), etc. Maybe allow for " important tags" with a special color, or define a color by tag?
  • configure the sorting of lists (by title, serial or last modified)
  • add other typical ways to abort (Escape, Ctrl-C, ...)
  • check for identical titles (not sure yet if this is a good idea)
  • better control on unexpected situations via clever exception catching
  • searching in the content of the notes
  • short-lived notes (a #1d tag would automatically remove the note after one day) -> requires some kind of garbage collector (maybe as a collateral of some functions?)
  • maybe turn the functions into @staticmethod to visually better organize the code
  • actually delete old deleted notes (which are for now renamed to .bak)
  • process command line via doctopts or similar

longer term

  • simple and fast web app (ideally pure HTML and CSS)
  • API (not sure what for yet, but I like APIs)
  • Think about race conditions with the API or web app
  • Optional encryption

FAQ

Where are my notes?

If you did not do anything, they are in your home directory, in a directory called Note. Try to put %HOMEPATH%/Note in Windows Explorer and you should see them.

I would like my notes to be elsewhere

If you never started note, first set the environment variable NOTE_LOCATION to the place you want to have them.

If you already started note then set up the variable above, go to %HOMEPATH%/Note and copy the contents to the new location. You should see a bunch of weird files (they contain your notes) and a file db.json.

How to synchronize between computers?

The notes are just text files. You can use any synchronization program (Dropbox, OneDrive, Box, Nextcloud, Syncthing, ...)

How to synchronize with my mobile, my PS5, my Roku, my smartwatch?

Sorry, this won't work (at least easily). You can sure synchronize the files, but running note.py will be tough. Probably not impossible, but tough. Stay tuned for the web interface (but don't hold your breath either)

Technical information

Notes are stored in the Note directory in the home directory, or in teh one pointed to by the environment variable NOTE_LOCATION.

The content of a note is in a file with a generated random name (such as c5cc4de1f4044ea18b7e138f16837667).

Metadata is stored in db.json which lives in the same directory as the notes. The general structure of the file is

{
    "c5cc4de1f4044ea18b7e138f16837667": {
      "filename": "c5cc4de1f4044ea18b7e138f16837667",
      "tags": [
        "tag1",
        "tag2"
      ],
      "modified": "2021-02-22T11:11:41.252259+01:00",
      "title": "my #tag3 title",
      "serial": 1
    }
}

Donations

If you found note useful and feel that you want to donate something, please do it to a good charity. I do not need the money. If you have no idea where to donate, go to Restos Du Coeur , Médecins Sans Frontières, Secours Populaire, Emmaüs. Or anything that help others.

If you fond note so useful that you must do SOMETHING for me, drop me a note with your location (country, city - I do not want you home address!). I will ask you about good local addresses and tips should I travel in your area.

You might also like...
Automatically Build Multiple ML Models with a Single Line of Code. Created by Ram Seshadri. Collaborators Welcome. Permission Granted upon Request.
Automatically Build Multiple ML Models with a Single Line of Code. Created by Ram Seshadri. Collaborators Welcome. Permission Granted upon Request.

Auto-ViML Automatically Build Variant Interpretable ML models fast! Auto_ViML is pronounced "auto vimal" (autovimal logo created by Sanket Ghanmare) N

Joint deep network for feature line detection and description
Joint deep network for feature line detection and description

SOLD² - Self-supervised Occlusion-aware Line Description and Detection This repository contains the implementation of the paper: SOLD² : Self-supervis

Implementation for the
Implementation for the "Surface Reconstruction from 3D Line Segments" paper.

Surface Reconstruction from 3D Line Segments Surface reconstruction from 3d line segments. Langlois, P. A., Boulch, A., & Marlet, R. In 2019 Internati

The official PyTorch implementation of the paper: *Xili Dai, Xiaojun Yuan, Haigang Gong, Yi Ma.
The official PyTorch implementation of the paper: *Xili Dai, Xiaojun Yuan, Haigang Gong, Yi Ma. "Fully Convolutional Line Parsing." *.

F-Clip — Fully Convolutional Line Parsing This repository contains the official PyTorch implementation of the paper: *Xili Dai, Xiaojun Yuan, Haigang

Official Tensorflow implementation of
Official Tensorflow implementation of "M-LSD: Towards Light-weight and Real-time Line Segment Detection"

M-LSD: Towards Light-weight and Real-time Line Segment Detection Official Tensorflow implementation of "M-LSD: Towards Light-weight and Real-time Line

Pytorch implementation of
Pytorch implementation of "M-LSD: Towards Light-weight and Real-time Line Segment Detection"

M-LSD: Towards Light-weight and Real-time Line Segment Detection Pytorch implementation of "M-LSD: Towards Light-weight and Real-time Line Segment Det

General Virtual Sketching Framework for Vector Line Art (SIGGRAPH 2021)
General Virtual Sketching Framework for Vector Line Art (SIGGRAPH 2021)

General Virtual Sketching Framework for Vector Line Art - SIGGRAPH 2021 Paper | Project Page Outline Dependencies Testing with Trained Weights Trainin

Build tensorflow keras model pipelines in a single line of code. Created by Ram Seshadri. Collaborators welcome. Permission granted upon request.
Build tensorflow keras model pipelines in a single line of code. Created by Ram Seshadri. Collaborators welcome. Permission granted upon request.

deep_autoviml Build keras pipelines and models in a single line of code! Table of Contents Motivation How it works Technology Install Usage API Image

LETR: Line Segment Detection Using Transformers without Edges

LETR: Line Segment Detection Using Transformers without Edges Introduction This repository contains the official code and pretrained models for Line S

Comments
  • [BUG] MacOs Support

    [BUG] MacOs Support

    Describe the bug When I run note.py on Mac, I get:

    Traceback (most recent call last):
      File "/Users/test/src/note/note.py", line 377, in <module>
        raise NotImplemented
    TypeError: exceptions must derive from BaseException
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Users/test/src/note/note.py", line 380, in <module>
        except NotImplemented:
    TypeError: catching classes that do not inherit from BaseException is not allowed
    

    Expected behavior On inspection of the code, you should just see if this is running on MacOS, and use the linux settings - we have vi and bash on MacOS.

    As it is, I just hardcoded in the linux options, and note.py now works fine.

    bug enhancement 
    opened by vessenes 3
Releases(2.1)
  • 2.1(Feb 26, 2021)

    NEW

    • volatile files (a specific tag such as #1d will have the note deleted after 1 day, see README for details)
    • AutoHotKey information added
    • by adding started_from_autohotkey at the end of the command, note will wait for a final Enter key before exiting (useful when note is started in a non-interactive mode such as via AutoHotKey

    CORRECTED

    • NOTE_LOGLEVEL is now correctly setting the logging level
    Source code(tar.gz)
    Source code(zip)
    note.exe(6.59 MB)
  • 2.0(Feb 23, 2021)

    BREAKING CHANGES

    • there is no more q, it was merged into a new note to make it more natural
    • the tags key was removed in the database. You need to either create a new one, or modify the existing one by
      • removing the key tags with its content
      • remove the key files but leave the content You will then have a dict of dicts, see the Technical section in the README for an example

    Sorry for the breaking changes, there should not be more of them, or at least I will provide an upgrade path.

    Source code(tar.gz)
    Source code(zip)
    note.exe(6.59 MB)
  • 1.0(Feb 22, 2021)

Owner
null
Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Deep Daze mist over green hills shattered plates on the grass cosmic love and attention a time traveler in the crowd life during the plague meditative

Phil Wang 4.4k Jan 3, 2023
A simple command line tool for text to image generation, using OpenAI's CLIP and a BigGAN.

Ryan Murdock has done it again, combining OpenAI's CLIP and the generator from a BigGAN! This repository wraps up his work so it is easily accessible to anyone who owns a GPU.

Phil Wang 2.3k Jan 9, 2023
Quadruped-command-tracking-controller - Quadruped command tracking controller (flat terrain)

Quadruped command tracking controller (flat terrain) Prepare Install RAISIM link

Yunho Kim 4 Oct 20, 2022
The world's simplest facial recognition api for Python and the command line

Face Recognition You can also read a translated version of this file in Chinese 简体中文版 or in Korean 한국어 or in Japanese 日本語. Recognize and manipulate fa

Adam Geitgey 46.9k Jan 3, 2023
Selene is a Python library and command line interface for training deep neural networks from biological sequence data such as genomes.

Selene is a Python library and command line interface for training deep neural networks from biological sequence data such as genomes.

Troyanskaya Laboratory 323 Jan 1, 2023
Find-Lane-Line - Use openCV library and Python to detect the road-lane-line

Find-Lane-Line This project is to use openCV library and Python to detect the road-lane-line. Data Pipeline Step one : Color Selection Step two : Cann

Kenny Cheng 3 Aug 17, 2022
Streamlit App For Product Analysis - Streamlit App For Product Analysis

Streamlit_App_For_Product_Analysis Здравствуйте! Перед вами дашборд, позволяющий

Grigory Sirotkin 1 Jan 10, 2022
Simple streamlit app to demonstrate HERE Tour Planning

Table of Contents About the Project Built With Getting Started Prerequisites Installation Usage Roadmap Contributing License Acknowledgements About Th

Amol 8 Sep 5, 2022
TargetAllDomainObjects - A python wrapper to run a command on against all users/computers/DCs of a Windows Domain

TargetAllDomainObjects A python wrapper to run a command on against all users/co

Podalirius 19 Dec 13, 2022
GEP (GDB Enhanced Prompt) - a GDB plug-in for GDB command prompt with fzf history search, fish-like autosuggestions, auto-completion with floating window, partial string matching in history, and more!

GEP (GDB Enhanced Prompt) GEP (GDB Enhanced Prompt) is a GDB plug-in which make your GDB command prompt more convenient and flexibility. Why I need th

Alan Li 23 Dec 21, 2022