overleaf-comments-export 0.18.2__tar.gz → 0.18.4__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.
Files changed (49) hide show
  1. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/PKG-INFO +24 -20
  2. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/README.md +23 -19
  3. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/annotate.py +6 -0
  4. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/client.py +0 -5
  5. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/gui.py +0 -7
  6. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export.egg-info/PKG-INFO +24 -20
  7. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/pyproject.toml +1 -1
  8. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_annotate.py +16 -0
  9. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/LICENSE +0 -0
  10. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/__init__.py +0 -0
  11. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/__main__.py +0 -0
  12. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/anchors.py +0 -0
  13. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/doctor.py +0 -0
  14. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/export.py +0 -0
  15. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/filenames.py +0 -0
  16. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/highlight.py +0 -0
  17. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/model.py +0 -0
  18. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/pdfannotate.py +0 -0
  19. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/render.py +0 -0
  20. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/sections.py +0 -0
  21. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export/since.py +0 -0
  22. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export.egg-info/SOURCES.txt +0 -0
  23. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export.egg-info/dependency_links.txt +0 -0
  24. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export.egg-info/entry_points.txt +0 -0
  25. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export.egg-info/requires.txt +0 -0
  26. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/overleaf_comments_export.egg-info/top_level.txt +0 -0
  27. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/setup.cfg +0 -0
  28. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_anchors_sections.py +0 -0
  29. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_cancel.py +0 -0
  30. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_client.py +0 -0
  31. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_doctor.py +0 -0
  32. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_errors_and_auth.py +0 -0
  33. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_export.py +0 -0
  34. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_export_wiring.py +0 -0
  35. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_extension_parity.py +0 -0
  36. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_filenames.py +0 -0
  37. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_floats.py +0 -0
  38. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_gui.py +0 -0
  39. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_highlight.py +0 -0
  40. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_pdfannotate.py +0 -0
  41. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_render.py +0 -0
  42. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_replies_and_changes.py +0 -0
  43. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_response_letter.py +0 -0
  44. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_review_fixes.py +0 -0
  45. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_schema_parity.py +0 -0
  46. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_since.py +0 -0
  47. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_stable_output.py +0 -0
  48. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_stress.py +0 -0
  49. {overleaf_comments_export-0.18.2 → overleaf_comments_export-0.18.4}/tests/test_workflows.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: overleaf-comments-export
3
- Version: 0.18.2
3
+ Version: 0.18.4
4
4
  Summary: Export comment threads and tracked changes from an Overleaf project to Markdown + JSON, optimized for AI-agent consumption.
5
5
  Author-email: Shivang Gupta <47645533+Mangluu@users.noreply.github.com>
6
6
  License: MIT
@@ -102,31 +102,24 @@ unzip it, and open it. There is nothing else to install, and no Python needed.
102
102
 
103
103
  | Your computer | Download |
104
104
  |---|---|
105
- | Mac | `OverleafCommentsExport-macOS.zip` |
106
105
  | Windows | `OverleafCommentsExport-Windows.zip` |
107
106
  | Linux | `OverleafCommentsExport-Linux.zip`, then `chmod +x "Overleaf Comments Export"` |
108
107
 
109
- The first time you open it, macOS or Windows will warn you about an app it has
110
- not checked. That is because signing an app costs money every year, not because
111
- anything is wrong.
108
+ On **Windows** the first time you open it you will be warned about an app that
109
+ has not been checked. That is because signing an app costs money every year,
110
+ not because anything is wrong. Click More info, then Run anyway.
112
111
 
113
- On **Windows**, click More info, then Run anyway.
112
+ **There is no Mac download.** There was, and it did not work. macOS blocks apps
113
+ it has not checked, signing one costs money every year, and the way people used
114
+ to get past the warning, right-clicking and choosing Open, was removed in macOS
115
+ 15. Everybody who downloaded it hit a wall. Shipping something that does not
116
+ open is worse than not shipping it.
114
117
 
115
- On **macOS 15 and newer** the old advice of right-clicking and choosing Open no
116
- longer works, and the warning gives you no way through. Do this instead. Double
117
- click the app, click Done on the warning, then open System Settings, go to
118
- Privacy & Security, scroll down to Security, and click **Open Anyway** next to
119
- the message about the app. Confirm, then open the app again.
118
+ On a Mac, use either of these instead. Both work, and neither is gated.
120
119
 
121
- If you would rather use the Terminal, this does the same thing in one line, and
122
- you can drag the app into the window instead of typing its path:
123
-
124
- ```bash
125
- xattr -dr com.apple.quarantine "/path/to/Overleaf Comments Export.app"
126
- ```
127
-
128
- None of this applies to the Python install or the browser extension, which
129
- macOS does not gate.
120
+ - The browser extension below, if you would rather not touch a terminal.
121
+ - `pip install "overleaf-comments-export[gui,pdf]"`, then run
122
+ `overleaf-comments-export --gui` for the same window.
130
123
 
131
124
  **If you prefer a browser extension**, Chrome, Edge, and other Chromium
132
125
  browsers can run the exporter inside the Overleaf project you already have
@@ -267,6 +260,17 @@ change.
267
260
 
268
261
  Run `overleaf-comments-export --help` for the full list.
269
262
 
263
+ A cookie passed as `--cookie` goes into your shell history, and on most systems
264
+ it is visible to anyone who can run `ps` while the export is going. It is a live
265
+ session, so prefer the environment variable, which the tool reads on its own:
266
+
267
+ ```bash
268
+ OVERLEAF_SESSION="paste it here" overleaf-comments-export --project-url https://...
269
+ ```
270
+
271
+ The window stores it only if you tick the box, in a file only your account can
272
+ read.
273
+
270
274
  ## Stopping an export
271
275
 
272
276
  Press Stop in the window, or Ctrl-C on the command line. Nothing is written
@@ -58,31 +58,24 @@ unzip it, and open it. There is nothing else to install, and no Python needed.
58
58
 
59
59
  | Your computer | Download |
60
60
  |---|---|
61
- | Mac | `OverleafCommentsExport-macOS.zip` |
62
61
  | Windows | `OverleafCommentsExport-Windows.zip` |
63
62
  | Linux | `OverleafCommentsExport-Linux.zip`, then `chmod +x "Overleaf Comments Export"` |
64
63
 
65
- The first time you open it, macOS or Windows will warn you about an app it has
66
- not checked. That is because signing an app costs money every year, not because
67
- anything is wrong.
64
+ On **Windows** the first time you open it you will be warned about an app that
65
+ has not been checked. That is because signing an app costs money every year,
66
+ not because anything is wrong. Click More info, then Run anyway.
68
67
 
69
- On **Windows**, click More info, then Run anyway.
68
+ **There is no Mac download.** There was, and it did not work. macOS blocks apps
69
+ it has not checked, signing one costs money every year, and the way people used
70
+ to get past the warning, right-clicking and choosing Open, was removed in macOS
71
+ 15. Everybody who downloaded it hit a wall. Shipping something that does not
72
+ open is worse than not shipping it.
70
73
 
71
- On **macOS 15 and newer** the old advice of right-clicking and choosing Open no
72
- longer works, and the warning gives you no way through. Do this instead. Double
73
- click the app, click Done on the warning, then open System Settings, go to
74
- Privacy & Security, scroll down to Security, and click **Open Anyway** next to
75
- the message about the app. Confirm, then open the app again.
74
+ On a Mac, use either of these instead. Both work, and neither is gated.
76
75
 
77
- If you would rather use the Terminal, this does the same thing in one line, and
78
- you can drag the app into the window instead of typing its path:
79
-
80
- ```bash
81
- xattr -dr com.apple.quarantine "/path/to/Overleaf Comments Export.app"
82
- ```
83
-
84
- None of this applies to the Python install or the browser extension, which
85
- macOS does not gate.
76
+ - The browser extension below, if you would rather not touch a terminal.
77
+ - `pip install "overleaf-comments-export[gui,pdf]"`, then run
78
+ `overleaf-comments-export --gui` for the same window.
86
79
 
87
80
  **If you prefer a browser extension**, Chrome, Edge, and other Chromium
88
81
  browsers can run the exporter inside the Overleaf project you already have
@@ -223,6 +216,17 @@ change.
223
216
 
224
217
  Run `overleaf-comments-export --help` for the full list.
225
218
 
219
+ A cookie passed as `--cookie` goes into your shell history, and on most systems
220
+ it is visible to anyone who can run `ps` while the export is going. It is a live
221
+ session, so prefer the environment variable, which the tool reads on its own:
222
+
223
+ ```bash
224
+ OVERLEAF_SESSION="paste it here" overleaf-comments-export --project-url https://...
225
+ ```
226
+
227
+ The window stores it only if you tick the box, in a file only your account can
228
+ read.
229
+
226
230
  ## Stopping an export
227
231
 
228
232
  Press Stop in the window, or Ctrl-C on the command line. Nothing is written
@@ -80,6 +80,12 @@ def to_ascii(text: str) -> str:
80
80
  so nothing beyond ASCII may reach the file. Real reviewer comments contain
81
81
  all of these.
82
82
  """
83
+ # Most text is already ASCII, and everything below it is a no-op on such a
84
+ # string: 52 whole-string replaces of characters that cannot be there, a
85
+ # normalize, and two passes over every character. This is the hottest
86
+ # function in an export by some way, so the cheap check earns its line.
87
+ if text.isascii():
88
+ return text
83
89
  for bad, good in _UNICODE_FOLD.items():
84
90
  text = text.replace(bad, good)
85
91
  for bad, good in _GREEK.items():
@@ -888,11 +888,6 @@ def _parse_cookie_string(pasted: str) -> dict[str, str]:
888
888
  return out or {"overleaf_session2": s}
889
889
 
890
890
 
891
- def looks_self_hosted(base_url: str) -> bool:
892
- host = urlparse(base_url).hostname or ""
893
- return not host.endswith("overleaf.com")
894
-
895
-
896
891
  def _decode_meta_content(raw: str) -> Any:
897
892
  """Best-effort decode of a <meta content="..."> value.
898
893
 
@@ -450,13 +450,6 @@ class App:
450
450
  body.pack(fill="both", expand=True)
451
451
  return body
452
452
 
453
- def _hint_in(self, parent, text: str):
454
- """A quiet line of explanation under whatever it belongs to."""
455
- label = ttk.Label(parent, text=text, style="Hint.TLabel",
456
- font=self.font_small, wraplength=380, justify="left")
457
- label.pack(anchor="w", pady=(3, 0))
458
- return label
459
-
460
453
  def _hint(self, parent, text, row, col=1, span=2):
461
454
  lbl = ttk.Label(parent, text=text, style="Hint.TLabel", font=self.font_small,
462
455
  wraplength=380, justify="left")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: overleaf-comments-export
3
- Version: 0.18.2
3
+ Version: 0.18.4
4
4
  Summary: Export comment threads and tracked changes from an Overleaf project to Markdown + JSON, optimized for AI-agent consumption.
5
5
  Author-email: Shivang Gupta <47645533+Mangluu@users.noreply.github.com>
6
6
  License: MIT
@@ -102,31 +102,24 @@ unzip it, and open it. There is nothing else to install, and no Python needed.
102
102
 
103
103
  | Your computer | Download |
104
104
  |---|---|
105
- | Mac | `OverleafCommentsExport-macOS.zip` |
106
105
  | Windows | `OverleafCommentsExport-Windows.zip` |
107
106
  | Linux | `OverleafCommentsExport-Linux.zip`, then `chmod +x "Overleaf Comments Export"` |
108
107
 
