Misc changes:

- Update database models to the new declarative mapping syntax
  See https://docs.sqlalchemy.org/en/20/orm/mapping_styles.html#orm-declarative-mapping
- Make use of Flask-SQLAlchemy to manage database connections
- Remove cli command interface in favor of just deleting the
  sqlite file and reseeding when no tables are detected.
- Add list of iso639_1 language codes and names, and add to seed list
- Other changes to file structure.
This commit is contained in:
2023-05-01 01:37:52 +02:00
parent f72188b063
commit e57c638683
26 changed files with 651 additions and 227 deletions

View File

@@ -0,0 +1,33 @@
isbn, note, bookcase, shelf
9780486809038, emily riehl, arbeidsrom_smal, 5
9781568811307, winning ways, arbeidsrom_smal, 5
9780486458731, cardano, arbeidsrom_smal, 5
9780486462394, alg topo, arbeidsrom_smal, 5
9780582447585, formulae, arbeidsrom_smal, 5
9780486466668, theory of numbers, arbeidsrom_smal, 5
9780486462431, conv surf, arbeidsrom_smal, 5
9780486449685, math fun and earnest, arbeidsrom_smal, 5
9780486417103, lin prog, arbeidsrom_smal, 5
9780130892393, complex analysis, arbeidsrom_smal, 5
9781292024967, abstract alg, arbeidsrom_smal, 5
9780471728979, kreyzig, arbeidsrom_smal, 5
9781847762399, calc 1, arbeidsrom_smal, 5
9781847762399, calc 1 again, arbeidsrom_smal, 5
9781787267763, calc 1 nome, arbeidsrom_smal, 5
9781787267770, calc 2 nome, arbeidsrom_smal, 5
9780199208258, non lin ode, arbeidsrom_smal, 5
9788251915953, tabeller, arbeidsrom_smal, 5
9788251915953, taeller 2, arbeidsrom_smal, 5
9788251915953, tabeller 3, arbeidsrom_smal, 5
9788251915953, tabeller 4, arbeidsrom_smal, 5
9780750304009, fractals and chaos, arbeidsrom_smal, 5
9788241902116, geometri, arbeidsrom_smal, 5
9781620402788, simpsons, arbeidsrom_smal, 5
9781846683459, math curiosities, arbeidsrom_smal, 5
9789810245344, fuzzy logic, arbeidsrom_smal, 5
9781429224048, vect calc, arbeidsrom_smal, 5
9780122407611, gambling, arbeidsrom_smal, 5
9788278220054, rottman slitt, arbeidsrom_smal, 5
9780321748232, prob and stat, arbeidsrom_smal, 5
9780387954752, stats with r, arbeidsrom_smal, 5
9781568814421, maths by exp, arbeidsrom_smal, 5
1 isbn note bookcase shelf
2 9780486809038 emily riehl arbeidsrom_smal 5
3 9781568811307 winning ways arbeidsrom_smal 5
4 9780486458731 cardano arbeidsrom_smal 5
5 9780486462394 alg topo arbeidsrom_smal 5
6 9780582447585 formulae arbeidsrom_smal 5
7 9780486466668 theory of numbers arbeidsrom_smal 5
8 9780486462431 conv surf arbeidsrom_smal 5
9 9780486449685 math fun and earnest arbeidsrom_smal 5
10 9780486417103 lin prog arbeidsrom_smal 5
11 9780130892393 complex analysis arbeidsrom_smal 5
12 9781292024967 abstract alg arbeidsrom_smal 5
13 9780471728979 kreyzig arbeidsrom_smal 5
14 9781847762399 calc 1 arbeidsrom_smal 5
15 9781847762399 calc 1 again arbeidsrom_smal 5
16 9781787267763 calc 1 nome arbeidsrom_smal 5
17 9781787267770 calc 2 nome arbeidsrom_smal 5
18 9780199208258 non lin ode arbeidsrom_smal 5
19 9788251915953 tabeller arbeidsrom_smal 5
20 9788251915953 taeller 2 arbeidsrom_smal 5
21 9788251915953 tabeller 3 arbeidsrom_smal 5
22 9788251915953 tabeller 4 arbeidsrom_smal 5
23 9780750304009 fractals and chaos arbeidsrom_smal 5
24 9788241902116 geometri arbeidsrom_smal 5
25 9781620402788 simpsons arbeidsrom_smal 5
26 9781846683459 math curiosities arbeidsrom_smal 5
27 9789810245344 fuzzy logic arbeidsrom_smal 5
28 9781429224048 vect calc arbeidsrom_smal 5
29 9780122407611 gambling arbeidsrom_smal 5
30 9788278220054 rottman slitt arbeidsrom_smal 5
31 9780321748232 prob and stat arbeidsrom_smal 5
32 9780387954752 stats with r arbeidsrom_smal 5
33 9781568814421 maths by exp arbeidsrom_smal 5

