Skip to content

Commit 6c89bc1

Browse files
committed
update notebooks to support format used in academicpages
1 parent b21eb3b commit 6c89bc1

File tree

2 files changed

+1548
-1464
lines changed

2 files changed

+1548
-1464
lines changed

markdown_generator/publications.ipynb

+43-30
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Convert TSV of publication data into markdown for Github Pages"
7+
"# Publications markdown generator\n",
8+
"Takes a TSV of publications with metadata and converts them for use with academicpages.github.io. \n",
9+
"\n",
10+
"TODO: Make this work with BibTex and other databases of citations, rather than Stuart's non-standard TSV format and citation style.\n"
811
]
912
},
1013
{
@@ -20,7 +23,7 @@
2023
},
2124
{
2225
"cell_type": "code",
23-
"execution_count": 4,
26+
"execution_count": 2,
2427
"metadata": {
2528
"collapsed": false
2629
},
@@ -488,7 +491,7 @@
488491
"18 A short paper showing the recent explosive gro... "
489492
]
490493
},
491-
"execution_count": 4,
494+
"execution_count": 2,
492495
"metadata": {},
493496
"output_type": "execute_result"
494497
}
@@ -500,7 +503,7 @@
500503
},
501504
{
502505
"cell_type": "code",
503-
"execution_count": 5,
506+
"execution_count": 3,
504507
"metadata": {
505508
"collapsed": true
506509
},
@@ -521,7 +524,18 @@
521524
},
522525
{
523526
"cell_type": "code",
524-
"execution_count": 6,
527+
"execution_count": 4,
528+
"metadata": {
529+
"collapsed": false
530+
},
531+
"outputs": [],
532+
"source": [
533+
"!mkdir _publications"
534+
]
535+
},
536+
{
537+
"cell_type": "code",
538+
"execution_count": 5,
525539
"metadata": {
526540
"collapsed": false
527541
},
@@ -545,13 +559,13 @@
545559
" md += \"\\nAbstract: \" + html_escape(item.description) + \"\\n\"\n",
546560
" md += \"\\n Recommended citation: \" + item.citation\n",
547561
" md_filename = os.path.basename(md_filename)\n",
548-
" with open(md_filename, 'w') as f:\n",
562+
" with open(\"_publications/\" + md_filename, 'w') as f:\n",
549563
" f.write(md)"
550564
]
551565
},
552566
{
553567
"cell_type": "code",
554-
"execution_count": 7,
568+
"execution_count": 6,
555569
"metadata": {
556570
"collapsed": false
557571
},
@@ -560,36 +574,35 @@
560574
"name": "stdout",
561575
"output_type": "stream",
562576
"text": [
563-
"-rw-r--r-- 1 tools.paws tools.paws 1.5K Mar 25 17:22 2009-10-01-gnovis-habermas-understand-internet.md\r\n",
564-
"-rw-r--r-- 1 tools.paws tools.paws 1.3K Mar 25 17:22 2009-10-27-wikisym-social-roles-bots.md\r\n",
565-
"-rw-r--r-- 1 tools.paws tools.paws 1.4K Mar 25 17:22 2010-02-25-cscw-banning-vandal.md\r\n",
566-
"-rw-r--r-- 1 tools.paws tools.paws 1.6K Mar 25 17:22 2011-01-03-hicss-trace-ethnography.md\r\n",
567-
"-rw-r--r-- 1 tools.paws tools.paws 1.6K Mar 25 17:22 2011-10-05-wikisym-article-deletion.md\r\n",
568-
"-rw-r--r-- 1 tools.paws tools.paws 1.4K Mar 25 17:22 2011-11-01-cpov-lives-of-bots.md\r\n",
569-
"-rw-r--r-- 1 tools.paws tools.paws 1.6K Mar 25 17:22 2012-05-02-altchi-ipoxp.md\r\n",
570-
"-rw-r--r-- 1 tools.paws tools.paws 1.9K Mar 25 17:22 2012-06-05-icwsm-socialization-wikipedia.md\r\n",
571-
"-rw-r--r-- 1 tools.paws tools.paws 1.8K Mar 25 17:22 2012-08-29-wikisym-wikipedia-literate.md\r\n",
572-
"-rw-r--r-- 1 tools.paws tools.paws 1.9K Mar 25 17:22 2012-11-05-infoorg-artifacts-that-organize.md\r\n",
573-
"-rw-r--r-- 1 tools.paws tools.paws 1.8K Mar 25 17:22 2013-02-23-cscw-edit-sessions.md\r\n",
574-
"-rw-r--r-- 1 tools.paws tools.paws 1.9K Mar 25 17:22 2013-05-01-abs-rise-and-decline-wikipedia.md\r\n",
575-
"-rw-r--r-- 1 tools.paws tools.paws 1.9K Mar 25 17:22 2013-08-03-wikisym-levee-breaks-bots.md\r\n",
576-
"-rw-r--r-- 1 tools.paws tools.paws 1.9K Mar 25 17:22 2013-09-01-ecosoc-lter-students.md\r\n",
577-
"-rw-r--r-- 1 tools.paws tools.paws 1.6K Mar 25 17:22 2014-01-03-ics-bots-bespoke-code.md\r\n",
578-
"-rw-r--r-- 1 tools.paws tools.paws 1.9K Mar 25 17:22 2014-05-01-chi-snuggle-wikipedia.md\r\n",
579-
"-rw-r--r-- 1 tools.paws tools.paws 1.7K Mar 25 17:22 2014-09-10-jobem-old-against-new.md\r\n",
580-
"-rw-r--r-- 1 tools.paws tools.paws 1.8K Mar 25 17:22 2014-11-02-hcomp-values-in-crowdsourcing.md\r\n",
581-
"-rw-r--r-- 1 tools.paws tools.paws 1.9K Mar 25 17:22 2016-03-21-blockbots-ics.md\r\n",
582-
"-rw-r--r-- 1 tools.paws tools.paws 493 Mar 25 17:20 readme.md\r\n"
577+
"2009-10-01-gnovis-habermas-understand-internet.md\r\n",
578+
"2009-10-27-wikisym-social-roles-bots.md\r\n",
579+
"2010-02-25-cscw-banning-vandal.md\r\n",
580+
"2011-01-03-hicss-trace-ethnography.md\r\n",
581+
"2011-10-05-wikisym-article-deletion.md\r\n",
582+
"2011-11-01-cpov-lives-of-bots.md\r\n",
583+
"2012-05-02-altchi-ipoxp.md\r\n",
584+
"2012-06-05-icwsm-socialization-wikipedia.md\r\n",
585+
"2012-08-29-wikisym-wikipedia-literate.md\r\n",
586+
"2012-11-05-infoorg-artifacts-that-organize.md\r\n",
587+
"2013-02-23-cscw-edit-sessions.md\r\n",
588+
"2013-05-01-abs-rise-and-decline-wikipedia.md\r\n",
589+
"2013-08-03-wikisym-levee-breaks-bots.md\r\n",
590+
"2013-09-01-ecosoc-lter-students.md\r\n",
591+
"2014-01-03-ics-bots-bespoke-code.md\r\n",
592+
"2014-05-01-chi-snuggle-wikipedia.md\r\n",
593+
"2014-09-10-jobem-old-against-new.md\r\n",
594+
"2014-11-02-hcomp-values-in-crowdsourcing.md\r\n",
595+
"2016-03-21-blockbots-ics.md\r\n"
583596
]
584597
}
585598
],
586599
"source": [
587-
"!ls -lah *.md"
600+
"!ls _publications/"
588601
]
589602
},
590603
{
591604
"cell_type": "code",
592-
"execution_count": 8,
605+
"execution_count": 7,
593606
"metadata": {
594607
"collapsed": false
595608
},
@@ -612,7 +625,7 @@
612625
}
613626
],
614627
"source": [
615-
"!head 2009-10-01-gnovis-habermas-understand-internet.md"
628+
"!head _publications/2009-10-01-gnovis-habermas-understand-internet.md"
616629
]
617630
},
618631
{

0 commit comments

Comments
 (0)