dialoghelper 0.0.30__tar.gz → 0.0.31__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.

Potentially problematic release.


This version of dialoghelper might be problematic. Click here for more details.

Files changed (22) hide show
  1. {dialoghelper-0.0.30/dialoghelper.egg-info → dialoghelper-0.0.31}/PKG-INFO +1 -1
  2. dialoghelper-0.0.31/dialoghelper/__init__.py +2 -0
  3. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/dialoghelper/_modidx.py +2 -1
  4. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/dialoghelper/core.py +13 -2
  5. {dialoghelper-0.0.30 → dialoghelper-0.0.31/dialoghelper.egg-info}/PKG-INFO +1 -1
  6. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/settings.ini +1 -1
  7. dialoghelper-0.0.30/dialoghelper/__init__.py +0 -2
  8. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/LICENSE +0 -0
  9. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/MANIFEST.in +0 -0
  10. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/README.md +0 -0
  11. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/dialoghelper/db_dc.py +0 -0
  12. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/dialoghelper/experimental.py +0 -0
  13. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/dialoghelper/screenshot.js +0 -0
  14. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/dialoghelper.egg-info/SOURCES.txt +0 -0
  15. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/dialoghelper.egg-info/dependency_links.txt +0 -0
  16. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/dialoghelper.egg-info/entry_points.txt +0 -0
  17. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/dialoghelper.egg-info/not-zip-safe +0 -0
  18. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/dialoghelper.egg-info/requires.txt +0 -0
  19. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/dialoghelper.egg-info/top_level.txt +0 -0
  20. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/pyproject.toml +0 -0
  21. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/setup.cfg +0 -0
  22. {dialoghelper-0.0.30 → dialoghelper-0.0.31}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dialoghelper
3
- Version: 0.0.30
3
+ Version: 0.0.31
4
4
  Summary: Helper functions for solveit dialogs
5
5
  Home-page: https://github.com/AnswerDotAI/dialoghelper
6
6
  Author: Jeremy Howard
@@ -0,0 +1,2 @@
1
+ __version__ = "0.0.31"
2
+ from .core import *
@@ -26,7 +26,8 @@ d = { 'settings': { 'branch': 'main',
26
26
  'dialoghelper.core.read_msg': ('core.html#read_msg', 'dialoghelper/core.py'),
27
27
  'dialoghelper.core.run_msg': ('core.html#run_msg', 'dialoghelper/core.py'),
28
28
  'dialoghelper.core.tool_info': ('core.html#tool_info', 'dialoghelper/core.py'),
29
- 'dialoghelper.core.update_msg': ('core.html#update_msg', 'dialoghelper/core.py')},
29
+ 'dialoghelper.core.update_msg': ('core.html#update_msg', 'dialoghelper/core.py'),
30
+ 'dialoghelper.core.url2note': ('core.html#url2note', 'dialoghelper/core.py')},
30
31
  'dialoghelper.db_dc': {},
31
32
  'dialoghelper.experimental': { 'dialoghelper.experimental._pop_data': ( 'experimental.html#_pop_data',
32
33
  'dialoghelper/experimental.py'),
@@ -2,7 +2,7 @@
2
2
 
3
3
  # %% auto 0
4
4
  __all__ = ['Placements', 'empty', 'find_var', 'call_endp', 'find_dname', 'find_msg_id', 'curr_dialog', 'find_msgs', 'msg_idx',
5
- 'read_msg', 'add_html', 'del_msg', 'run_msg', 'add_msg', 'update_msg', 'load_gist', 'gist_file',
5
+ 'read_msg', 'add_html', 'del_msg', 'run_msg', 'add_msg', 'update_msg', 'url2note', 'load_gist', 'gist_file',
6
6
  'import_string', 'is_usable_tool', 'mk_toollist', 'import_gist', 'tool_info', 'asdict']
7
7
 
8
8
  # %% ../nbs/00_core.ipynb
@@ -191,6 +191,16 @@ def update_msg(
191
191
  if not msgid and not msg: raise TypeError("update_msg needs either a dict message or `msgid=`")
192
192
  return call_endp('add_relative_', dname, placement='update', msgid=msgid, **kwargs)
193
193
 
194
+ # %% ../nbs/00_core.ipynb
195
+ def url2note(
196
+ url:str, # URL to read
197
+ extract_section:bool=True, # If url has an anchor, return only that section
198
+ selector:str=None # Select section(s) using BeautifulSoup.select (overrides extract_section)
199
+ ):
200
+ "Read URL as markdown, and add a note below current message with the result"
201
+ res = read_url(url, as_md=True, extract_section=extract_section, selector=selector)
202
+ return add_msg(res)
203
+
194
204
  # %% ../nbs/00_core.ipynb
195
205
  def load_gist(gist_id:str):
196
206
  "Retrieve a gist"
@@ -270,5 +280,6 @@ def tool_info():
270
280
  - &`read_msg`: Get the message indexed in the current dialog.
271
281
  - &`del_msg`: Delete a message from the dialog.
272
282
  - &`add_msg`: Add/update a message to the queue to show after code execution completes.
273
- - &`update_msg`: Update an existing message.'''
283
+ - &`update_msg`: Update an existing message.
284
+ - &`url2note`: Read URL as markdown, and add a note below current message with the result'''
274
285
  add_msg(cts)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dialoghelper
3
- Version: 0.0.30
3
+ Version: 0.0.31
4
4
  Summary: Helper functions for solveit dialogs
5
5
  Home-page: https://github.com/AnswerDotAI/dialoghelper
6
6
  Author: Jeremy Howard
@@ -1,7 +1,7 @@
1
1
  [DEFAULT]
2
2
  repo = dialoghelper
3
3
  lib_name = dialoghelper
4
- version = 0.0.30
4
+ version = 0.0.31
5
5
  min_python = 3.9
6
6
  license = apache2
7
7
  black_formatting = False
@@ -1,2 +0,0 @@
1
- __version__ = "0.0.30"
2
- from .core import *
File without changes
File without changes
File without changes
File without changes
File without changes