markdown-up 2.5.0__tar.gz → 2.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-up
3
- Version: 2.5.0
3
+ Version: 2.5.1
4
4
  Summary: MarkdownUp is a Markdown viewer
5
5
  Home-page: https://github.com/craigahobbs/markdown-up-py
6
6
  Author: Craig A. Hobbs
@@ -212,10 +212,7 @@ async function exampleMain():
212
212
  n2 = objectGet(args, 'n2')
213
213
 
214
214
  # Call the backend service to add the two numbers
215
- sumResponseText = systemFetch(objectNew( \
216
- 'url', 'sumNumbers', \
217
- 'body', jsonStringify(objectNew('n1', n1, 'n2', n2)) \
218
- ))
215
+ sumResponseText = systemFetch({'url': 'sumNumbers', 'body': jsonStringify({'n1': n1, 'n2': n2})})
219
216
  sumResponseJSON = if(sumResponseText, jsonParse(sumResponseText))
220
217
  result = if(sumResponseJSON, objectGet(sumResponseJSON, 'result'))
221
218
 
@@ -226,12 +223,12 @@ async function exampleMain():
226
223
  '# ' + markdownEscape(title), \
227
224
  '', \
228
225
  'n1 = ' + n1 + ' (' + \
229
- argsLink(exampleArguments, 'Down', objectNew('n1', n1 - 1)) + ' | ' + \
230
- argsLink(exampleArguments, 'Up', objectNew('n1', n1 + 1)) + ')', \
226
+ argsLink(exampleArguments, 'Down', {'n1': n1 - 1}) + ' | ' + \
227
+ argsLink(exampleArguments, 'Up', {'n1': n1 + 1}) + ')', \
231
228
  '', \
232
229
  'n2 = ' + n2 + ' (' + \
233
- argsLink(exampleArguments, 'Down', objectNew('n2', n2 - 1)) + ' | ' + \
234
- argsLink(exampleArguments, 'Up', objectNew('n2', n2 + 1)) + ')', \
230
+ argsLink(exampleArguments, 'Down', {'n2': n2 - 1}) + ' | ' + \
231
+ argsLink(exampleArguments, 'Up', {'n2': n2 + 1}) + ')', \
235
232
  '', \
236
233
  n1 + ' + ' + n2 + ' = ' + result \
237
234
  )
@@ -239,10 +236,10 @@ endfunction
239
236
 
240
237
 
241
238
  # The example application's arguments (for use with argsParse, etc.)
242
- exampleArguments = arrayNew( \
243
- objectNew('name', 'n1', 'type', 'float', 'default', 0), \
244
- objectNew('name', 'n2', 'type', 'float', 'default', 0) \
245
- )
239
+ exampleArguments = [ \
240
+ {'name': 'n1', 'type': 'float', 'default': 0}, \
241
+ {'name': 'n2', 'type': 'float', 'default': 0} \
242
+ ]
246
243
  ```
247
244
 
248
245
 
@@ -299,7 +296,7 @@ object.
299
296
  function sumNumbers(request):
300
297
  n1 = objectGet(request, 'n1')
301
298
  n2 = objectGet(request, 'n2')
302
- return objectNew('result', n1 + n2)
299
+ return {'result': n1 + n2}
303
300
  endfunction
304
301
  ```
305
302
 
@@ -187,10 +187,7 @@ async function exampleMain():
187
187
  n2 = objectGet(args, 'n2')
188
188
 
189
189
  # Call the backend service to add the two numbers
190
- sumResponseText = systemFetch(objectNew( \
191
- 'url', 'sumNumbers', \
192
- 'body', jsonStringify(objectNew('n1', n1, 'n2', n2)) \
193
- ))
190
+ sumResponseText = systemFetch({'url': 'sumNumbers', 'body': jsonStringify({'n1': n1, 'n2': n2})})
194
191
  sumResponseJSON = if(sumResponseText, jsonParse(sumResponseText))
