Skip to content
Merged

Dev #58

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
node-version: 20
- name: Run tests
run: |
rustup update
cd server
./bt install --dev
./bt test
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
# the CodeChat Editor. If not, see
# [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
#
# # .prettierignore -- files for Prettier to ignore
# `.prettierignore` -- files for Prettier to ignore
# =================================================
#
# NPM
client/node_modules/
Expand Down
144 changes: 79 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
# Welcome to the CodeChat Editor
Welcome to the CodeChat Editor
==============================

The CodeChat Editor is a GUI-based programmer's word processor /
[Jupyter](https://jupyter.org/) for software developers. This document describes
its basic features and use. In contrast, the [style guide](docs/style_guide.cpp)
provides strategies for effectively employing the CodeChat Editor to improve the
software development process.

## Installation
Installation
------------

Install the
[CodeChat Editor extension for Visual Studio code](extensions/VSCode/README.md).
For developers, see [building from source](docs/design.md).
Install the [CodeChat Editor extension for Visual Studio
code](extensions/VSCode/README.md). For developers, see [building from
source](docs/design.md).

## Structure
Structure
---------

The CodeChat Editor divides source code into code blocks and documentation (doc)
blocks.​ These blocks are separated by newlines; the image below shows the
Expand All @@ -21,32 +24,36 @@ blocks.​ These blocks are separated by newlines; the image below shows the
in the CodeChat Editor (using the VSCode extension). Specifically, this
screenshot shows:

- <span style="font-size: 20pt;">❶</span>: a doc block. Doc blocks must have one
space after the comment delimiter.​
- <span style="font-size: 20pt;">❷</span>: a code block. Comments on the same
line as code are not interpreted as doc blocks.​
- <span style="font-size: 20pt;">❸</span>: varying indents before a doc block.
- <span style="font-size: 20pt;">❹</span>: [Markdown](https://commonmark.org/)
in a doc block; see a
[brief overview of Markdown](https://commonmark.org/help/).
* <span style="font-size: 20pt;">❶</span>: a doc block. Doc blocks must have
one space after the comment delimiter.​
* <span style="font-size: 20pt;">❷</span>: a code block. Comments on the same
line as code are not interpreted as doc blocks.​
* <span style="font-size: 20pt;">❸</span>: varying indents before a doc block.
* <span style="font-size: 20pt;">❹</span>: [Markdown](https://commonmark.org/)
in a doc block; see a [brief overview of
Markdown](https://commonmark.org/help/).

![Image showing code blocks and doc blocks in Visual Studio Code](docs/code-blocks-doc-blocks.png)
![Image showing code blocks and doc blocks in Visual Studio
Code](docs/code-blocks-doc-blocks.png)

See the [style guide](docs/style_guide.cpp) for more examples.

## Editing
Editing
-------

Edits may be made either in the IDE hosting the CodeChat Editor, or within the
CodeChat Editor window itself. Edits made in one place are transferred to the
other after a short delay.

## Navigation
Navigation
----------

Switching documents in the IDE likewise switches the document shown in the
CodeChat Editor. Likewise, following hyperlinks in the CodeChat Editor to a
local file loads that file in the IDE, as well as showing it in the Editor.

## References to other files
References to other files
-------------------------

The CodeChat Editor supports hyperlinks to any recognized file type; to refer to
another source file, simply insert a hyperlink to it. For example,
Expand All @@ -68,7 +75,8 @@ docs/
monitor.png
```

## Images
Images
------

Likewise, the path to local images is relative to the current file's location
(see the preceding diagram for the location of `monitor.png`). For example
Expand All @@ -82,17 +90,19 @@ Although the CodeChat Editor allows drag-and-drop of images, the result is a
mess -- the image data is embedded directly in the source file. Avoid this;
instead, place images in a separate file, then reference them as shown above.

## Projects
Projects
--------

The CodeChat Editor can either display a single file, or a project. In a
project, the table of contents is displayed on the left, while a file within the
project is displayed on the right. To create a project, simply place a file
named `toc.md` at the root of your project [\[2\]](#notes); its contents define
the table of contents. See the
[new project template](https://github.com/bjones1/CodeChat_Editor/tree/main/new-project-template)
the table of contents. See the [new project
template](https://github.com/bjones1/CodeChat_Editor/tree/main/new-project-template)
for a simple example.

## Mathematics
Mathematics
-----------

The CodeChat Editor uses [MathJax](https://www.mathjax.org/) to support typeset
mathematics. Place the delimiters `$` or `\\(` and `\\)` immediately before and
Expand Down Expand Up @@ -134,9 +144,9 @@ The CodeChat Editor contains rudimentary support for diagrams created by
| -------------------------------------------------------------- | ------------------------------------------------------------ |
| `<graphviz-graph graph="digraph { A -> B }"></graphviz-graph>` | <graphviz-graph graph="digraph { A -> B }"></graphviz-graph> |

To edit these diagrams, use an
[HTML entity encoder/decoder](https://mothereff.in/html-entities) and a Graphviz
editor such as [Edotor](https://edotor.net/).
To edit these diagrams, use an [HTML entity
encoder/decoder](https://mothereff.in/html-entities) and a Graphviz editor such
as [Edotor](https://edotor.net/).

### Mermaid

Expand All @@ -147,9 +157,9 @@ The CodeChat Editor contains rudimentary support for diagrams created by
| --------------------------------------------- | ---------------------------------------------- |
| `<wc-mermaid>graph TD; A --> B;</wc-mermaid>` | <wc-mermaid>graph TD; A --&gt; B;</wc-mermaid> |

To edit these diagrams, use an
[HTML entity encoder/decoder](https://mothereff.in/html-entities) and the
[Mermaid live editor](https://mermaid.live/).
To edit these diagrams, use an [HTML entity
encoder/decoder](https://mothereff.in/html-entities) and the [Mermaid live
editor](https://mermaid.live/).

### PlantUML

Expand All @@ -160,40 +170,43 @@ diagram directly to an SVG; for example,
| ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `![Sample PlantUML diagram](https://www.plantuml.com/plantuml/svg/ SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd9vt98pKi1IW80)` | ![Sample PlantUML diagram](https://www.plantuml.com/plantuml/svg/SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd9vt98pKi1IW80) |

To edit these diagrams, paste the URL into the
[PlantUML web server](https://www.plantuml.com/plantuml/uml), click Decode URL,
edit, then copy and paste the SVG URL back to this file.

## <a id="supported-languages"></a>Supported languages

- C/C++
- C#
- CSS
- Go
- HTML
- Java/Kotlin
- JavaScript/ECMAScript and TypeScript
- JSON with comments ([JSON5](https://json5.org/))
- Markdown
- MATLAB
- Python
- Rust
- Shell scripts (`.sh`)
- SQL
- Swift
- TOML
- VHDL
- Verilog/SystemVerilog
- Vlang
- YAML

## Issues and feature requests

Please report issues and provide suggestions for improvement using the
[Github page for this project](https://github.com/bjones1/CodeChat_Editor).
To edit these diagrams, paste the URL into the [PlantUML web
server](https://www.plantuml.com/plantuml/uml), click Decode URL, edit, then
copy and paste the SVG URL back to this file.

<a id="supported-languages"></a>Supported languages
---------------------------------------------------

* C/C++
* C#
* CSS
* Go
* HTML
* Java/Kotlin
* JavaScript/ECMAScript and TypeScript
* JSON with comments ([JSON5](https://json5.org/))
* Markdown
* MATLAB
* Python
* Rust
* Shell scripts (`.sh`)
* SQL
* Swift
* TOML
* VHDL
* Verilog/SystemVerilog
* Vlang
* YAML

Issues and feature requests
---------------------------

Please report issues and provide suggestions for improvement using the [Github
page for this project](https://github.com/bjones1/CodeChat_Editor).
Contributions to the code are welcome and encouraged!

## License
License
-------

Copyright (C) 2022 Bryan A. Jones.

Expand All @@ -213,11 +226,12 @@ You should have received a [copy](LICENSE.html) of the GNU General Public
License along with the CodeChat Editor. If not, see
[https://www.gnu.org/licenses/](https://www.gnu.org/licenses/).

## <a id="notes"></a>Notes
<a id="notes"></a>Notes
-----------------------

1. The image used comes from
[Monitor icons created by prettycons - Flaticon](https://www.flaticon.com/free-icons/monitor "monitor icons").
1. The image used comes from [Monitor icons created by prettycons -
Flaticon](https://www.flaticon.com/free-icons/monitor "monitor icons").
2. Note that the filename for the table of contents is lowercase; while the
acronym is TOC, requiring upper-case naming can cause confusion when moving
files between case-insensitive filesystems (Windows) and case-sensitive
filesystems (Linux/OS X).
filesystems (Linux/OS X).
3 changes: 2 additions & 1 deletion builder/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
# the CodeChat Editor. If not, see
# [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
#
# # `.gitignore` -- files for Git to ignore
# `.gitignore` -- files for Git to ignore
# =======================================
#
# Rust build output
target/
Expand Down
47 changes: 19 additions & 28 deletions builder/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading