audioarxiv 0.1.2rc62.post1__py3-none-any.whl → 0.1.2rc68.post1__py3-none-any.whl

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.
audioarxiv/__init__.py CHANGED
@@ -24,7 +24,7 @@ from pandas import DataFrame
24
24
 
25
25
  from . import audio, preprocess, resources
26
26
 
27
- __version__ = "0.1.2-rc62-post1"
27
+ __version__ = "0.1.2-rc68-post1"
28
28
 
29
29
 
30
30
  def get_version_information() -> str:
@@ -111,11 +111,11 @@ def env_package_list(as_dataframe: bool = False) -> list | DataFrame:
111
111
 
112
112
  Returns:
113
113
  Union[list, DataFrame]:
114
- If ``as_dataframe=False`` is given, the output is a `list` of `dict`,
115
- one for each package, at least with ``'name'`` and ``'version'`` keys
116
- (more if `conda` is used).
117
- If ``as_dataframe=True`` is given, the output is a `DataFrame`
118
- created from the `list` of `dicts`.
114
+ If ``as_dataframe=False`` is given, the output is a `list` of `dict`,
115
+ one for each package, at least with ``'name'`` and ``'version'`` keys
116
+ (more if `conda` is used).
117
+ If ``as_dataframe=True`` is given, the output is a `DataFrame`
118
+ created from the `list` of `dicts`.
119
119
  """
120
120
  prefix = sys.prefix
121
121
  pkgs = []
audioarxiv/tools/main.py CHANGED
@@ -57,7 +57,6 @@ def initialize_configuration(args: configargparse.Namespace) -> tuple:
57
57
  os.makedirs(config_dir, exist_ok=True)
58
58
  config_file = 'config.json'
59
59
  config_path = os.path.join(config_dir, config_file)
60
-
61
60
  # Default settings.
62
61
  settings = {
63
62
  'audio': {
@@ -159,36 +158,35 @@ def main():
159
158
  paper = Paper(**settings['paper'])
160
159
 
161
160
  # Search the paper.
162
- if args.id is not None:
163
- # Print the information
164
- logger.info('Configuration file: %s', config_path)
165
- logger.info('Audio settings')
166
- for key, value in settings['audio'].items():
167
- logger.info('%s: %s', key, value)
168
-
169
- logger.info('Paper settings')
170
- for key, value in settings['paper'].items():
171
- logger.info('%s: %s', key, value)
172
-
173
- logger.info('Searching arxiv: %s...', args.id)
174
- paper.search_by_arxiv_id(arxiv_id=args.id)
175
- # Get the sections
176
- sections = paper.sections
177
- if args.output is None:
178
- for section in sections:
179
- audio.read_article(section['header'])
161
+ # Print the information
162
+ logger.info('Configuration file: %s', config_path)
163
+ logger.info('Audio settings')
164
+ for key, value in settings['audio'].items():
165
+ logger.info('%s: %s', key, value)
166
+
167
+ logger.info('Paper settings')
168
+ for key, value in settings['paper'].items():
169
+ logger.info('%s: %s', key, value)
170
+
171
+ logger.info('Searching arxiv: %s...', args.id)
172
+ paper.search_by_arxiv_id(arxiv_id=args.id)
173
+ # Get the sections
174
+ sections = paper.sections
175
+ if args.output is None:
176
+ for section in sections:
177
+ audio.read_article(section['header'])
178
+ time.sleep(1)
179
+ for content in section['content']:
180
+ audio.read_article(content)
180
181
  time.sleep(1)
181
- for content in section['content']:
182
- audio.read_article(content)
183
- time.sleep(1)
184
- else:
185
- article = []
186
- for section in sections:
187
- if section['header'] is not None:
188
- article.append(section['header'])
189
- if section['content'] is not None:
190
- article += section['content']
191
- article = " ".join(article)
192
- logger.info('Saving audio...')
193
- audio.save_article(filename=args.output, article=article)
194
- logger.info('Audio is saved to %s.', args.output)
182
+ else:
183
+ article = []
184
+ for section in sections:
185
+ if section['header'] is not None:
186
+ article.append(section['header'])
187
+ if section['content'] is not None:
188
+ article += section['content']
189
+ article = " ".join(article)
190
+ logger.info('Saving audio...')
191
+ audio.save_article(filename=args.output, article=article)
192
+ logger.info('Audio is saved to %s.', args.output)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: audioarxiv
3
- Version: 0.1.2rc62.post1
3
+ Version: 0.1.2rc68.post1
4
4
  Summary: Turn arXiv papers into audio. audioarxiv lets you fetch the research papers from arXiv and read them aloud.
5
5
  Author-email: "Isaac C. F. Wong" <isaac.cf.wong@gmail.com>
6
6
  Requires-Python: >=3.9
@@ -1,4 +1,4 @@
1
- audioarxiv/__init__.py,sha256=OZJ71utW88TwFHi35Li6l3whih-i-OtOGLwZ6U4zbHM,5807
1
+ audioarxiv/__init__.py,sha256=4AZt-RskMOzebqEviHt-Im886DDC8ooK1Q-KTn-7-ss,5827
2
2
  audioarxiv/audio/__init__.py,sha256=UZx3AkhC8NZFXwQbW_sU4sQ1uGeEIRXCPDghXvZy8rY,214
3
3
  audioarxiv/audio/base.py,sha256=LLZGciBbFeaGlRqt_VF58RWOSKDZevks4U2SpWAk1To,6005
4
4
  audioarxiv/preprocess/__init__.py,sha256=NUCDDLpSwpWTBaPNdLWUVK2FhtwMPsFvXczTE21_UvU,338
@@ -7,9 +7,9 @@ audioarxiv/preprocess/math_equation.py,sha256=ulkeMZFJKxU8BH1QzNyW4BZ-UjWfDDMp1C
7
7
  audioarxiv/resources/__init__.py,sha256=KCZm9Hq0O9oCCtfpyKVDGo_qX-PU2qS8aJe1NgvmR7Q,166
8
8
  audioarxiv/resources/paper.py,sha256=o6DD4KrcypjH810ArDzD93uBkdpKUNvnErIUJUZ3J9s,7302
9
9
  audioarxiv/tools/__init__.py,sha256=7X5vtxzvCY9URWo0p3zvM11J6whGFeDPF7XU0dt1Qcw,28
10
- audioarxiv/tools/main.py,sha256=sAh7izIdGmfQZiI3tBKn-zLMhQgAQvLGu4OmYnYLsAc,6884
11
- audioarxiv-0.1.2rc62.post1.dist-info/entry_points.txt,sha256=d_K6uTNuC8-f9XUQ_enFBgssiK2lVV57EHCEloriVY4,57
12
- audioarxiv-0.1.2rc62.post1.dist-info/licenses/LICENSE,sha256=EaCbwfO894O6p0QwcO_sgtKCIEWxfBS0fhybH9sURk8,1140
13
- audioarxiv-0.1.2rc62.post1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
14
- audioarxiv-0.1.2rc62.post1.dist-info/METADATA,sha256=Jk4YnyILpng4egGJYUckzltkLbxr50bhT-0zjo-h76c,5220
15
- audioarxiv-0.1.2rc62.post1.dist-info/RECORD,,
10
+ audioarxiv/tools/main.py,sha256=n5Q22HTktaxPv1C1Z7HxkN2OJqi9F6QxSWbnzqZ448E,6735
11
+ audioarxiv-0.1.2rc68.post1.dist-info/entry_points.txt,sha256=d_K6uTNuC8-f9XUQ_enFBgssiK2lVV57EHCEloriVY4,57
12
+ audioarxiv-0.1.2rc68.post1.dist-info/licenses/LICENSE,sha256=EaCbwfO894O6p0QwcO_sgtKCIEWxfBS0fhybH9sURk8,1140
13
+ audioarxiv-0.1.2rc68.post1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
14
+ audioarxiv-0.1.2rc68.post1.dist-info/METADATA,sha256=SQAWLGtM585aaWMHL55AP9RE_i3UNdvdSI4Kt7CGKgA,5220
15
+ audioarxiv-0.1.2rc68.post1.dist-info/RECORD,,