Code Monkey home page Code Monkey logo

cwd-documentation's Introduction

Compact Web Document documentation

This repository will hold all documentation resources and help & tricks in order to get all setup and ready to use.

The structure of the project

The CWD repositories are distributed as follows:

  • cwd-reader - Cross platform GUI reader for the CWD format
  • cwd-lib - Core of CWD that includes all manipulation of the document API
  • cwd-integrations - Some example of integration of the CWD lib
  • cwd-editor - Document editor and creator for the CWD format
  • cwd-app - Cross platform mobile application
  • cwd-assets - Assets, resources, graphics and more
  • cwd-site-frontend - Frontend for the CWD public site
  • cwd-site-backend - Web Services for the CWD public site
  • cwd-test - Automated testing suite for all the libraries and CWD repositories

CWD file structure

You can create a ZIP file and rename it as ".cwd", the archive should include these base files:

  • cwd.html that is the main content of the CWD file, the HTML shouldn't contain any HTML tag
    • The file should be structured like:
    <div class="page" size="A4" layout="portrait">
        <h1>Sample title</h1>
        <p>Sample text.</p>
    </div>
  • cwd.toml that contains some document meta-information:
    • The file should be structured like:
    version = "1.0"
    title = "A test document"
  • resources/cwd.css that is the main document stylesheet with any custom rule
  • You can embed many resources as needed, just put files inside the resources directory and use in the cwd.html or cwd.css with the cwd://resources/file.ext way.

Building

If you want a minimal environment where you can play with the CWD format, act as follows:

  • Create a cwd folder where you'll put all project repositories
  • Enter on the cwd folder
  • Clone this repository
  • Clone the cwd-lib repository
  • Clone the cwd-reader repository
  • Download the appropriate CEF distribution, you can pick-up one via Spotify here

These are the minimal needed projects for let CWD running.

Linux (Ubuntu)

Currently supported distributions include Debian Wheezy, Ubuntu Precise, and related. Ubuntu 18.04 64-bit is recommended. Newer versions will likely also work but may not have been tested.

Required packages include:

  • build-essential
  • libgtk2.0-dev (required by the cefclient target only)
  • libgtkglext1-dev (required by the cefclient target only)

Install the needed Rust binaries and tools:

  • curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

MacOS

Xcode 8 or newer building on MacOS 10.10 (Yosemite) or newer. Xcode 11.2 and MacOS 10.14 are recommended. The Xcode command-line tools must also be installed. Only 64-bit builds are supported.

Install the needed Rust binaries and tools:

  • curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Windows (TODO)

Visual Studio 2015 or newer building on Windows 7 or newer. Visual Studio 2019 and Windows 10 64-bit are recommended.

Install the needed Rust binaries and tools:

  • Download Rust here

Running

First of all, you need to build the cwd-lib library, you can do it with cargo +stable build inside the cwd-lib folder. Once you do that, the library will be available for the Reader embedding.

Second, you have to export the CWD_LIB_PATH environment variable with the absolute path of the target dir lib (eg. "/home/user/cwd/cwd-lib/target") and another CEF_SRCS variable with the downloaded CEF distribution path (eg. "/home/user/Downloads/cef")

Three, you have to build the cwd-reader in order to play with the CWD file, please install CLion EAP and then open the cwd-reader project and simply run it.

If everything is setup correctly, you will see something like:

CWD Reader

cwd-documentation's People

Contributors

emulator000 avatar

Stargazers

 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.