Skip to content

Commit

Permalink
Fcatools (#141)
Browse files Browse the repository at this point in the history
* Implemented Method for Accessing Contexts from FCATools Repository.

* Removed Previously Downloaded Contexts.

* Added Documentation.

* Minor Formatting Correction

* Minor Formatting Correction

* Minor Grammar Correction
  • Loading branch information
JannikNordmeyer authored Jan 10, 2025
1 parent aef2285 commit 0f45451
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/IO.org
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ You can obtain a list of available context output formats by calling
formats for formal contexts, you are also able to export formal contexts
directly to TeX-code using ~:tex~.

Formal contexts can also be accessed from the [[https://github.com/fcatools/contexts/tree/main/contexts][fcatools]] library using the following function:

#+begin_src clojure
(context-from-fcatools "animals_en.cxt")
#+end_src
The only parameter is the name of the file from the ~fcatools~ directory.

The function can be found in the ~conexp.fca.applications.fcatools~ namespace.


** Many-Valued Contexts

Expand Down
7 changes: 7 additions & 0 deletions src/main/clojure/conexp/fca/applications/fcatools.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(ns conexp.fca.applications.fcatools
(:require [conexp.io.contexts :refer :all]))

(defn context-from-fcatools [ctx-name]
(read-context (str "https://raw.githubusercontent.com/fcatools/contexts/main/contexts/" ctx-name))
)

0 comments on commit 0f45451

Please sign in to comment.