|
208 | 208 | },
|
209 | 209 | {
|
210 | 210 | "cell_type": "code",
|
211 |
| - "execution_count": 100, |
| 211 | + "execution_count": 105, |
212 | 212 | "metadata": {},
|
213 | 213 | "outputs": [
|
214 | 214 | {
|
215 |
| - "ename": "SyntaxError", |
216 |
| - "evalue": "invalid syntax (<ipython-input-100-99fc69caf55e>, line 8)", |
217 |
| - "output_type": "error", |
218 |
| - "traceback": [ |
219 |
| - "\u001b[0;36m File \u001b[0;32m\"<ipython-input-100-99fc69caf55e>\"\u001b[0;36m, line \u001b[0;32m8\u001b[0m\n\u001b[0;31m )\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" |
220 |
| - ] |
| 215 | + "data": { |
| 216 | + "text/plain": [ |
| 217 | + "'removed 9 fields from 126 files'" |
| 218 | + ] |
| 219 | + }, |
| 220 | + "execution_count": 105, |
| 221 | + "metadata": {}, |
| 222 | + "output_type": "execute_result" |
221 | 223 | }
|
222 | 224 | ],
|
223 | 225 | "source": [
|
224 | 226 | "%autoreload\n",
|
| 227 | + "fields_to_delete = ['night_day','eventbrite_id','funded_who','night_room','regonline','pre-summit',\n", |
| 228 | + " 'sponsored_by','venue','villa']\n", |
| 229 | + "\n", |
225 | 230 | "md_participants = hugo.md_files_participants()\n",
|
226 |
| - "md_participant = md_participants[0]\n", |
227 |
| - "participant = OSS_Participant(md_participant)\n", |
228 |
| - "participant.metadata()\n", |
229 |
| - "participant.field('type','participant')\n", |
230 |
| - "participant.save()\n" |
| 231 | + "for md_participant in md_participants[0:4]:\n", |
| 232 | + " participant = OSS_Participant(md_participant)\n", |
| 233 | + " for field_to_delete in fields_to_delete:\n", |
| 234 | + " participant.delete_field(field_to_delete)\n", |
| 235 | + " participant.save() \n", |
| 236 | + " \n", |
| 237 | + "\n", |
| 238 | + "\"removed {0} fields from {1} files\".format(len(fields_to_delete), len(md_participants))\n" |
231 | 239 | ]
|
232 | 240 | },
|
233 | 241 | {
|
|
0 commit comments