195
192
  result = if(sumResponseJSON, objectGet(sumResponseJSON, 'result'))
196
193
 
@@ -201,12 +198,12 @@ async function exampleMain():
201
198
  '# ' + markdownEscape(title), \
202
199
  '', \
203
200
  'n1 = ' + n1 + ' (' + \
204
- argsLink(exampleArguments, 'Down', objectNew('n1', n1 - 1)) + ' | ' + \
205
- argsLink(exampleArguments, 'Up', objectNew('n1', n1 + 1)) + ')', \
201
+ argsLink(exampleArguments, 'Down', {'n1': n1 - 1}) + ' | ' + \
202
+ argsLink(exampleArguments, 'Up', {'n1': n1 + 1}) + ')', \
206
203
  '', \
207
204
  'n2 = ' + n2 + ' (' + \
208
- argsLink(exampleArguments, 'Down', objectNew('n2', n2 - 1)) + ' | ' + \
209
- argsLink(exampleArguments, 'Up', objectNew('n2', n2 + 1)) + ')', \
205
+ argsLink(exampleArguments, 'Down', {'n2': n2 - 1}) + ' | ' + \
206
+ argsLink(exampleArguments, 'Up', {'n2': n2 + 1}) + ')', \
210
207
  '', \
211
208
  n1 + ' + ' + n2 + ' = ' + result \
212
209
  )
@@ -214,10 +211,10 @@ endfunction
214
211
 
215
212
 
216
213
  # The example application's arguments (for use with argsParse, etc.)
217
- exampleArguments = arrayNew( \
218
- objectNew('name', 'n1', 'type', 'float', 'default', 0), \
219
- objectNew('name', 'n2', 'type', 'float', 'default', 0) \
220
- )
214
+ exampleArguments = [ \
215
+ {'name': 'n1', 'type': 'float', 'default': 0}, \
216
+ {'name': 'n2', 'type': 'float', 'default': 0} \
217
+ ]
221
218
  ```
222
219
 
223
220
 
@@ -274,7 +271,7 @@ object.
274
271
  function sumNumbers(request):
275
272
  n1 = objectGet(request, 'n1')
276
273
  n2 = objectGet(request, 'n2')
277
- return objectNew('result', n1 + n2)
274
+ return {'result': n1 + n2}
278
275
  endfunction
279
276
  ```
280
277
 
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = markdown-up
3
- version = 2.5.0
3
+ version = 2.5.1
4
4
  url = https://github.com/craigahobbs/markdown-up-py
5
5
  author = Craig A. Hobbs
6
6
  author_email = craigahobbs@gmail.com
@@ -9,7 +9,7 @@ include <args.bare>
9
9
  #
10
10
  async function markdownUpIndex():
11
11
  # Parse arguments
12
- arguments = argsValidate(arrayNew(objectNew('name', 'path')))
12
+ arguments = argsValidate([{'name': 'path'}])
13
13
  args = argsParse(arguments)
14
14
  path = objectGet(args, 'path')
15
15
 
@@ -24,10 +24,10 @@ async function markdownUpIndex():
24
24
  # Menu and title
25
25
  parent = objectGet(index, 'parent')
26
26
  markdownPrint( \
27
- if(path == null, 'Root', argsLink(arguments, 'Root', objectNew('path', null))) + ' |', \
27
+ if(path == null, 'Root', argsLink(arguments, 'Root', {'path': null})) + ' |', \
28
28
  if(path == null, 'Parent', if(parent == null, \
29
- argsLink(arguments, 'Parent', objectNew('path', null)), \
30
- argsLink(arguments, 'Parent', objectNew('path', parent)))) + ' |', \
29
+ argsLink(arguments, 'Parent', {'path': null}), \
30
+ argsLink(arguments, 'Parent', {'path': parent}))) + ' |', \
31
31
  '[MarkdownUp](https://github.com/craigahobbs/markdown-up#readme)', \
