GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sw1sh/codeformatter: Format Wolfram Language source code

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

436 Commits
436 Commits

Folders and files

NameName
Last commit message
Last commit date
CodeFormatter
CodeFormatter
 
 
CodeParser/Data
CodeParser/Data
 
 
CodeTools/Generate
CodeTools/Generate
 
 
Tests
Tests
 
 
cmake
cmake
 
 
docs
docs
 
 
scripts
scripts
 
 
.WolframResources
.WolframResources
 
 
.gitignore
.gitignore
 
 
.project
.project
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
HowToBuild.md
HowToBuild.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

CodeFormatter

CodeFormatter is a package that provides functionality for formatting Wolfram Language code.

Needs["CodeFormatter`"]

CodeFormat["If[a,f/@b,g/@c]"]
Out[2]= If[a,
            f /@ b
            ,
            g /@ c
        ]

Formatting the Wolfram Language from WTC 2020: Watch Video (youtube)

Setup

CodeFormatter depends on CodeParser paclet.

CodeFormatter and its dependencies are included in Mathematica 12.2 and above.

For older versions, install CodeFormatter paclet and dependencies from the public paclet server:

PacletInstall["CodeParser"]
PacletInstall["CodeFormatter"]

Build and install the CodeFormatter paclet locally

Using CodeFormatter

After CodeFormatter is installed, it can be used.

Needs["CodeFormatter`"]

CodeFormat["If[a,f/@b,g/@c]"]
Out[2]= If[a,
            f /@ b
            ,
            g /@ c
        ]

The input to CodeFormat may be a string, a File, or a list of bytes.

Troubleshooting

Make sure that the paclets can be found on your system:

Needs["CodeFormatter`"]

and try a basic example:

CodeFormat["If[a, b, c]"]

About

Format Wolfram Language source code

Resources

Readme
License

Contributing

Contributing
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.