Skip to content

Improve dev workflow: use python3 and auto-unzip ISO-639-3 tables in Makefile; update .gitignore and README #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
__pycache__
# Ignore the extracted ISO 639-3 code tables directory and its zip archive.
# These files are likely large data resources not needed in version control.
iso-639-3_Code_Tables_20240415/
iso-639-3_Code_Tables_20240415.zip
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ init:
get-table:
# https://iso639-3.sil.org/code_tables/download_tables
wget https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3_Code_Tables_20240415.zip
unzip -o iso-639-3_Code_Tables_20240415.zip

combine-wikipedia:
cat wikipedia_languages.csv wikipedia_languages_extra.csv > wikipedia_languages_all.csv

generate:
python generate.py
python3 generate.py
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,42 @@ web-languages dataset.



## Installing, etc.
## Install dependencies:
**Note:** This project requires Python 3.

## Setup

Install dependencies:

```bash
make init
```

Download and extract ISO-639-3 tables:
```
make get-table
```
make install

(Optional) Combine Wikipedia language files:
```
make combine-wikipedia
```

Generate language Markdown files:
```
make generate
```

Downloaded data files (e.g., ISO-639-3 tables) are excluded from version control via `.gitignore`.

## Makefile Targets

| Target | Description |
|--------------------|--------------------------------------------------|
| init | Install Python dependencies |
| get-table | Download and unzip ISO-639-3 tables |
| combine-wikipedia | Combine Wikipedia language CSVs |
| generate | Generate Markdown files from data |

## License

Expand Down