File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ index.js
2
+ octave /octave-workspace
1
3
cmdline.term
2
4
sage-plots-for * .tex
3
5
* .sout
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+ # coding: utf8
3
+
4
+ '''
5
+ This creates an index file `index.js` such that SageMathCloud (https://cloud.sagemath.com)
6
+ knows about each relevant file, information in it, etc.
7
+
8
+ The format of `index.js` is standard JSON, such that a node.js process can read it easily.
9
+ '''
10
+
11
+ from json import dump
12
+ from codecs import open
13
+ from glob import glob
14
+ from os .path import isdir
15
+
16
+ index = []
17
+
18
+ for fn in glob ("*" ):
19
+ if isdir (fn ):
20
+ index .append (fn )
21
+
22
+ with open ("index.js" , "w" , "utf8" ) as out :
23
+ dump (index , out )
24
+
Original file line number Diff line number Diff line change
1
+ .PHONY = index
2
+
3
+ index :
4
+ @echo " indexing examples for SMC"
5
+ ./index.py
6
+
You can’t perform that action at this time.
0 commit comments