GithubHelp home page GithubHelp logo

ebrahimraeyat / freecad-help Goto Github PK

View Code? Open in Web Editor NEW

This project forked from freecad/freecad-help

0.0 1.0 0.0 47 KB

A new Help system for FreeCAD

License: GNU Lesser General Public License v2.1

Python 97.11% CSS 2.89%

freecad-help's Introduction

Help module for FreeCAD

This is a work-in-progress module aimed at replacing the entire FreeCAD Help system. Its primary use is to display a documentation page. It can do so in several ways:

  • In a new tab in the FreeCAD UI
  • In a standalone, dockable dialog
  • In the system's default browser

It can also fetch documentation from different sources and in different formats:

  • From a locally installed collection of markdown files
  • From an online repository of markdown files
  • From an online website, such as a wiki

It also included a FreeCAD preferences page under General tab to allow users to set their preferred source and format from the above options.

This also turns the FreeCAD help system usable by addons, that can have the help system open custom URLs.

Later on, it could also be extended to do more powerful things such as populating a Help menu or inserting content (images, etc) into tooltips.

Python usage

The main usage is using the "show" function. It can retrieve an URL, a local file (markdown or html), or find a page automatically from the settings set under Preferences->General->Help.

It doesn't matter what you give, the system will recognize if the contents are HTML or Markdown and render it appropriately.

Basic usage:

import Help
Help.show("Draft Line")
Help.show("Draft_Line") # works with spaces or underscores
Help.show("https://wiki.freecadweb.org/Draft_Line")
Help.show("https://gitlab.com/freecad/FreeCAD-documentation/-/raw/main/wiki/Draft_Line.md")
Help.show("/home/myUser/.FreeCAD/Documentation/Draft_Line.md")
Help.show("http://myserver.com/myfolder/Draft_Line.html")

Preferences keys (in "User parameter:BaseApp/Preferences/Mod/Help"):

optionBrowser/optionTab/optionDialog (bool): Where to open the help dialog
optionOnline/optionOffline (bool): where to fetch the documentation from
URL (string): online location
Location (string): offline location
Suffix (string): a suffix to add to the URL, ex: /fr
StyleSheet (string): optional CSS stylesheet to style the output

freecad-help's People

Contributors

yorikvanhavre avatar roy-043 avatar chennes avatar ebrahimraeyat avatar donovaly avatar estebandugueperoux2 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.