View File

@@ -0,0 +1,32 @@
{"isbn": "9780486809038", "authors": ["Emily Riehl"], "title": "Category Theory in Context", "publish_date": "2016", "number_of_pages": 272, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9781568811307", "authors": ["Elwyn R. Berlekamp", "John H. Conway", "Richard K. Guy"], "title": "Winning Ways For Your Mathematical Plays, Volume 3", "publish_date": "2001", "number_of_pages": null, "languages": ["en"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780486458731", "authors": ["Girolamo Cardano"], "title": "The Rules of Algebra", "publish_date": "April 19, 2007", "number_of_pages": 304, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780486462394", "authors": ["Andrew H. Wallace"], "title": "Algebraic Topology", "publish_date": "September 26, 2007", "number_of_pages": 288, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780582447585", "authors": ["S. Barnett"], "title": "Mathematical formulae for engineering and science students", "publish_date": "1986", "number_of_pages": 77, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780486466668", "authors": ["Samuel, Pierre"], "title": "Algebraic theory of numbers", "publish_date": "2008", "number_of_pages": null, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780486462431", "authors": ["Herbert Busemann"], "title": "Convex Surfaces", "publish_date": "February 15, 2008", "number_of_pages": 208, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780486449685", "authors": ["Nathan Altshiller-Court"], "title": "Mathematics in fun and in earnest", "publish_date": "2006", "number_of_pages": null, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780486417103", "authors": ["Abraham M. Glicksman"], "title": "An introduction to linear programming and the theory of games", "publish_date": "2001", "number_of_pages": 131, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780130892393", "authors": ["Nakhle H. Asmar"], "title": "Applied Complex Analysis with Partial Differential Equations", "publish_date": "April 23, 2002", "number_of_pages": 883, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9781292024967", "authors": ["John B. Fraleigh"], "title": "First Course in Abstract Algebra", "publish_date": "2013", "number_of_pages": 464, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780471728979", "authors": ["Erwin Kreyszig"], "title": "Advanced engineering mathematics", "publish_date": "1999", "number_of_pages": 1094, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9781847762399", "note": "calc 1", "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9781847762399", "note": "calc 1 again", "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9781787267763", "authors": [""], "title": "Calculus 1 - Selected Chapters From: Calculus: A Complete Course Ninth Edition, Robert A. Adams And Christopher Essex", "publish_date": "", "number_of_pages": null, "languages": ["en"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9781787267770", "authors": ["Robert Alexander Adams"], "title": "Calculus 2", "publish_date": "2018", "number_of_pages": null, "languages": ["en"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780199208258", "authors": ["D. W. Jordan"], "title": "Nonlinear ordinary differential equations", "publish_date": "2007", "number_of_pages": 531, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9788251915953", "authors": [""], "title": "Tabeller og formler i statistikk", "publish_date": "2017", "number_of_pages": null, "languages": ["no"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9788251915953", "authors": [""], "title": "Tabeller og formler i statistikk", "publish_date": "2017", "number_of_pages": null, "languages": ["no"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9788251915953", "authors": [""], "title": "Tabeller og formler i statistikk", "publish_date": "2017", "number_of_pages": null, "languages": ["no"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9788251915953", "authors": [""], "title": "Tabeller og formler i statistikk", "publish_date": "2017", "number_of_pages": null, "languages": ["no"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780750304009", "authors": ["Paul S. Addison"], "title": "Fractals and chaos", "publish_date": "1997", "number_of_pages": 256, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9788241902116", "authors": ["Audun Holme"], "title": "Innf\u00f8ring i geometri - fra Euklid til Mandelbrot", "publish_date": "1996", "number_of_pages": null, "languages": ["no"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9781620402788", "authors": ["Simon Singh"], "title": "Simpsons and Their Mathematical Secrets", "publish_date": "2014", "number_of_pages": 272, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9781846683459", "authors": ["Ian Stewart"], "title": "Professor Stewart's cabinet of mathematical curiosities", "publish_date": "2010", "number_of_pages": 310, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9789810245344", "authors": ["Masao Mukaidono"], "title": "Fuzzy logic for beginners", "publish_date": "2001", "number_of_pages": 105, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9781429224048", "authors": ["Jerrold E. Marsden"], "title": "Vector calculus", "publish_date": "2012", "number_of_pages": 545, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780122407611", "authors": ["Epstein, Richard A."], "title": "The theory of gambling and statistical logic", "publish_date": "1995", "number_of_pages": 450, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9788278220054", "authors": ["Karl Rottmann"], "title": "Matematisk formelsamling", "publish_date": "1995", "number_of_pages": null, "languages": ["no"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780321748232", "authors": ["Sharon L. Myers", "Raymond H. Myers", "Keying E. Ye", "Ronald E. Walpole"], "title": "Probability and Statistics for Engineers and Scientists", "publish_date": "2011", "number_of_pages": 816, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9780387954752", "authors": ["Peter Dalgaard"], "title": "Introductory Statistics with R", "publish_date": "January 9, 2004", "number_of_pages": 282, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}
{"isbn": "9781568814421", "authors": ["Jonathan M. Borwein"], "title": "Mathematics by experiment", "publish_date": "2008", "number_of_pages": null, "languages": ["English"], "bookcase": "arbeidsrom_smal", "shelf": "5"}

185
data/iso639_1.csv Normal file
View File

@@ -0,0 +1,185 @@
code,name
aa,Afar
ab,Abkhazian
ae,Avestan
af,Afrikaans
ak,Akan
am,Amharic
an,Aragonese
ar,Arabic
as,Assamese
av,Avaric
ay,Aymara
az,Azerbaijani
ba,Bashkir
be,Belarusian
bg,Bulgarian
bh,Bihari
bi,Bislama
bm,Bambara
bn,Bengali
bo,Tibetan
br,Breton
bs,Bosnian
ca,Catalan
ce,Chechen
ch,Chamorro
co,Corsican
cr,Cree
cs,Czech
cu,Church Slavic
cv,Chuvash
cy,Welsh
da,Danish
de,German
dv,Divehi
dz,Dzongkha
ee,Ewe
el,Greek
en,English
eo,Esperanto
es,Spanish
et,Estonian
eu,Basque
fa,Persian
ff,Fulah
fi,Finnish
fj,Fijian
fo,Faroese
fr,French
fy,Western Frisian
ga,Irish
gd,Gaelic
gl,Galician
gn,Guarani
gu,Gujarati
gv,Manx
ha,Hausa
he,Hebrew
hi,Hindi
ho,Hiri Motu
hr,Croatian
ht,Haitian
hu,Hungarian
hy,Armenian
hz,Herero
ia,Interlingua
id,Indonesian
ie,Interlingue
ig,Igbo
ii,Sichuan Yi
ik,Inupiaq
io,Ido
is,Icelandic
it,Italian
iu,Inuktitut
ja,Japanese
jv,Javanese
ka,Georgian
kg,Kongo
ki,Kikuyu
kj,Kwanyama
kk,Kazakh
kl,Kalaallisut
km,Central Khmer
kn,Kannada
ko,Korean
kr,Kanuri
ks,Kashmiri
ku,Kurdish
kv,Komi
kw,Cornish
ky,Kirghiz
la,Latin
lb,Luxembourgish
lg,Ganda
li,Limburgan
ln,Lingala
lo,Lao
lt,Lithuanian
lu,Luba-Katanga
lv,Latvian
mg,Malagasy
mh,Marshallese
mi,Maori
mk,Macedonian
ml,Malayalam
mn,Mongolian
mr,Marathi
ms,Malay
mt,Maltese
my,Burmese
na,Nauru
nb,Norwegian Bokmål
nd,North Ndebele
ne,Nepali
ng,Ndonga
nl,Dutch
nn,Norwegian Nynorsk
no,Norwegian
nr,South Ndebele
nv,Navajo
ny,Chichewa
oc,Occitan
oj,Ojibwa
om,Oromo
or,Oriya
os,Ossetian
pa,Panjabi
pi,Pali
pl,Polish
ps,Pushto
pt,Portuguese
qu,Quechua
rm,Romansh
rn,Rundi
ro,Romanian
ru,Russian
rw,Kinyarwanda
sa,Sanskrit
sc,Sardinian
sd,Sindhi
se,Northern Sami
sg,Sango
si,Sinhala
sk,Slovak
sl,Slovenian
sm,Samoan
sn,Shona
so,Somali
sq,Albanian
sr,Serbian
ss,Swati
st,Southern Sotho
su,Sundanese
sv,Swedish
sw,Swahili
ta,Tamil
te,Telugu
tg,Tajik
th,Thai
ti,Tigrinya
tk,Turkmen
tl,Tagalog
tn,Tswana
to,Tonga
tr,Turkish
ts,Tsonga
tt,Tatar
tw,Twi
ty,Tahitian
ug,Uighur
uk,Ukrainian
ur,Urdu
uz,Uzbek
ve,Venda
vi,Vietnamese
vo,Volapük
wa,Walloon
wo,Wolof
xh,Xhosa
yi,Yiddish
yo,Yoruba
za,Zhuang
zh,Chinese
zu,Zulu
1 code name
2 aa Afar
3 ab Abkhazian
4 ae Avestan
5 af Afrikaans
6 ak Akan
7 am Amharic
8 an Aragonese
9 ar Arabic
10 as Assamese
11 av Avaric
12 ay Aymara
13 az Azerbaijani
14 ba Bashkir
15 be Belarusian
16 bg Bulgarian
17 bh Bihari
18 bi Bislama
19 bm Bambara
20 bn Bengali
21 bo Tibetan
22 br Breton
23 bs Bosnian
24 ca Catalan
25 ce Chechen
26 ch Chamorro
27 co Corsican
28 cr Cree
29 cs Czech
30 cu Church Slavic
31 cv Chuvash
32 cy Welsh
33 da Danish
34 de German
35 dv Divehi
36 dz Dzongkha
37 ee Ewe
38 el Greek
39 en English
40 eo Esperanto
41 es Spanish
42 et Estonian
43 eu Basque
44 fa Persian
45 ff Fulah
46 fi Finnish
47 fj Fijian
48 fo Faroese
49 fr French
50 fy Western Frisian
51 ga Irish
52 gd Gaelic
53 gl Galician
54 gn Guarani
55 gu Gujarati
56 gv Manx
57 ha Hausa
58 he Hebrew
59 hi Hindi
60 ho Hiri Motu
61 hr Croatian
62 ht Haitian
63 hu Hungarian
64 hy Armenian
65 hz Herero
66 ia Interlingua
67 id Indonesian
68 ie Interlingue
69 ig Igbo
70 ii Sichuan Yi
71 ik Inupiaq
72 io Ido
73 is Icelandic
74 it Italian
75 iu Inuktitut
76 ja Japanese
77 jv Javanese
78 ka Georgian
79 kg Kongo
80 ki Kikuyu
81 kj Kwanyama
82 kk Kazakh
83 kl Kalaallisut
84 km Central Khmer
85 kn Kannada
86 ko Korean
87 kr Kanuri
88 ks Kashmiri
89 ku Kurdish
90 kv Komi
91 kw Cornish
92 ky Kirghiz
93 la Latin
94 lb Luxembourgish
95 lg Ganda
96 li Limburgan
97 ln Lingala
98 lo Lao
99 lt Lithuanian
100 lu Luba-Katanga
101 lv Latvian
102 mg Malagasy
103 mh Marshallese
104 mi Maori
105 mk Macedonian
106 ml Malayalam
107 mn Mongolian
108 mr Marathi
109 ms Malay
110 mt Maltese
111 my Burmese
112 na Nauru
113 nb Norwegian Bokmål
114 nd North Ndebele
115 ne Nepali
116 ng Ndonga
117 nl Dutch
118 nn Norwegian Nynorsk
119 no Norwegian
120 nr South Ndebele
121 nv Navajo
122 ny Chichewa
123 oc Occitan
124 oj Ojibwa
125 om Oromo
126 or Oriya
127 os Ossetian
128 pa Panjabi
129 pi Pali
130 pl Polish
131 ps Pushto
132 pt Portuguese
133 qu Quechua
134 rm Romansh
135 rn Rundi
136 ro Romanian
137 ru Russian
138 rw Kinyarwanda
139 sa Sanskrit
140 sc Sardinian
141 sd Sindhi
142 se Northern Sami
143 sg Sango
144 si Sinhala
145 sk Slovak
146 sl Slovenian
147 sm Samoan
148 sn Shona
149 so Somali
150 sq Albanian
151 sr Serbian
152 ss Swati
153 st Southern Sotho
154 su Sundanese
155 sv Swedish
156 sw Swahili
157 ta Tamil
158 te Telugu
159 tg Tajik
160 th Thai
161 ti Tigrinya
162 tk Turkmen
163 tl Tagalog
164 tn Tswana
165 to Tonga
166 tr Turkish
167 ts Tsonga
168 tt Tatar
169 tw Twi
170 ty Tahitian
171 ug Uighur
172 uk Ukrainian
173 ur Urdu
174 uz Uzbek
175 ve Venda
176 vi Vietnamese
177 vo Volapük
178 wa Walloon
179 wo Wolof
180 xh Xhosa
181 yi Yiddish
182 yo Yoruba
183 za Zhuang
184 zh Chinese
185 zu Zulu