109
- The first time you open it, macOS or Windows will warn you about an app it has
110
- not checked. That is because signing an app costs money every year, not because
111
- anything is wrong.
108
+ On **Windows** the first time you open it you will be warned about an app that
109
+ has not been checked. That is because signing an app costs money every year,
110
+ not because anything is wrong. Click More info, then Run anyway.
112
111
 
113
- On **Windows**, click More info, then Run anyway.
112
+ **There is no Mac download.** There was, and it did not work. macOS blocks apps
113
+ it has not checked, signing one costs money every year, and the way people used
114
+ to get past the warning, right-clicking and choosing Open, was removed in macOS
115
+ 15. Everybody who downloaded it hit a wall. Shipping something that does not
116
+ open is worse than not shipping it.
114
117
 
115
- On **macOS 15 and newer** the old advice of right-clicking and choosing Open no
116
- longer works, and the warning gives you no way through. Do this instead. Double
117
- click the app, click Done on the warning, then open System Settings, go to
118
- Privacy & Security, scroll down to Security, and click **Open Anyway** next to
119
- the message about the app. Confirm, then open the app again.
118
+ On a Mac, use either of these instead. Both work, and neither is gated.
120
119
 
121
- If you would rather use the Terminal, this does the same thing in one line, and
122
- you can drag the app into the window instead of typing its path:
123
-
124
- ```bash
125
- xattr -dr com.apple.quarantine "/path/to/Overleaf Comments Export.app"
126
- ```
127
-
128
- None of this applies to the Python install or the browser extension, which
129
- macOS does not gate.
120
+ - The browser extension below, if you would rather not touch a terminal.
121
+ - `pip install "overleaf-comments-export[gui,pdf]"`, then run
122
+ `overleaf-comments-export --gui` for the same window.
130
123
 
131
124
  **If you prefer a browser extension**, Chrome, Edge, and other Chromium
132
125
  browsers can run the exporter inside the Overleaf project you already have
@@ -267,6 +260,17 @@ change.
267
260
 
268
261
  Run `overleaf-comments-export --help` for the full list.
269
262
 
263
+ A cookie passed as `--cookie` goes into your shell history, and on most systems
264
+ it is visible to anyone who can run `ps` while the export is going. It is a live
265
+ session, so prefer the environment variable, which the tool reads on its own:
266
+
267
+ ```bash
268
+ OVERLEAF_SESSION="paste it here" overleaf-comments-export --project-url https://...
269
+ ```
270
+
271
+ The window stores it only if you tick the box, in a file only your account can
272
+ read.
273
+
270
274
  ## Stopping an export
271
275
 
272
276
  Press Stop in the window, or Ctrl-C on the command line. Nothing is written
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "overleaf-comments-export"
7
- version = "0.18.2"
7
+ version = "0.18.4"
8
8
  description = "Export comment threads and tracked changes from an Overleaf project to Markdown + JSON, optimized for AI-agent consumption."
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -235,3 +235,19 @@ def test_a_whole_annotated_document_is_ascii():
235
235
  threads = _t(content="η² was .21? café \U0001f60a")
236
236
  out, _ = annotate_document("The result here", [_c("C001", 0, "The result")], threads)
237
237
  assert out.isascii()
238
+
239
+
240
+ def test_ascii_text_takes_the_fast_path_and_is_unchanged():
241
+ """to_ascii is the hottest function in an export. The early return has to
242
+ give byte-identical output, or it trades correctness for speed."""
243
+ from overleaf_comments_export.annotate import to_ascii
244
+ plain = "Break this up. 50% of \\alpha & <b> ~ #1 {x} ^2 _y"
245
+ assert plain.isascii()
246
+ assert to_ascii(plain) == plain
247
+
248
+
249
+ def test_non_ascii_still_folds():
250
+ from overleaf_comments_export.annotate import to_ascii
251
+ out = to_ascii("Prüfen Sie ρ und σ — 请检查")
252
+ assert out.isascii(), out
253
+ assert "Prufen" in out and "rho" in out and "sigma" in out