Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drvinceknight/latexfileswordcount
Script to recursively word count all tex files in all subdirectories.
https://github.com/drvinceknight/latexfileswordcount
Last synced: about 1 month ago
JSON representation
Script to recursively word count all tex files in all subdirectories.
- Host: GitHub
- URL: https://github.com/drvinceknight/latexfileswordcount
- Owner: drvinceknight
- Created: 2013-09-28T18:29:05.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-12T17:25:55.000Z (about 11 years ago)
- Last Synced: 2024-06-20T00:45:31.757Z (6 months ago)
- Language: Python
- Size: 137 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A repo with a script to recursively run `latexcount` on all tex files in a target directory. The output of the script is three files:
- A scatter plot with a fitted regression line [png]
- A histogram with both code words and words represented [png]
- A csv file with 3 columns (number of code words, number of words, file name), which is to be used for further analysisI have written 2 blog posts showing the use of this script (as it has evolved):
1. Just counting: [here](http://drvinceknight.blogspot.co.uk/2013/09/counting-words-in-all-my-latex-files.html).
2. Regression model: [here](http://drvinceknight.blogspot.co.uk/2013/10/almost-2-to-1-ratio-of-code-words-to.html).# Usage
To run the script on a directory (which will recursively search all subdirectories):
./countlatexwords.py directory
To run the script on a csv file (which needs to have two column of data: number of code words, number of words):
./countlatexwords.py -c file.csv
# Dependencies
The script uses [matplotlib](http://matplotlib.org/) for the plotting and [scipy](http://www.scipy.org/) for the linear regression.
# License Information
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0](http://creativecommons.org/licenses/by-sa/3.0/us/) license. You are free to:
* Share: copy, distribute, and transmit the work,
* Remix: adapt the workUnder the following conditions:
* Attribution: You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
* Share Alike: If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.When attributing this work, please include me.