Skip to content

Commit 567e877

Browse files
committed
Add list of recognised file types
1 parent cd50da4 commit 567e877

1 file changed

Lines changed: 135 additions & 0 deletions

File tree

oshminer/filetypes.py

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
# SPDX-FileCopyrightText: 2022 Pen-Yuan Hsing
4+
# SPDX-License-Identifier: AGPL-3.0-or-later
5+
6+
# Categorised list of file extensions
7+
# Each category is a `list` and each extension should be in only one list.
8+
#
9+
# Most extensions are from this paper:
10+
# Bonvoisin, J., Buchert, T., Preidel, M., & Stark, R. G. (2018). How
11+
# participative is open source hardware? Insights from online repository
12+
# mining. Design Science, 4(e19). https://doi.org/10.1017/dsj.2018.15
13+
#
14+
# Extensions changed or not from that paper are marked in comments.
15+
16+
# Electronic CAD
17+
ecad: list = [
18+
"brd",
19+
"drl",
20+
"dsn",
21+
"fz", # added
22+
"fzz",
23+
"gbl",
24+
"gbo",
25+
"gbp",
26+
"gbr",
27+
"gbs",
28+
"gml",
29+
"gpi",
30+
"gtl",
31+
"gto",
32+
"gtp",
33+
"gts",
34+
"kicad_mod",
35+
"kicad_pcb",
36+
"kicad_pcb-bak",
37+
"pcb",
38+
"pde",
39+
"sch"
40+
]
41+
42+
# Mechanical CAD
43+
mcad: list = [
44+
"123dx",
45+
"3dm",
46+
"art",
47+
"blend",
48+
"blend1",
49+
"crv",
50+
"dft",
51+
"dra",
52+
"dwf",
53+
"dwg",
54+
"easm",
55+
"epf",
56+
"fcmacro",
57+
"fcstd",
58+
"fcstd1",
59+
"gcode",
60+
"iam",
61+
"idw",
62+
"iges",
63+
"igs",
64+
"ipj",
65+
"ipn",
66+
"ipt",
67+
"makerbot",
68+
"mb",
69+
"nc",
70+
"obj",
71+
"par",
72+
"psm",
73+
"scad",
74+
"skp",
75+
"sldasm",
76+
"slddrw",
77+
"sldprt",
78+
"step",
79+
"stl",
80+
"stp",
81+
"thing",
82+
"vert",
83+
"x_t",
84+
"x3g"
85+
]
86+
87+
# Image
88+
image: list = [
89+
"ai",
90+
"bmp",
91+
"cdr",
92+
"drawio", # added
93+
"dxf",
94+
"eps",
95+
"gif",
96+
"ico",
97+
"jpeg",
98+
"jpg",
99+
"odg", # added
100+
"png",
101+
"psd",
102+
"svg",
103+
"tiff",
104+
"xcf",
105+
"xmp"
106+
]
107+
108+
# Data (not originally a category in Bonvoisin et al. (2018))
109+
data: list = [
110+
"csv", # moved from `document`
111+
"json",
112+
"ods", # moved from `document`
113+
"xls", # moved from `document`
114+
"xlsx"# moved from `document`
115+
]
116+
117+
# Document
118+
document: list = [
119+
"bib", # added
120+
"docx",
121+
"gdoc",
122+
"htm",
123+
"html",
124+
"markdown",
125+
"md",
126+
"odt",
127+
"odp", # added
128+
"pdf",
129+
"rst", # added
130+
"rtf",
131+
"shtml",
132+
"tex", # added
133+
"txt",
134+
"yaml" # added
135+
]

0 commit comments

Comments
 (0)