audioarxiv 0.1.2rc62.post1__py3-none-any.whl → 0.1.2rc66.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 +6 -6
- audioarxiv/tools/main.py +31 -33
- {audioarxiv-0.1.2rc62.post1.dist-info → audioarxiv-0.1.2rc66.post1.dist-info}/METADATA +1 -1
- {audioarxiv-0.1.2rc62.post1.dist-info → audioarxiv-0.1.2rc66.post1.dist-info}/RECORD +7 -7
- {audioarxiv-0.1.2rc62.post1.dist-info → audioarxiv-0.1.2rc66.post1.dist-info}/WHEEL +0 -0
- {audioarxiv-0.1.2rc62.post1.dist-info → audioarxiv-0.1.2rc66.post1.dist-info}/entry_points.txt +0 -0
- {audioarxiv-0.1.2rc62.post1.dist-info → audioarxiv-0.1.2rc66.post1.dist-info}/licenses/LICENSE +0 -0
    
        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- | 
| 27 | 
            +
            __version__ = "0.1.2-rc66-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 | 
            -
             | 
| 115 | 
            -
             | 
| 116 | 
            -
             | 
| 117 | 
            -
             | 
| 118 | 
            -
             | 
| 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 | 
            -
                 | 
| 163 | 
            -
             | 
| 164 | 
            -
             | 
| 165 | 
            -
             | 
| 166 | 
            -
                     | 
| 167 | 
            -
             | 
| 168 | 
            -
             | 
| 169 | 
            -
             | 
| 170 | 
            -
                     | 
| 171 | 
            -
             | 
| 172 | 
            -
             | 
| 173 | 
            -
             | 
| 174 | 
            -
             | 
| 175 | 
            -
             | 
| 176 | 
            -
             | 
| 177 | 
            -
                     | 
| 178 | 
            -
                         | 
| 179 | 
            -
             | 
| 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 | 
            -
             | 
| 182 | 
            -
             | 
| 183 | 
            -
             | 
| 184 | 
            -
             | 
| 185 | 
            -
             | 
| 186 | 
            -
                         | 
| 187 | 
            -
                             | 
| 188 | 
            -
             | 
| 189 | 
            -
             | 
| 190 | 
            -
             | 
| 191 | 
            -
             | 
| 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. | 
| 3 | 
            +
            Version: 0.1.2rc66.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= | 
| 1 | 
            +
            audioarxiv/__init__.py,sha256=MBsyukbP7WBzj-E6tGS3TMR2JheKAtFtFXWt0PUCUxs,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= | 
| 11 | 
            -
            audioarxiv-0.1. | 
| 12 | 
            -
            audioarxiv-0.1. | 
| 13 | 
            -
            audioarxiv-0.1. | 
| 14 | 
            -
            audioarxiv-0.1. | 
| 15 | 
            -
            audioarxiv-0.1. | 
| 10 | 
            +
            audioarxiv/tools/main.py,sha256=n5Q22HTktaxPv1C1Z7HxkN2OJqi9F6QxSWbnzqZ448E,6735
         | 
| 11 | 
            +
            audioarxiv-0.1.2rc66.post1.dist-info/entry_points.txt,sha256=d_K6uTNuC8-f9XUQ_enFBgssiK2lVV57EHCEloriVY4,57
         | 
| 12 | 
            +
            audioarxiv-0.1.2rc66.post1.dist-info/licenses/LICENSE,sha256=EaCbwfO894O6p0QwcO_sgtKCIEWxfBS0fhybH9sURk8,1140
         | 
| 13 | 
            +
            audioarxiv-0.1.2rc66.post1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
         | 
| 14 | 
            +
            audioarxiv-0.1.2rc66.post1.dist-info/METADATA,sha256=lwpRi-IojPu5f1q-AUXMd80cTTvaW81gMCfwqjXlls8,5220
         | 
| 15 | 
            +
            audioarxiv-0.1.2rc66.post1.dist-info/RECORD,,
         | 
| 
            File without changes
         | 
    
        {audioarxiv-0.1.2rc62.post1.dist-info → audioarxiv-0.1.2rc66.post1.dist-info}/entry_points.txt
    RENAMED
    
    | 
            File without changes
         | 
    
        {audioarxiv-0.1.2rc62.post1.dist-info → audioarxiv-0.1.2rc66.post1.dist-info}/licenses/LICENSE
    RENAMED
    
    | 
            File without changes
         |