Giter Club home page Giter Club logo

litestore's Introduction

H3RALD Web Site

H3RALD.com was created in 2004 by Fabio Cevasco, a technical writer, programmer and IT enthusiast. It features over a hundred articles covering a wide range of topics, from programming to writing, productivity and even traveling.

Currently, this site is fully static (minus a few AJAX calls) and is powered by the HastySite static site generator.

Licensing

Unless stated otherwise, all the content published on this web site is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

The source code of this web site, such as its layout, stylesheets, custom min rules and code is licensed under the terms of the MIT License.

How to generate and run this site locally

  1. Download and install Nim.
  2. Clone Nifty, compile it and place the nifty executable in your $PATH.
  3. Clone nimhttpd, compile it and place the nimhttpd executable in your $PATH.
  4. Clone HastySite.
  5. Run nifty install in the hastysite repository folder.
  6. Compile hastysite and place its executable in your $PATH.
  7. Clone this repository.
  8. In the h3rald repository folder, run hastysite build.
  9. Start LiteStore by running litestore in the h3rald repository folder.
  10. Start the NimHTTPd server by running nimhttpd in the output folder of the h3rald repository (create automatically when running hastysite build).

Credits

litestore's People

Contributors

arikrahman avatar h3rald avatar infinitybeond1 avatar skellock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

litestore's Issues

Test failing

/Users/h3rald/Development/litestore/test/http_api.nim(194, 37): Check failed: json["results"][3]["data"] == testdata
   json["results"][3]["data"] was {"age":null,"email":null}
   testdata was {"age":36,"email":"[email protected]"}
   /Users/h3rald/Development/litestore/test/http_api.nim(200, 23): Check failed: json["data"] == testdata
   json["data"] was {"age":null}
   testdata was {"age":31}

App: Upload files

Allow file uploading by browsing local filesystem and/or drag & drop.

Documentation

Provide complete documentation, both as standalone document and integrated in the app.

Invalid nimble file

Move all custom fields out of the nimble file.

Error: unhandled exception: Invalid field: appame [ENimble]

App: Search

Implement support for searching text files within the app.

Great Job

Man, what a gem of a project.

Thank you for open sourcing this.

๐Ÿ˜ป

Unable to modify or cancel file upload

At present, it is not possible to edit the document ID in the upload dialog after it is set for the first time, and it is not possible to "cancel" an upload (clearing all fields of the form).

Serve directory contents

By default, when running LiteStore with -d option specified, the directory contents should be served by LiteStore web server.

Open default document in browser

  • Add default_page column to info table
  • Increment db Schema version
  • Add --default:<doc_id> option to set/unset default page
  • Add logic to open default document in browser at startup if default is set

Use with Nim web-framework?

Is it possible to use Litestore as a prototype-DB for a Nim web-framework?

I am currently tinkering with Jester and I would like to add/edit/delete JSON (via the Jester-backend).

So instead of having Litestore be a client-facing datastore (as the documentation shows), I would instead like to use litestore in this manner:

Client <-> Jester-REST-API <-> litestore-DB

Is this possible to achieve?

If yes, are you able to share a small example in the readme file? It may help a lot of people that want to prototype small webapps with Jester+Litestore

Thanks!

-s:<db> does not work on windows

The executable defaults to data.db no matter what the -s or --store value is
Is the same for both the x86 and x64 builds.
Version 1.0.1

Pack/unpack directories

Implement methods to:

  • recursively "pack" the contents of a directory into a data store
  • "unpack" a previously-packed directory (removing also the corresponding contents from the datastore)

Machine Tags

LiteStore should support Flickr-style machine tags.

Examples:

  http://localhost:9500/docs?sys.type=text;*.subtype=*;
  http://localhost:9500/docs?sys.format=binary;myapp.something=%22something%20else%22

Whitespace Cleanup

Was wondering if you'd be ok with a PR that cleaned up whitespace in *.nim?

image

Thanks!

mirror operation

Enable LiteStore to "mount" a local directory and keep it mirrored both on the database and the filesystem.

Performance Improvements

Apply the following changes to improve performance for large (> 1GB) SQLite database.

Modify compilation flags

   {.passC: "-DSQLITE_ENABLE_FTS4=1 -DSQLITE_DEFAULT_LOCKING_MODE=1".}

Configure PRAGMAs when opening the database

   discard result.db.tryExec("PRAGMA locking_mode = exclusive;".sql)
   discard result.db.tryExec("PRAGMA journal_mode = WAL;".sql)
   discard result.db.tryExec("PRAGMA page_size = 4096;".sql)
   discard result.db.tryExec("PRAGMA cache_size = 10000;".sql)
   discard result.db.tryExec("PRAGMA synchronous = NORMAL;".sql)

Execute commands on data store via command line

  • vacuum
  • optimize/rebuild

Import optimizations

  1. DROP INDEX for docid
  2. Import data
  3. CREATE INDEX for docid
  4. OPTIMIZE
  5. VACUUM

Additional indexes

     CREATE INDEX tags_document_id ON tags(document_id);
     CREATE INDEX tags_tag_id ON tags(tag_id);
     CREATE INDEX documents_id ON documents(id);

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.