Build Status

hs-cli

Installation

$ gem install hs-cli

Usage

Local server

If your course XML path is at content/course.xml you can start local server using command:

hscli content/course.xml

You should be able to see your course on localhost:8080.

Course XML format

Example of course XML file:

<?xml version="1.0" encoding="UTF-8"?>
<course
  slug="getting-started-with-the-web"
>
  <title>
    ვებ დეველოპმენტი დამწყებთათვის
  </title>

  <chapters>
    <chapter file="01-overview.xml" />
    <chapter file="02-basic-software.xml" />
    <chapter file="03-what-will-your-website-look-like.xml" />
    <chapter file="04-dealing-with-files.xml" />
    <chapter file="05-html-basics.xml" />
    <chapter file="06-css-basics.xml" />
    <chapter file="07-js-basics.xml" />
    <chapter file="08-publishing-your-website.xml" />
    <chapter file="09-how-the-web-works.xml" />
  </chapters>
</course>

Chapter XML format

Example of chapter XML file:

<?xml version="1.0" encoding="UTF-8"?>
<chapter slug="overview">
  <title>
    კურსის მიმოხილვა
  </title>

  <intro>
    "ვებ დეველოპმენტი დამწყებთათვის" არის პრაქტიკული ვებ პროგრამირების მოკლე კურსი.
    თქვენ შეისწავლით როგორ შექმნათ და გამოაქვეყნოთ მარტივი ვებგვერდის კოდი.
  </intro>

  <p>
    პროფესიონალური ვებსაიტის შექმნა ბევრ შრომას მოითხოვს.
    თუ დამწყები ხართ სჯობს არ აჩქარდეთ, რადგან დღესვე შემდეგი
    ფეისბუკის შექმნა გაგიჭირდებათ.
    მაგრამ თქვენი მარტივი ვებგვერდის ინტერნეტში გაშვება არაა რთული.
  </p>
</chapter>

More examples

You can find out more looking at our example course repo.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/hackersrc/hs-cli. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.