GithubHelp home page GithubHelp logo

axon's Introduction

Axon

I was tired of having my data in mutually incompatable silos (Google Photos, Pinboard, Markdown Notes, etc.), so I built Axon. Axon reads in data from various formats, converts it to axon-shaped data, and caches it in a local Sqlite database.

I can then use Axon to search this linked-data, back it up, export it, or build applications that use with interconnected data.

Importers

  • Marten: Semantic markdown notes

Importing Data

You can import data from anywhere, really. I've currently pulled in my (sanitised) shell-history, pinboard bookmarks, and bank-transaction history. Imports can be done using an executable script that outputs line-delimited-json, from json, yaml, csv files directly

axon import --topic 'zsh_history' --from "$HISTORY_SCRIPT_PATH" "importer.fpath=$HOME/.zsh_history"

Or through stdin. For example, here's a mini-todo app built using axon import from stdin

reminder () {
  local text=$1
  echo "{ \"id\": \"$(date)\", \"reminder\": \"$1\" }\n" | axon import --topic 'my-reminders' -
}

reminder "buy coffee"

Data Format

Axon works with (modestly) semantic data; each object (dubbed a 'thing') must have an ID so other things can reference it, and a child relationship to other things can be declared using the "is" property (or includes for parent relationships). For example, this set of things describes a piece of music and basic facts about the creators.

{
  "id": "Person",
  "includes": ["Conductor", "Pianist"]
}
{
  "id": "Glenn Gould",
  "is": "Pianist"
}
{
  "id": "Leonard Bernstein",
  "is": ["Composer", "Conductor", "Pianist"]
}
{
  "id:" "https://www.youtube.com/watch?v=BX0II6wZpps",
  "named": "Glenn Gould & Leonard Bernstein : J S Bach bwv1052 - Piano Concerto # 1 , Allegro",
  "is": ["YoutubeURL", "BWV 1052"],
  "performed-by": "Glenn Gould",
  "conducted-by": "Leonard Bernstein"
}

Other things can extend this information later.

{
  "id": "Identifier",
  "includes": ["URL", "ISBN"]
}
{
  "id": "URL",
  "includes": ["WikipediaURL"]
}
{
  "id": "Glenn Gould",
  "has": [
    # shorthand for creating a url with an id as its own thing, then linking by id
    ["https://en.wikipedia.org/wiki/Glenn_Gould", "WikipediaURL"],
    ["0195182464", "ISBN"]
  ]
}

Over time, you can grow a deeply interconnected knowledge-base of human & machine-readable information (especially if you use the markdown notes plugin!).

Diagram

flowchart TB

  you([you])

  you ===|data|CLIs

  subgraph Axon[Axon Engine]
    direction TB

    subgraph AxonCore[Axon]
      library[Axon Library]
      schemas[Axon Schema]
    end

    sqlite[(Sqlite Cache)] -.- AxonCore
    yourscripts[Your Scripts] -.- AxonCore
    pbscript[Import + Export Script] -.- AxonCore
  end

  CLIs === Axon

  subgraph CLIs[CLIs]
    direction TB

    subgraph Opts[Command-Line Options]
      direction TB

      opts_1[[your script, data paths]]
      opts_3[[queries]]
    end

    subgraph Rest[Axon CLIs]
      direction TB

      axon -.-> axon_import
      axon -.-> axon_export
    end

    Opts -.- Rest

  end

  subgraph Sources[Your data]
    md_node>markdown notes]
    websites[Websites]
    dbs[(Your DBs)]
  end

  CLIs ===|data| Sources
  CLIs ==>|updates| Sources
Loading

License

The MIT License

Copyright (c) 2022 Róisín Grannell

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

axon's People

Contributors

rgrannell1 avatar

Stargazers

 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.