32
32
  '', \
33
33
  '# ' + markdownEscape(title) \
@@ -51,7 +51,7 @@ async function markdownUpIndex():
51
51
  markdownPrint('', '## Directories')
52
52
  for directory in arraySort(directories):
53
53
  directoryURL = if(path != null, path + '/', '') + directory
54
- markdownPrint('', argsLink(arguments, directory, objectNew('path', directoryURL)))
54
+ markdownPrint('', argsLink(arguments, directory, {'path': directoryURL}))
55
55
  endfor
56
56
  endif
57
57
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-up
3
- Version: 2.5.0
3
+ Version: 2.5.1
4
4
  Summary: MarkdownUp is a Markdown viewer
5
5
  Home-page: https://github.com/craigahobbs/markdown-up-py
6
6
  Author: Craig A. Hobbs
@@ -212,10 +212,7 @@ async function exampleMain():
212
212
  n2 = objectGet(args, 'n2')
213
213
 
214
214
  # Call the backend service to add the two numbers
215
- sumResponseText = systemFetch(objectNew( \
216
- 'url', 'sumNumbers', \
217
- 'body', jsonStringify(objectNew('n1', n1, 'n2', n2)) \
218
- ))
215
+ sumResponseText = systemFetch({'url': 'sumNumbers', 'body': jsonStringify({'n1': n1, 'n2': n2})})
219
216
  sumResponseJSON = if(sumResponseText, jsonParse(sumResponseText))
220
217
  result = if(sumResponseJSON, objectGet(sumResponseJSON, 'result'))
221
218
 
@@ -226,12 +223,12 @@ async function exampleMain():
226
223
  '# ' + markdownEscape(title), \
227
224
  '', \
228
225
  'n1 = ' + n1 + ' (' + \
229
- argsLink(exampleArguments, 'Down', objectNew('n1', n1 - 1)) + ' | ' + \
230
- argsLink(exampleArguments, 'Up', objectNew('n1', n1 + 1)) + ')', \
226
+ argsLink(exampleArguments, 'Down', {'n1': n1 - 1}) + ' | ' + \
227
+ argsLink(exampleArguments, 'Up', {'n1': n1 + 1}) + ')', \
231
228
  '', \
232
229
  'n2 = ' + n2 + ' (' + \
233
- argsLink(exampleArguments, 'Down', objectNew('n2', n2 - 1)) + ' | ' + \
234
- argsLink(exampleArguments, 'Up', objectNew('n2', n2 + 1)) + ')', \
230
+ argsLink(exampleArguments, 'Down', {'n2': n2 - 1}) + ' | ' + \
231
+ argsLink(exampleArguments, 'Up', {'n2': n2 + 1}) + ')', \
235
232
  '', \
236
233
  n1 + ' + ' + n2 + ' = ' + result \
237
234
  )
@@ -239,10 +236,10 @@ endfunction
239
236
 
240
237
 
241
238
  # The example application's arguments (for use with argsParse, etc.)
242
- exampleArguments = arrayNew( \
243
- objectNew('name', 'n1', 'type', 'float', 'default', 0), \
244
- objectNew('name', 'n2', 'type', 'float', 'default', 0) \
245
- )
239
+ exampleArguments = [ \
240
+ {'name': 'n1', 'type': 'float', 'default': 0}, \
241
+ {'name': 'n2', 'type': 'float', 'default': 0} \
242
+ ]
246
243
  ```
247
244
 
248
245
 
@@ -299,7 +296,7 @@ object.
299
296
  function sumNumbers(request):
300
297
  n1 = objectGet(request, 'n1')
301
298
  n2 = objectGet(request, 'n2')
302
- return objectNew('result', n1 + n2)
299
+ return {'result': n1 + n2}
303
300
  endfunction
304
301
  ```
305
302
 
File without changes
File without changes