Skip to content

Commit

Permalink
Style formatting and updating readme (v0.1.14)
Browse files Browse the repository at this point in the history
  • Loading branch information
jponttuset committed Feb 24, 2021
1 parent d8b1a39 commit 1ef87e9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ patterns.
## Usage:

```
usage: [email protected].13 [-h] [--resize_images] [--im_size IM_SIZE]
usage: [email protected].14 [-h] [--resize_images] [--im_size IM_SIZE]
[--compress_pdf]
[--pdf_im_resolution PDF_IM_RESOLUTION]
[--images_whitelist IMAGES_WHITELIST]
[--keep_bib]
[--commands_to_delete COMMANDS_TO_DELETE [COMMANDS_TO_DELETE ...]]
[--verbose]
[--config CONFIG_PATH]
[--use_external_tikz USE_EXTERNAL_TIKZ]
[--config CONFIG] [--verbose]
input_folder
Clean the LaTeX code of your paper to submit to arXiv. Check the README for
Expand All @@ -145,15 +146,18 @@ optional arguments:
for images, and dpi forPDFs, as in --im_size and
--pdf_im_resolution, respectively. Format is a
dictionary as: '{"path/to/im.jpg": 1000}'
--keep_bib Avoid deleting the *.bib files.
--commands_to_delete COMMANDS_TO_DELETE [COMMANDS_TO_DELETE ...]
LaTeX commands that will be deleted. Useful for e.g.
user-defined \todo commands.
--use_external_tikz EXTERNAL_TIKZ_FOLDER
--use_external_tikz USE_EXTERNAL_TIKZ
Folder (relative to input folder) containing
externalized TikZ figures in PDF format.
externalized tikz figures in PDF format.
--config CONFIG Read settings from `.yaml` config file. If command
line arguments are provided additionally, the config
file parameters are updated with the command line
parameters.
--verbose Enable detailed output.
--config CONFIG_PATH
Read Settings from config file, such as "cleaner_config.yaml"
```

## Note
Expand Down
5 changes: 2 additions & 3 deletions arxiv_latex_cleaner/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@
PARSER.add_argument(
"--use_external_tikz",
type=str,
help="Folder (relative to input folder) containing externalized tikz "
"figures in PDF format."
)
help=("Folder (relative to input folder) containing externalized tikz "
"figures in PDF format."))

PARSER.add_argument(
"--config",
Expand Down
2 changes: 1 addition & 1 deletion arxiv_latex_cleaner/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "v0.1.13"
__version__ = "v0.1.14"
13 changes: 8 additions & 5 deletions arxiv_latex_cleaner/arxiv_latex_cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,16 +371,19 @@ def _create_out_folder(input_folder):
def run_arxiv_cleaner(parameters):
"""Core of the code, runs the actual arXiv cleaner."""

files_to_delete = [r'\.aux$', r'\.sh$', r'\.blg$', r'\.brf$', r'\.log$',
r'\.out$', r'\.ps$', r'\.dvi$', r'\.synctex.gz$', '~$', r'\.backup$',
r'\.gitignore$', r'\.DS_Store$', r'\.svg$', r'^\.idea', r'\.dpth$',
r'\.md5$', r'\.dep$', r'\.auxlock$']
files_to_delete = [
r'\.aux$', r'\.sh$', r'\.blg$', r'\.brf$', r'\.log$', r'\.out$', r'\.ps$',
r'\.dvi$', r'\.synctex.gz$', '~$', r'\.backup$', r'\.gitignore$',
r'\.DS_Store$', r'\.svg$', r'^\.idea', r'\.dpth$', r'\.md5$', r'\.dep$',
r'\.auxlock$'
]

if not parameters['keep_bib']:
files_to_delete.append(r'\.bib$')

parameters.update({
'to_delete': files_to_delete,
'to_delete':
files_to_delete,
'figures_to_copy_if_referenced': [
r'\.png$', r'\.jpg$', r'\.jpeg$', r'\.pdf$'
]
Expand Down

0 comments on commit 1ef87e9

Please sign in to comment.