|
4 | 4 | "cell_type": "markdown",
|
5 | 5 | "metadata": {},
|
6 | 6 | "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" |
8 | 11 | ]
|
9 | 12 | },
|
10 | 13 | {
|
|
20 | 23 | },
|
21 | 24 | {
|
22 | 25 | "cell_type": "code",
|
23 |
| - "execution_count": 4, |
| 26 | + "execution_count": 2, |
24 | 27 | "metadata": {
|
25 | 28 | "collapsed": false
|
26 | 29 | },
|
|
488 | 491 | "18 A short paper showing the recent explosive gro... "
|
489 | 492 | ]
|
490 | 493 | },
|
491 |
| - "execution_count": 4, |
| 494 | + "execution_count": 2, |
492 | 495 | "metadata": {},
|
493 | 496 | "output_type": "execute_result"
|
494 | 497 | }
|
|
500 | 503 | },
|
501 | 504 | {
|
502 | 505 | "cell_type": "code",
|
503 |
| - "execution_count": 5, |
| 506 | + "execution_count": 3, |
504 | 507 | "metadata": {
|
505 | 508 | "collapsed": true
|
506 | 509 | },
|
|
521 | 524 | },
|
522 | 525 | {
|
523 | 526 | "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, |
525 | 539 | "metadata": {
|
526 | 540 | "collapsed": false
|
527 | 541 | },
|
|
545 | 559 | " md += \"\\nAbstract: \" + html_escape(item.description) + \"\\n\"\n",
|
546 | 560 | " md += \"\\n Recommended citation: \" + item.citation\n",
|
547 | 561 | " 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", |
549 | 563 | " f.write(md)"
|
550 | 564 | ]
|
551 | 565 | },
|
552 | 566 | {
|
553 | 567 | "cell_type": "code",
|
554 |
| - "execution_count": 7, |
| 568 | + "execution_count": 6, |
555 | 569 | "metadata": {
|
556 | 570 | "collapsed": false
|
557 | 571 | },
|
|
560 | 574 | "name": "stdout",
|
561 | 575 | "output_type": "stream",
|
562 | 576 | "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" |
583 | 596 | ]
|
584 | 597 | }
|
585 | 598 | ],
|
586 | 599 | "source": [
|
587 |
| - "!ls -lah *.md" |
| 600 | + "!ls _publications/" |
588 | 601 | ]
|
589 | 602 | },
|
590 | 603 | {
|
591 | 604 | "cell_type": "code",
|
592 |
| - "execution_count": 8, |
| 605 | + "execution_count": 7, |
593 | 606 | "metadata": {
|
594 | 607 | "collapsed": false
|
595 | 608 | },
|
|
612 | 625 | }
|
613 | 626 | ],
|
614 | 627 | "source": [
|
615 |
| - "!head 2009-10-01-gnovis-habermas-understand-internet.md" |
| 628 | + "!head _publications/2009-10-01-gnovis-habermas-understand-internet.md" |
616 | 629 | ]
|
617 | 630 | },
|
618 | 631 | {
|
|
0 commit comments