-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStarterDataandUser.py
executable file
·234 lines (151 loc) · 8.94 KB
/
StarterDataandUser.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from database_setup import Category, Base, CategoryItem, User
engine = create_engine('sqlite:///blacksmithcatalog.db')
Base.metadata.bind = engine
DBSession = sessionmaker(bind=engine)
session = DBSession()
# Create Dummy User
User1 = User(name="Robo Barista", email="tinnyTim@abc.com",
picture='https://pbs.twimg.com/profile_images/2671170543/18debd694829ed78203a5a36dd364160_400x400.png')
session.add(User1)
session.commit()
# Category1 Hammers
category1 = Category(user_id=1, name="Hammers")
session.add(category1)
session.commit()
Item3 = CategoryItem(user_id=1, title="Cross-pein", description="Standard blacksmithing hammer slightly rounded on one face with rounded wedge on the other (wedge is perpendicular to the handle)",
category=category1)
session.add(Item3)
session.commit()
Item2 = CategoryItem(user_id=1, title="Rounding", description="Standard blacksmithing hammer slightly rounded on one face and flat on the other",
category=category1)
session.add(Item2)
session.commit()
Item1 = CategoryItem(user_id=1, title="Fullering", description="Rounded wedge on one side (wedge is parallel to the handle), flat striking point on the other for adding fullers to blades",
category=category1)
session.add(Item1)
session.commit()
print ('Hammers added')
# Category2 Anvils
category2 = Category(user_id=1, name="Anvils")
session.add(category2)
session.commit()
Item3 = CategoryItem(user_id=1, title="Type A1", description="Standard weights are (kg): 32, 41, 52, 91, 129, 161, and 305. Thin tapered square and upward pointing horn with one hardy hole for tools.",
category=category2)
session.add(Item3)
session.commit()
Item2 = CategoryItem(user_id=1, title="Type A4", description="Standard weights are (kg): 32, 41, 56, 92, 126, and 159. Thick tapered square and rounder upward pointing horn with one hardy hole for tools.",
category=category2)
session.add(Item2)
session.commit()
Item1 = CategoryItem(user_id=1, title="Type B25", description="Standard weights are (kg): 38, 48, 69, 102, and 159. Double horned. One round tapered straight out and the other tapered flat in line with surface",
category=category2)
session.add(Item1)
session.commit()
print ('Anvils added')
# Category3 Chisels
category3 = Category(user_id=1, name="Chisels")
session.add(category3)
session.commit()
Item3 = CategoryItem(user_id=1, title="Flat", description="Sharpened Squared tip designed for cutting or marking",
category=category3)
session.add(Item3)
session.commit()
Item2 = CategoryItem(user_id=1, title="Chasing", description="Sharpened tip in an arc (fishtail) designed for making longer marks along a pattern or curve",
category=category3)
session.add(Item2)
session.commit()
Item1 = CategoryItem(user_id=1, title="Rounded", description="Squared tip but rounded for making decorative marks or light fullering",
category=category3)
session.add(Item1)
session.commit()
print ('Chisels added')
# Category4 Punches
category4 = Category(user_id=1, name="Punches")
session.add(category4)
session.commit()
Item3 = CategoryItem(user_id=1, title="Center(Round)", description="Round Sharpened tip designed for putting round point marks",
category=category4)
session.add(Item3)
session.commit()
Item2 = CategoryItem(user_id=1, title="Center(Square)", description="Round tip but sharpened in square fashion to allow center marks to be more of a X pattern for better visibility",
category=category4)
session.add(Item2)
session.commit()
Item1 = CategoryItem(user_id=1, title="Rounded", description="Round tip rounded to make half sphere indentions for decoration",
category=category4)
session.add(Item1)
session.commit()
print ('Punches added')
# Category5 Marking
category5 = Category(user_id=1, name="Marking")
session.add(category5)
session.commit()
Item3 = CategoryItem(user_id=1, title="Awl", description="Any large 'needle' like object for etching a mark or line into steel",
category=category5)
session.add(Item3)
session.commit()
Item2 = CategoryItem(user_id=1, title="Silver Pencil", description="Gravity fed mechanical pencil with replaceable 'silver' lead for marking on steel. Often used on top of awl scratch marks to highlight them for better visibility",
category=category5)
session.add(Item2)
session.commit()
Item1 = CategoryItem(user_id=1, title="High Temp Marker", description="Liquid filled pens with wick tip that allow for marking on steel in various temperature tolerant pigments. Very useful when needing to know a specific temperature range of the steel. The Paints are rated temperature and stick around until that temperature is surpassed",
category=category5)
session.add(Item1)
session.commit()
print ('Marking added')
# Category6 Tongs
category6 = Category(user_id=1, name="Tongs")
session.add(category6)
session.commit()
Item5 = CategoryItem(user_id=1, title="Knife/Blade Tongs", description="Tongs with jaws offset from the handles to allow for griping of bars and blades that would extend past the hinge point of the tongs. ",
category=category6)
session.add(Item5)
session.commit()
Item4 = CategoryItem(user_id=1, title="RRS Tongs", description="'Rail Road Spike' Tongs. Tongs specifically designed to grasp and hold the head of a Rail Road Spike while forging the shaft.",
category=category6)
session.add(Item4)
session.commit()
Item3 = CategoryItem(user_id=1, title="Open-Mouthed Tongs", description="Used for holding medium-sized pieces of round or square iron. Sometimes called Flat Bills",
category=category6)
session.add(Item3)
session.commit()
Item2 = CategoryItem(user_id=1, title="Bolt Tongs", description="For holding bolts or similar work. The hollow a the back jaws allow the head to clear the tongs. Also used for holding flat iron to bend it edgewise",
category=category6)
session.add(Item2)
session.commit()
Item1 = CategoryItem(user_id=1, title="Bent-Bit Tongs", description="For holding iron parallel to tongs. Sometimes called side tongs. ",
category=category6)
session.add(Item1)
session.commit()
print ('Tongs Added')
# Category7 Forges
category7 = Category(user_id=1, name="Forges")
session.add(category7)
session.commit()
Item3 = CategoryItem(user_id=1, title="Induction Forge", description="An induction heater operates by surrounding the object to be heated with a coil carrying high frequency AC current. Basically, the entire setup acts like a huge transformer with a shorted secondary. At 30 kVA, an induction forge heater gets hot enough to melt and forge steel, iron, and aluminum. Instructables user 'bwang' published his build at https://www.instructables.com/id/30-kVA-Induction-Heater/ if you'd like to tackle building one. WARNING!! HIGH VOLTAGE!! WITHOUT PROPER TRAINING OR SKILLS THIS PROJECT CAN KILL YOU!!!!",
category=category7)
session.add(Item3)
session.commit()
Item2 = CategoryItem(user_id=1, title="Propane Forge", description="Typical Propane Forges are metal containers lined with Fire Brick and Ceramic Refactory Blankey liner to retain as much heat as possible. This helps conserver fuel as you don't need to run the forge as hot all the time. Propane Forges can have 1-5 burners depending on the size of the forge. Interrior cubic inch space is important. Typical ratio is one well tuned 3/4in burner per 300-350 cu/in.",
category=category7)
session.add(Item2)
session.commit()
Item1 = CategoryItem(user_id=1, title="Coal Forge", description="Every Blacksmith's Starter Forge. It's any type of forge that uses coal as fuel. Works best with a forced air flow up from the bottom center of the forge to control temperature. Can be made from a simple stack of Fire Brick on any fire retardant surface or any metal container with access points that will retain heat. Coal can be Hardwood Lump Coal from a local store but Bituminous Coal is the coal-of-choice for the blacksmith. It is a soft, mid-grade, black coal. Mined from deeper mines than other coals. It burns much more cleanly. Your neighbors will thank you for using it over the heavy smoking stuff",
category=category7)
session.add(Item1)
session.commit()
print ('Forges added')
# Category Template - Replace 'TEMPLATE with Category Name'
# Category TEMPLATE
# category# = Category(user_id=1, name="TEMPLATE")
# session.add(category#)
# session.commit()
# Item Template - Replace # with appropriate Item and Category #
# Item# = CategoryItem(user_id=1, title="PUT-ITEM-NAME-HERE", description="PUT-ITEM-DESCRIPTION-HERE",
# category=category#)
# session.add(Item#)
# session.commit()
# print ('TEMPLATE added')
print ('Starter Database populated...')